Changeset 250855 in webkit


Ignore:
Timestamp:
Oct 8, 2019 1:15:15 PM (4 years ago)
Author:
Devin Rousso
Message:

Web Inspector: Canvas: unable to click on overview path component when jumping directly to a shader
https://bugs.webkit.org/show_bug.cgi?id=202682

Reviewed by Matt Baker.

  • UserInterface/Views/CanvasTabContentView.js:

(WI.CanvasTabContentView):
The WI.TreeOutline used for the hierarchical path components is actually held by the
Canvas Tab, not the Canvas navigation sidebar panel. As a result, if the hierarchical path
is changed by anything other than the hierarchical path itself (e.g. a selection in the
navigation sidebar, or clicking on the [gl] shader or [o_o] recording buttons in the
overview preview tile), the selection state of the WI.TreeOutline can get out of sync. In
this case, the WI.TreeOutline still thinks that "Overview" is selected because the change
in content view was triggered by something unrelated to the WI.TreeOutline (see above for
specific examples). The simple solution is to just allow repeat selection, as this is only
an issue here because the canvas navigation sidebar isn't always visible, as well as to
allow the "Overview" to be listed as the root path item.

  • UserInterface/Views/CanvasSidebarPanel.js:

(WI.CanvasSidebarPanel.prototype.updateRepresentedObjects):
If a WI.Canvas is one of the current represented objects, attempt to select it, even if
it matches the currently shown WI.Canvas. This covers the situation where the WI.Canvas
is selected via its hierarchical path component, ensuring that the selected item in the
navigation sidebar always matches the hierarchical path components.

Location:
trunk/Source/WebInspectorUI
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r250854 r250855  
     12019-10-08  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: Canvas: unable to click on overview path component when jumping directly to a shader
     4        https://bugs.webkit.org/show_bug.cgi?id=202682
     5
     6        Reviewed by Matt Baker.
     7
     8        * UserInterface/Views/CanvasTabContentView.js:
     9        (WI.CanvasTabContentView):
     10        The `WI.TreeOutline` used for the hierarchical path components is actually held by the
     11        Canvas Tab, not the Canvas navigation sidebar panel. As a result, if the hierarchical path
     12        is changed by anything other than the hierarchical path itself (e.g. a selection in the
     13        navigation sidebar, or clicking on the [gl] shader or [o_o] recording buttons in the
     14        overview preview tile), the selection state of the `WI.TreeOutline` can get out of sync. In
     15        this case, the `WI.TreeOutline` still thinks that "Overview" is selected because the change
     16        in content view was triggered by something unrelated to the `WI.TreeOutline` (see above for
     17        specific examples). The simple solution is to just allow repeat selection, as this is only
     18        an issue here because the canvas navigation sidebar isn't always visible, as well as to
     19        allow the "Overview" to be listed as the root path item.
     20
     21        * UserInterface/Views/CanvasSidebarPanel.js:
     22        (WI.CanvasSidebarPanel.prototype.updateRepresentedObjects):
     23        If a `WI.Canvas` is one of the current represented objects, attempt to select it, even if
     24        it matches the currently shown `WI.Canvas`. This covers the situation where the `WI.Canvas`
     25        is selected via its hierarchical path component, ensuring that the selected item in the
     26        navigation sidebar always matches the hierarchical path components.
     27
    1282019-10-08  Devin Rousso  <drousso@apple.com>
    229
  • trunk/Source/WebInspectorUI/UserInterface/Views/CanvasSidebarPanel.js

    r244908 r250855  
    175175        if (canvas) {
    176176            this.canvas = canvas;
     177            let treeElement = this._canvasTreeOutline.findTreeElement(canvas);
     178            const omitFocus = false;
     179            const selectedByUser = false;
     180            treeElement.revealAndSelect(omitFocus, selectedByUser);
    177181            return;
    178182        }
  • trunk/Source/WebInspectorUI/UserInterface/Views/CanvasTabContentView.js

    r244560 r250855  
    4040
    4141        this._canvasTreeOutline = new WI.TreeOutline;
     42        this._canvasTreeOutline.allowsRepeatSelection = true;
    4243        this._canvasTreeOutline.addEventListener(WI.TreeOutline.Event.SelectionDidChange, this._canvasTreeOutlineSelectionDidChange, this);
    4344
Note: See TracChangeset for help on using the changeset viewer.