Changeset 221174 in webkit


Ignore:
Timestamp:
Aug 24, 2017 5:57:42 PM (7 years ago)
Author:
webkit@devinrousso.com
Message:

Web Inspector: add filter for draw actions in Recordings
https://bugs.webkit.org/show_bug.cgi?id=175448
<rdar://problem/34040764>

Reviewed by Matt Baker.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Views/RecordingNavigationSidebarPanel.js:

(WI.RecordingNavigationSidebarPanel.prototype.initialLayout):
(WI.RecordingNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
Add button to filter visual actions.
Drive-by fix: ensure that frame folders are still visible when filtering.

  • UserInterface/Images/Paint.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/PaintFlashing.svg.
  • UserInterface/Images/gtk/Paint.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/gtk/PaintFlashing.svg.
  • UserInterface/Views/DOMTreeContentView.js:

(WI.DOMTreeContentView):
Rename PaintFlashing.svg to Paint.svg.

Location:
trunk/Source/WebInspectorUI
Files:
4 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r221166 r221174  
     12017-08-24  Devin Rousso  <webkit@devinrousso.com>
     2
     3        Web Inspector: add filter for draw actions in Recordings
     4        https://bugs.webkit.org/show_bug.cgi?id=175448
     5        <rdar://problem/34040764>
     6
     7        Reviewed by Matt Baker.
     8
     9        * Localizations/en.lproj/localizedStrings.js:
     10       
     11        * UserInterface/Views/RecordingNavigationSidebarPanel.js:
     12        (WI.RecordingNavigationSidebarPanel.prototype.initialLayout):
     13        (WI.RecordingNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
     14        Add button to filter visual actions.
     15        Drive-by fix: ensure that frame folders are still visible when filtering.
     16
     17        * UserInterface/Images/Paint.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/PaintFlashing.svg.
     18        * UserInterface/Images/gtk/Paint.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/gtk/PaintFlashing.svg.
     19        * UserInterface/Views/DOMTreeContentView.js:
     20        (WI.DOMTreeContentView):
     21        Rename PaintFlashing.svg to Paint.svg.
     22
    1232017-08-24  Ross Kirsling  <ross.kirsling@sony.com>
    224
  • trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js

    r221166 r221174  
    609609localizedStrings["Online"] = "Online";
    610610localizedStrings["Only show resources with issues"] = "Only show resources with issues";
     611localizedStrings["Only show visual actions"] = "Only show visual actions";
    611612localizedStrings["Opacity"] = "Opacity";
    612613localizedStrings["Open"] = "Open";
     
    792793localizedStrings["Show Scope Chain on pause"] = "Show Scope Chain on pause";
    793794localizedStrings["Show Source"] = "Show Source";
     795localizedStrings["Show all actions"] = "Show all actions";
    794796localizedStrings["Show all resources"] = "Show all resources";
    795797localizedStrings["Show compositing borders"] = "Show compositing borders";
  • trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js

    r220119 r221174  
    3737
    3838        WI.showPaintRectsSetting.addEventListener(WI.Setting.Event.Changed, this._showPaintRectsSettingChanged, this);
    39         this._paintFlashingButtonNavigationItem = new WI.ActivateButtonNavigationItem("paint-flashing", WI.UIString("Enable paint flashing"), WI.UIString("Disable paint flashing"), "Images/PaintFlashing.svg", 16, 16);
     39        this._paintFlashingButtonNavigationItem = new WI.ActivateButtonNavigationItem("paint-flashing", WI.UIString("Enable paint flashing"), WI.UIString("Disable paint flashing"), "Images/Paint.svg", 16, 16);
    4040        this._paintFlashingButtonNavigationItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, this._togglePaintFlashing, this);
    4141        this._paintFlashingButtonNavigationItem.enabled = !!PageAgent.setShowPaintRects;
  • trunk/Source/WebInspectorUI/UserInterface/Views/RecordingNavigationSidebarPanel.js

    r220609 r221174  
    141141        const element = null;
    142142        this.addSubview(new WI.NavigationBar(element, [importNavigationItem, exportNavigationItem]));
     143
     144        let filterFunction = (treeElement) => {
     145            if (!(treeElement instanceof WI.RecordingActionTreeElement))
     146                return false;
     147
     148            return treeElement.representedObject.isVisual;
     149        };
     150
     151        const activatedByDefault = false;
     152        const defaultToolTip = WI.UIString("Only show visual actions");
     153        const activatedToolTip = WI.UIString("Show all actions");
     154        this.filterBar.addFilterBarButton("recording-show-visual-only", filterFunction, activatedByDefault, defaultToolTip, activatedToolTip, "Images/Paint.svg", 15, 15);
     155    }
     156
     157    matchTreeElementAgainstCustomFilters(treeElement)
     158    {
     159        // Keep recording frame tree elements.
     160        if (treeElement instanceof WI.FolderTreeElement)
     161            return true;
     162
     163        return super.matchTreeElementAgainstCustomFilters(treeElement);
    143164    }
    144165
Note: See TracChangeset for help on using the changeset viewer.