Title: [244435] trunk/Source/WebInspectorUI
Revision
244435
Author
[email protected]
Date
2019-04-18 14:20:09 -0700 (Thu, 18 Apr 2019)

Log Message

Web Inspector: REGRESSION (r244155): pressing down expands folders in trees
https://bugs.webkit.org/show_bug.cgi?id=197051
<rdar://problem/50006414>

Reviewed by Timothy Hatcher.

* UserInterface/Views/TreeOutline.js:
(WI.TreeOutline.prototype.selectionControllerPreviousSelectableItem):
(WI.TreeOutline.prototype.selectionControllerNextSelectableItem):
Skip hidden items when traversing the tree.

* UserInterface/Views/DOMTreeOutline.js:
(WI.DOMTreeOutline.prototype.ondelete):
Reveal all items about to be deleted so that the above change won't skip any siblings.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (244434 => 244435)


--- trunk/Source/WebInspectorUI/ChangeLog	2019-04-18 21:12:59 UTC (rev 244434)
+++ trunk/Source/WebInspectorUI/ChangeLog	2019-04-18 21:20:09 UTC (rev 244435)
@@ -1,5 +1,22 @@
 2019-04-18  Devin Rousso  <[email protected]>
 
+        Web Inspector: REGRESSION (r244155): pressing down expands folders in trees
+        https://bugs.webkit.org/show_bug.cgi?id=197051
+        <rdar://problem/50006414>
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/TreeOutline.js:
+        (WI.TreeOutline.prototype.selectionControllerPreviousSelectableItem):
+        (WI.TreeOutline.prototype.selectionControllerNextSelectableItem):
+        Skip hidden items when traversing the tree.
+
+        * UserInterface/Views/DOMTreeOutline.js:
+        (WI.DOMTreeOutline.prototype.ondelete):
+        Reveal all items about to be deleted so that the above change won't skip any siblings.
+
+2019-04-18  Devin Rousso  <[email protected]>
+
         Web Inspector: Canvas: enable WebGL2 for inspector page
         https://bugs.webkit.org/show_bug.cgi?id=196932
         <rdar://problem/49916213>

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js (244434 => 244435)


--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js	2019-04-18 21:12:59 UTC (rev 244434)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js	2019-04-18 21:20:09 UTC (rev 244435)
@@ -313,6 +313,12 @@
             return false;
 
         this._treeElementsToRemove = this.selectedTreeElements;
+
+        // Reveal all of the elements being deleted so that if the node is hidden (e.g. the parent
+        // is collapsed), we can select its siblings instead of the parent itself.
+        for (let treeElement of this._treeElementsToRemove)
+            treeElement.reveal();
+
         this._selectionController.removeSelectedItems();
 
         let levelMap = new Map;
@@ -335,12 +341,12 @@
 
         // Track removed elements, since the opening and closing tags for the
         // same WI.DOMNode can both be selected.
-        let removedTreeElements = new Set;
+        let removedDOMNodes = new Set;
 
         for (let treeElement of this._treeElementsToRemove) {
-            if (removedTreeElements.has(treeElement))
+            if (removedDOMNodes.has(treeElement.representedObject))
                 continue;
-            removedTreeElements.add(treeElement)
+            removedDOMNodes.add(treeElement.representedObject);
             treeElement.remove();
         }
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js (244434 => 244435)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js	2019-04-18 21:12:59 UTC (rev 244434)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js	2019-04-18 21:20:09 UTC (rev 244435)
@@ -855,7 +855,7 @@
         if (!treeElement)
             return null;
 
-        const skipUnrevealed = false;
+        const skipUnrevealed = true;
         const stayWithin = null;
         const dontPopulate = true;
 
@@ -874,7 +874,7 @@
         if (!treeElement)
             return null;
 
-        const skipUnrevealed = false;
+        const skipUnrevealed = true;
         const stayWithin = null;
         const dontPopulate = true;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to