Changeset 223921 in webkit


Ignore:
Timestamp:
Oct 24, 2017 2:17:17 PM (6 years ago)
Author:
webkit@devinrousso.com
Message:

Web Inspector: allow ShaderProgram to be shown in CanvasContentView
https://bugs.webkit.org/show_bug.cgi?id=178714

Reviewed by Brian Burg.

  • UserInterface/Views/CanvasDetailsSidebarPanel.js:

(WI.CanvasDetailsSidebarPanel.prototype.inspect):
Allow ShaderProgram to show the related Canvas information.

  • UserInterface/Views/CanvasTabContentView.js:

(WI.CanvasTabContentView.prototype.canShowRepresentedObject):
(WI.CanvasTabContentView.prototype.showRepresentedObject):
(WI.CanvasTabContentView.prototype._canvasTreeOutlineSelectionDidChange):
If a ShaderProgram is selected in the path component, display a ShaderProgramContentView.

Location:
trunk/Source/WebInspectorUI
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r223920 r223921  
     12017-10-24  Devin Rousso  <webkit@devinrousso.com>
     2
     3        Web Inspector: allow ShaderProgram to be shown in CanvasContentView
     4        https://bugs.webkit.org/show_bug.cgi?id=178714
     5
     6        Reviewed by Brian Burg.
     7
     8        * UserInterface/Views/CanvasDetailsSidebarPanel.js:
     9        (WI.CanvasDetailsSidebarPanel.prototype.inspect):
     10        Allow ShaderProgram to show the related Canvas information.
     11
     12        * UserInterface/Views/CanvasTabContentView.js:
     13        (WI.CanvasTabContentView.prototype.canShowRepresentedObject):
     14        (WI.CanvasTabContentView.prototype.showRepresentedObject):
     15        (WI.CanvasTabContentView.prototype._canvasTreeOutlineSelectionDidChange):
     16        If a ShaderProgram is selected in the path component, display a ShaderProgramContentView.
     17
    1182017-10-24  Devin Rousso  <webkit@devinrousso.com>
    219
  • trunk/Source/WebInspectorUI/UserInterface/Views/CanvasDetailsSidebarPanel.js

    r223011 r223921  
    4343            objects = [objects];
    4444
    45         objects = objects.map((object) => object instanceof WI.Recording ? object.source : object);
     45        objects = objects.map((object) => {
     46            if (object instanceof WI.Recording)
     47                return object.source;
     48            if (object instanceof WI.ShaderProgram)
     49                return object.canvas;
     50            return object;
     51        });
    4652
    4753        this.canvas = objects.find((object) => object instanceof WI.Canvas);
  • trunk/Source/WebInspectorUI/UserInterface/Views/CanvasTabContentView.js

    r223920 r223921  
    9191    canShowRepresentedObject(representedObject)
    9292    {
    93         return representedObject instanceof WI.CanvasCollection || representedObject instanceof WI.Recording;
     93        return representedObject instanceof WI.CanvasCollection
     94            || representedObject instanceof WI.Recording
     95            || representedObject instanceof WI.ShaderProgram;
    9496    }
    9597
     
    100102        this.navigationSidebarPanel.recording = null;
    101103
    102         if (representedObject instanceof WI.CanvasCollection) {
     104        if (representedObject instanceof WI.CanvasCollection || representedObject instanceof WI.ShaderProgram) {
    103105            this._overviewNavigationItem.hidden = true;
    104106            WI.navigationSidebar.collapsed = true;
     
    195197        if (this.canShowRepresentedObject(representedObject)) {
    196198            this.showRepresentedObject(representedObject);
    197             this._updateActionIndex(0);
     199
     200            if (representedObject instanceof WI.Recording)
     201                this._updateActionIndex(0);
    198202            return;
    199203        }
Note: See TracChangeset for help on using the changeset viewer.