Changeset 280037 in webkit


Ignore:
Timestamp:
Jul 19, 2021 11:06:51 AM (12 months ago)
Author:
Patrick Angle
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.

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r280035 r280037  
     12021-07-19  Patrick Angle  <pangle@apple.com>
     2
     3        Web Inspector: Elements: selecting a sibling node in the breadcrumb navigation doesn't do anything
     4        https://bugs.webkit.org/show_bug.cgi?id=227893
     5
     6        Reviewed by Devin Rousso.
     7
     8        The `WI.HierarchicalPathComponent.Event.Clicked` event is only fired when there are no sibling path components
     9        to select, therefor we must also listen for the `WI.HierarchicalPathComponent.Event.SiblingWasSelected` event to
     10        be able to then reveal and highlight the correct DOM node in the tree.
     11
     12        * UserInterface/Views/DOMTreeContentView.js:
     13        (WI.DOMTreeContentView.prototype.get selectionPathComponents):
     14        (WI.DOMTreeContentView.prototype._handlePathComponentSelected):
     15        Drive-by to match our style of `_handle*` event handler naming.
     16
    1172021-07-19  Patrick Angle  <pangle@apple.com>
    218
  • trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js

    r270134 r280037  
    182182
    183183            var pathComponent = new WI.DOMTreeElementPathComponent(treeElement, treeElement.representedObject);
    184             pathComponent.addEventListener(WI.HierarchicalPathComponent.Event.Clicked, this._pathComponentSelected, this);
     184            pathComponent.addEventListener(WI.HierarchicalPathComponent.Event.Clicked, this._handlePathComponentSelected, this);
     185            pathComponent.addEventListener(WI.HierarchicalPathComponent.Event.SiblingWasSelected, this._handlePathComponentSelected, this);
    185186            pathComponents.unshift(pathComponent);
    186187            treeElement = treeElement.parent;
     
    532533    }
    533534
    534     _pathComponentSelected(event)
     535    _handlePathComponentSelected(event)
    535536    {
    536537        if (!event.data.pathComponent)
Note: See TracChangeset for help on using the changeset viewer.