Title: [196472] branches/safari-601-branch/Source/WebInspectorUI
- Revision
- 196472
- Author
- matthew_han...@apple.com
- Date
- 2016-02-12 07:37:33 -0800 (Fri, 12 Feb 2016)
Log Message
Merge r196362. rdar://problem/24611811
Modified Paths
Diff
Modified: branches/safari-601-branch/Source/WebInspectorUI/ChangeLog (196471 => 196472)
--- branches/safari-601-branch/Source/WebInspectorUI/ChangeLog 2016-02-12 15:37:30 UTC (rev 196471)
+++ branches/safari-601-branch/Source/WebInspectorUI/ChangeLog 2016-02-12 15:37:33 UTC (rev 196472)
@@ -1,3 +1,26 @@
+2016-02-12 Matthew Hanson <matthew_han...@apple.com>
+
+ Merge r196362. rdar://problem/24611811
+
+ 2016-02-09 Joseph Pecoraro <pecor...@apple.com>
+
+ Regression: Web Inspector: Sometimes in Elements panel two elements showed as selected at the same time
+ https://bugs.webkit.org/show_bug.cgi?id=149742
+ <rdar://problem/24492481>
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Views/DOMTreeElement.js:
+ (WebInspector.DOMTreeElement.prototype.moveChild):
+ Since removing and re-adding this tree element may forgot its
+ entire child tree, re-select the selected child that may have
+ just been lost in the shuffle.
+
+ * UserInterface/Views/TreeOutline.js:
+ (WebInspector.TreeOutline.prototype._forgetTreeElement):
+ When forgetting the selected tree element, also deselect the
+ forgotten tree element so it clears its selected state.
+
2016-02-10 Babak Shafiei <bshaf...@apple.com>
Merge patch for rdar://problem/24267980.
Modified: branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js (196471 => 196472)
--- branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js 2016-02-12 15:37:30 UTC (rev 196471)
+++ branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js 2016-02-12 15:37:33 UTC (rev 196472)
@@ -330,11 +330,17 @@
moveChild(child, targetIndex)
{
- var wasSelected = child.selected;
+ // No move needed if the child is already in the right place.
+ if (this.children[targetIndex] === child)
+ return;
+
+ var originalSelectedChild = this.treeOutline.selectedTreeElement;
+
this.removeChild(child);
this.insertChild(child, targetIndex);
- if (wasSelected)
- child.select();
+
+ if (originalSelectedChild !== this.treeOutline.selectedTreeElement)
+ originalSelectedChild.select();
}
_updateChildren(fullRefresh)
Modified: branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js (196471 => 196472)
--- branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js 2016-02-12 15:37:30 UTC (rev 196471)
+++ branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js 2016-02-12 15:37:33 UTC (rev 196472)
@@ -281,8 +281,10 @@
_forgetTreeElement(element)
{
- if (this.selectedTreeElement === element)
+ if (this.selectedTreeElement === element) {
+ element.deselect(true)
this.selectedTreeElement = null;
+ }
if (this._knownTreeElements[element.identifier])
this._knownTreeElements[element.identifier].remove(element, true);
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes