Changeset 242244 in webkit


Ignore:
Timestamp:
Feb 28, 2019 5:11:56 PM (5 years ago)
Author:
Devin Rousso
Message:

Web Inspector: Timelines: don't show the auto-stop UI when not inspecting a page
https://bugs.webkit.org/show_bug.cgi?id=195192

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/TimelineRecordingContentView.js:

(WI.TimelineRecordingContentView):
(WI.TimelineRecordingContentView.prototype.get navigationItems):

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r242243 r242244  
     12019-02-28  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: Timelines: don't show the auto-stop UI when not inspecting a page
     4        https://bugs.webkit.org/show_bug.cgi?id=195192
     5
     6        Reviewed by Joseph Pecoraro.
     7
     8        * UserInterface/Views/TimelineRecordingContentView.js:
     9        (WI.TimelineRecordingContentView):
     10        (WI.TimelineRecordingContentView.prototype.get navigationItems):
     11
    1122019-02-28  Joseph Pecoraro  <pecoraro@apple.com>
    213
  • trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js

    r242194 r242244  
    5757        this.addSubview(this._timelineContentBrowser);
    5858
    59         this._autoStopCheckboxNavigationItem = new WI.CheckboxNavigationItem("auto-stop-recording", WI.UIString("Stop recording once page loads"), WI.settings.timelinesAutoStop.value);
    60         this._autoStopCheckboxNavigationItem.visibilityPriority = WI.NavigationItem.VisibilityPriority.Low;
    61         this._autoStopCheckboxNavigationItem.addEventListener(WI.CheckboxNavigationItem.Event.CheckedDidChange, this._handleAutoStopCheckboxCheckedDidChange, this);
    62 
    63         WI.settings.timelinesAutoStop.addEventListener(WI.Setting.Event.Changed, this._handleTimelinesAutoStopSettingChanged, this);
     59        if (WI.sharedApp.debuggableType === WI.DebuggableType.Web) {
     60            this._autoStopCheckboxNavigationItem = new WI.CheckboxNavigationItem("auto-stop-recording", WI.UIString("Stop recording once page loads"), WI.settings.timelinesAutoStop.value);
     61            this._autoStopCheckboxNavigationItem.visibilityPriority = WI.NavigationItem.VisibilityPriority.Low;
     62            this._autoStopCheckboxNavigationItem.addEventListener(WI.CheckboxNavigationItem.Event.CheckedDidChange, this._handleAutoStopCheckboxCheckedDidChange, this);
     63
     64            WI.settings.timelinesAutoStop.addEventListener(WI.Setting.Event.Changed, this._handleTimelinesAutoStopSettingChanged, this);
     65        }
    6466
    6567        this._clearTimelineNavigationItem = new WI.ButtonNavigationItem("clear-timeline", WI.UIString("Clear Timeline (%s)").format(WI.clearKeyboardShortcut.displayName), "Images/NavigationItemTrash.svg", 15, 15);
     
    162164    get navigationItems()
    163165    {
    164         return [
    165             this._autoStopCheckboxNavigationItem,
    166             new WI.DividerNavigationItem,
    167             this._clearTimelineNavigationItem,
    168         ];
     166        let navigationItems = [];
     167        if (this._autoStopCheckboxNavigationItem)
     168            navigationItems.push(this._autoStopCheckboxNavigationItem);
     169        navigationItems.push(new WI.DividerNavigationItem);
     170        navigationItems.push(this._clearTimelineNavigationItem);
     171        return navigationItems;
    169172    }
    170173
Note: See TracChangeset for help on using the changeset viewer.