Title: [280037] trunk/Source/WebInspectorUI
Revision
280037
Author
pan...@apple.com
Date
2021-07-19 11:06:51 -0700 (Mon, 19 Jul 2021)

Log Message

Web Inspector: Elements: selecting a sibling node in the breadcrumb navigation doesn't do anything
https://bugs.webkit.org/show_bug.cgi?id=227893

Reviewed by Devin Rousso.

The `WI.HierarchicalPathComponent.Event.Clicked` event is only fired when there are no sibling path components
to select, therefor we must also listen for the `WI.HierarchicalPathComponent.Event.SiblingWasSelected` event to
be able to then reveal and highlight the correct DOM node in the tree.

* UserInterface/Views/DOMTreeContentView.js:
(WI.DOMTreeContentView.prototype.get selectionPathComponents):
(WI.DOMTreeContentView.prototype._handlePathComponentSelected):
Drive-by to match our style of `_handle*` event handler naming.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (280036 => 280037)


--- trunk/Source/WebInspectorUI/ChangeLog	2021-07-19 18:06:33 UTC (rev 280036)
+++ trunk/Source/WebInspectorUI/ChangeLog	2021-07-19 18:06:51 UTC (rev 280037)
@@ -1,5 +1,21 @@
 2021-07-19  Patrick Angle  <pan...@apple.com>
 
+        Web Inspector: Elements: selecting a sibling node in the breadcrumb navigation doesn't do anything
+        https://bugs.webkit.org/show_bug.cgi?id=227893
+
+        Reviewed by Devin Rousso.
+
+        The `WI.HierarchicalPathComponent.Event.Clicked` event is only fired when there are no sibling path components
+        to select, therefor we must also listen for the `WI.HierarchicalPathComponent.Event.SiblingWasSelected` event to
+        be able to then reveal and highlight the correct DOM node in the tree.
+
+        * UserInterface/Views/DOMTreeContentView.js:
+        (WI.DOMTreeContentView.prototype.get selectionPathComponents):
+        (WI.DOMTreeContentView.prototype._handlePathComponentSelected):
+        Drive-by to match our style of `_handle*` event handler naming.
+
+2021-07-19  Patrick Angle  <pan...@apple.com>
+
         Web Inspector: Add another Protocol Version (iOS 15.0)
         https://bugs.webkit.org/show_bug.cgi?id=228079
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js (280036 => 280037)


--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js	2021-07-19 18:06:33 UTC (rev 280036)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js	2021-07-19 18:06:51 UTC (rev 280037)
@@ -181,7 +181,8 @@
             }
 
             var pathComponent = new WI.DOMTreeElementPathComponent(treeElement, treeElement.representedObject);
-            pathComponent.addEventListener(WI.HierarchicalPathComponent.Event.Clicked, this._pathComponentSelected, this);
+            pathComponent.addEventListener(WI.HierarchicalPathComponent.Event.Clicked, this._handlePathComponentSelected, this);
+            pathComponent.addEventListener(WI.HierarchicalPathComponent.Event.SiblingWasSelected, this._handlePathComponentSelected, this);
             pathComponents.unshift(pathComponent);
             treeElement = treeElement.parent;
         }
@@ -531,7 +532,7 @@
         this.dispatchEventToListeners(WI.ContentView.Event.SelectionPathComponentsDidChange);
     }
 
-    _pathComponentSelected(event)
+    _handlePathComponentSelected(event)
     {
         if (!event.data.pathComponent)
             return;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to