Changeset 186368 in webkit


Ignore:
Timestamp:
Jul 6, 2015, 12:44:23 PM (10 years ago)
Author:
timothy@apple.com
Message:

Web Inspector: Add a dedicated Network tab that is always live
https://bugs.webkit.org/show_bug.cgi?id=146568

Source/WebCore:

Make sure the executionStopwatch is always started and never stops so resource loads
always get timestamps, even when Timeline is not recording.

Reviewed by Joseph Pecoraro.

  • inspector/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::enable): Start executionStopwatch.
(WebCore::InspectorPageAgent::frameStartedLoading): Reset and start executionStopwatch.

  • inspector/InspectorTimelineAgent.cpp:

(WebCore::InspectorTimelineAgent::internalStart): Removed executionStopwatch code.
(WebCore::InspectorTimelineAgent::internalStop): Ditto.

Source/WebInspectorUI:

Reviewed by Joseph Pecoraro.

  • Localizations/en.lproj/localizedStrings.js: Updated.
  • UserInterface/Base/Main.js:

(WebInspector.loaded):
(WebInspector.isTabTypeAllowed):
(WebInspector._tabContentViewForType):
(WebInspector._updateNewTabButtonState):
Add NetworkTabContentView to the right places.

  • UserInterface/Controllers/TimelineManager.js:

(WebInspector.TimelineManager):
(WebInspector.TimelineManager.prototype.get persistentNetworkTimeline):
(WebInspector.TimelineManager.prototype._mainResourceDidChange):
(WebInspector.TimelineManager.prototype._resourceWasAdded):
Add a persistent network timeline that always has all resources.

  • UserInterface/Images/Network.svg: Added.
  • UserInterface/Main.html: Added new files.
  • UserInterface/Views/NavigationSidebarPanel.css:

(.sidebar > .panel.navigation > .content):
Drive-by fix. The bottom was off by one. This caused misalignment between sidebar and content view when
scrolled all the way to the bottom of the content view.

  • UserInterface/Views/NetworkGridContentView.css: Added.

(.content-view.network-grid > .data-grid):
(.content-view.network-grid > .data-grid th):
(.content-view.network-grid > .data-grid td):
(.content-view.network-grid > .data-grid table.data):
Mostly copied from TimelineView.css and NetworkTimelineView.css.

  • UserInterface/Views/NetworkGridContentView.js: Added.

(WebInspector.NetworkGridContentView):
(WebInspector.NetworkGridContentView.prototype.get navigationSidebarTreeOutline):
(WebInspector.NetworkGridContentView.prototype.get selectionPathComponents):
(WebInspector.NetworkGridContentView.prototype.get zeroTime):
(WebInspector.NetworkGridContentView.prototype.shown):
(WebInspector.NetworkGridContentView.prototype.hidden):
(WebInspector.NetworkGridContentView.prototype.closed):
(WebInspector.NetworkGridContentView.prototype.updateLayout):
(WebInspector.NetworkGridContentView.prototype.needsLayout):
(WebInspector.NetworkGridContentView.prototype.reset):
(WebInspector.NetworkGridContentView.prototype._processPendingRecords):
(WebInspector.NetworkGridContentView.prototype._networkTimelineReset):
(WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
(WebInspector.NetworkGridContentView.prototype._treeElementPathComponentSelected):
(WebInspector.NetworkGridContentView.prototype._dataGridNodeSelected):
Mostly copied from NetworkTimelineView.

  • UserInterface/Views/NetworkSidebarPanel.css: Added.

(.sidebar > .panel.navigation.network > :matches(.content, .empty-content-placeholder)):
(.sidebar > .panel.navigation.network > .navigation-bar):
(.sidebar > .panel.navigation.network > .title-bar):
(.sidebar > .panel.navigation.network.network-grid-content-view-showing > .content):
(.sidebar > .panel.navigation.network .item:hover:not(.selected) .status .close.status-button):
(.sidebar > .panel.navigation.network:not(.network-grid-content-view-showing) .status .go-to-arrow.status-button):
(.sidebar > .panel.navigation.network.network-grid-content-view-showing .status .close.status-button):
(.sidebar > .panel.navigation.network.network-grid-content-view-showing .navigation-sidebar-panel-content-tree-outline.network-grid .item .subtitle):
(.sidebar > .panel.navigation.network > .content > .navigation-sidebar-panel-content-tree-outline):
(.sidebar > .panel.navigation.network.network-grid-content-view-showing > .content > .navigation-sidebar-panel-content-tree-outline):
Mostly copied from TimelineSidebarPanel.css and NetworkTimelineView.css.

  • UserInterface/Views/NetworkSidebarPanel.js: Added.

(WebInspector.NetworkSidebarPanel):
(WebInspector.NetworkSidebarPanel.prototype.closed):
(WebInspector.NetworkSidebarPanel.prototype.showDefaultContentView):
(WebInspector.NetworkSidebarPanel.prototype.saveStateToCookie):
(WebInspector.NetworkSidebarPanel.prototype.restoreStateFromCookie):
(WebInspector.NetworkSidebarPanel.prototype.hasCustomFilters):
(WebInspector.NetworkSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
(WebInspector.NetworkSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
(WebInspector.NetworkSidebarPanel.prototype.treeElementAddedOrChanged):
(WebInspector.NetworkSidebarPanel.prototype._networkTimelineReset):
(WebInspector.NetworkSidebarPanel.prototype._contentBrowserCurrentContentViewDidChange):
(WebInspector.NetworkSidebarPanel.prototype._treeElementGoToArrowWasClicked):
(WebInspector.NetworkSidebarPanel.prototype._treeElementCloseButtonClicked):
(WebInspector.NetworkSidebarPanel.prototype._canShowDifferentContentView):
(WebInspector.NetworkSidebarPanel.prototype._treeElementSelected):
(WebInspector.NetworkSidebarPanel.prototype._scopeBarSelectionDidChange):
A hybrid of ResourceSidebarPanel and TimelineSidebarPanel.

  • UserInterface/Views/NetworkTabContentView.js: Added.

(WebInspector.NetworkTabContentView):
(WebInspector.NetworkTabContentView.prototype.get type):
(WebInspector.NetworkTabContentView.prototype.canShowRepresentedObject):

  • UserInterface/Views/NewTabContentView.js:

(WebInspector.NewTabContentView): Add Network tab and sort the tabs by their localized name.

  • UserInterface/Views/TabBar.js:

(WebInspector.TabBar.prototype._handleNewTabClick):
Drive-by fix. Don't fire the click event if the new tab button is disabled.

Location:
trunk/Source
Files:
6 added
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r186367 r186368  
     12015-07-04  Timothy Hatcher  <timothy@apple.com>
     2
     3        Web Inspector: Add a dedicated Network tab that is always live
     4        https://bugs.webkit.org/show_bug.cgi?id=146568
     5
     6        Make sure the executionStopwatch is always started and never stops so resource loads
     7        always get timestamps, even when Timeline is not recording.
     8
     9        Reviewed by Joseph Pecoraro.
     10
     11        * inspector/InspectorPageAgent.cpp:
     12        (WebCore::InspectorPageAgent::enable): Start executionStopwatch.
     13        (WebCore::InspectorPageAgent::frameStartedLoading): Reset and start executionStopwatch.
     14        * inspector/InspectorTimelineAgent.cpp:
     15        (WebCore::InspectorTimelineAgent::internalStart): Removed executionStopwatch code.
     16        (WebCore::InspectorTimelineAgent::internalStop): Ditto.
     17
    1182015-07-02  Timothy Hatcher  <timothy@apple.com>
    219
  • trunk/Source/WebCore/inspector/InspectorPageAgent.cpp

    r186279 r186368  
    368368    m_instrumentingAgents->setInspectorPageAgent(this);
    369369
     370    m_instrumentingAgents->inspectorEnvironment().executionStopwatch()->start();
     371
    370372    if (Frame* frame = mainFrame())
    371373        m_originalScriptExecutionDisabled = !frame->settings().isScriptEnabled();
     
    820822void InspectorPageAgent::frameStartedLoading(Frame& frame)
    821823{
     824    if (frame.isMainFrame()) {
     825        auto stopwatch = m_instrumentingAgents->inspectorEnvironment().executionStopwatch();
     826        stopwatch->reset();
     827        stopwatch->start();
     828    }
     829
    822830    m_frontendDispatcher->frameStartedLoading(frameId(&frame));
    823831}
  • trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp

    r186279 r186368  
    141141        m_maxCallStackDepth = 5;
    142142
    143     // If the debugger is paused the environment's stopwatch will be stopped, and shouldn't be
    144     // restarted until the debugger continues.
    145     if (!m_scriptDebugServer->isPaused())
    146         m_instrumentingAgents->inspectorEnvironment().executionStopwatch()->start();
    147 
    148143    m_instrumentingAgents->setInspectorTimelineAgent(this);
    149144
     
    198193    if (!m_enabled)
    199194        return;
    200 
    201     // The environment's stopwatch could be already stopped if the debugger has paused.
    202     auto stopwatch = m_instrumentingAgents->inspectorEnvironment().executionStopwatch();
    203     if (stopwatch->isActive())
    204         stopwatch->stop();
    205195
    206196    m_instrumentingAgents->setInspectorTimelineAgent(nullptr);
  • trunk/Source/WebInspectorUI/ChangeLog

    r186354 r186368  
     12015-07-02  Timothy Hatcher  <timothy@apple.com>
     2
     3        Web Inspector: Add a dedicated Network tab that is always live
     4        https://bugs.webkit.org/show_bug.cgi?id=146568
     5
     6        Reviewed by Joseph Pecoraro.
     7
     8        * Localizations/en.lproj/localizedStrings.js: Updated.
     9
     10        * UserInterface/Base/Main.js:
     11        (WebInspector.loaded):
     12        (WebInspector.isTabTypeAllowed):
     13        (WebInspector._tabContentViewForType):
     14        (WebInspector._updateNewTabButtonState):
     15        Add NetworkTabContentView to the right places.
     16
     17        * UserInterface/Controllers/TimelineManager.js:
     18        (WebInspector.TimelineManager):
     19        (WebInspector.TimelineManager.prototype.get persistentNetworkTimeline):
     20        (WebInspector.TimelineManager.prototype._mainResourceDidChange):
     21        (WebInspector.TimelineManager.prototype._resourceWasAdded):
     22        Add a persistent network timeline that always has all resources.
     23
     24        * UserInterface/Images/Network.svg: Added.
     25
     26        * UserInterface/Main.html: Added new files.
     27
     28        * UserInterface/Views/NavigationSidebarPanel.css:
     29        (.sidebar > .panel.navigation > .content):
     30        Drive-by fix. The bottom was off by one. This caused misalignment between sidebar and content view when
     31        scrolled all the way to the bottom of the content view.
     32
     33        * UserInterface/Views/NetworkGridContentView.css: Added.
     34        (.content-view.network-grid > .data-grid):
     35        (.content-view.network-grid > .data-grid th):
     36        (.content-view.network-grid > .data-grid td):
     37        (.content-view.network-grid > .data-grid table.data):
     38        Mostly copied from TimelineView.css and NetworkTimelineView.css.
     39
     40        * UserInterface/Views/NetworkGridContentView.js: Added.
     41        (WebInspector.NetworkGridContentView):
     42        (WebInspector.NetworkGridContentView.prototype.get navigationSidebarTreeOutline):
     43        (WebInspector.NetworkGridContentView.prototype.get selectionPathComponents):
     44        (WebInspector.NetworkGridContentView.prototype.get zeroTime):
     45        (WebInspector.NetworkGridContentView.prototype.shown):
     46        (WebInspector.NetworkGridContentView.prototype.hidden):
     47        (WebInspector.NetworkGridContentView.prototype.closed):
     48        (WebInspector.NetworkGridContentView.prototype.updateLayout):
     49        (WebInspector.NetworkGridContentView.prototype.needsLayout):
     50        (WebInspector.NetworkGridContentView.prototype.reset):
     51        (WebInspector.NetworkGridContentView.prototype._processPendingRecords):
     52        (WebInspector.NetworkGridContentView.prototype._networkTimelineReset):
     53        (WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
     54        (WebInspector.NetworkGridContentView.prototype._treeElementPathComponentSelected):
     55        (WebInspector.NetworkGridContentView.prototype._dataGridNodeSelected):
     56        Mostly copied from NetworkTimelineView.
     57
     58        * UserInterface/Views/NetworkSidebarPanel.css: Added.
     59        (.sidebar > .panel.navigation.network > :matches(.content, .empty-content-placeholder)):
     60        (.sidebar > .panel.navigation.network > .navigation-bar):
     61        (.sidebar > .panel.navigation.network > .title-bar):
     62        (.sidebar > .panel.navigation.network.network-grid-content-view-showing > .content):
     63        (.sidebar > .panel.navigation.network .item:hover:not(.selected) .status .close.status-button):
     64        (.sidebar > .panel.navigation.network:not(.network-grid-content-view-showing) .status .go-to-arrow.status-button):
     65        (.sidebar > .panel.navigation.network.network-grid-content-view-showing .status .close.status-button):
     66        (.sidebar > .panel.navigation.network.network-grid-content-view-showing .navigation-sidebar-panel-content-tree-outline.network-grid .item .subtitle):
     67        (.sidebar > .panel.navigation.network > .content > .navigation-sidebar-panel-content-tree-outline):
     68        (.sidebar > .panel.navigation.network.network-grid-content-view-showing > .content > .navigation-sidebar-panel-content-tree-outline):
     69        Mostly copied from TimelineSidebarPanel.css and NetworkTimelineView.css.
     70
     71        * UserInterface/Views/NetworkSidebarPanel.js: Added.
     72        (WebInspector.NetworkSidebarPanel):
     73        (WebInspector.NetworkSidebarPanel.prototype.closed):
     74        (WebInspector.NetworkSidebarPanel.prototype.showDefaultContentView):
     75        (WebInspector.NetworkSidebarPanel.prototype.saveStateToCookie):
     76        (WebInspector.NetworkSidebarPanel.prototype.restoreStateFromCookie):
     77        (WebInspector.NetworkSidebarPanel.prototype.hasCustomFilters):
     78        (WebInspector.NetworkSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
     79        (WebInspector.NetworkSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
     80        (WebInspector.NetworkSidebarPanel.prototype.treeElementAddedOrChanged):
     81        (WebInspector.NetworkSidebarPanel.prototype._networkTimelineReset):
     82        (WebInspector.NetworkSidebarPanel.prototype._contentBrowserCurrentContentViewDidChange):
     83        (WebInspector.NetworkSidebarPanel.prototype._treeElementGoToArrowWasClicked):
     84        (WebInspector.NetworkSidebarPanel.prototype._treeElementCloseButtonClicked):
     85        (WebInspector.NetworkSidebarPanel.prototype._canShowDifferentContentView):
     86        (WebInspector.NetworkSidebarPanel.prototype._treeElementSelected):
     87        (WebInspector.NetworkSidebarPanel.prototype._scopeBarSelectionDidChange):
     88        A hybrid of ResourceSidebarPanel and TimelineSidebarPanel.
     89
     90        * UserInterface/Views/NetworkTabContentView.js: Added.
     91        (WebInspector.NetworkTabContentView):
     92        (WebInspector.NetworkTabContentView.prototype.get type):
     93        (WebInspector.NetworkTabContentView.prototype.canShowRepresentedObject):
     94
     95        * UserInterface/Views/NewTabContentView.js:
     96        (WebInspector.NewTabContentView): Add Network tab and sort the tabs by their localized name.
     97
     98        * UserInterface/Views/TabBar.js:
     99        (WebInspector.TabBar.prototype._handleNewTabClick):
     100        Drive-by fix. Don't fire the click event if the new tab button is disabled.
     101
    11022015-07-06  Nikita Vasilyev  <nvasilyev@apple.com>
    2103
  • trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js

    r186133 r186368  
    321321localizedStrings["Mixed"] = "Mixed";
    322322localizedStrings["Name"] = "Name";
     323localizedStrings["Network"] = "Network";
    323324localizedStrings["Network Issue"] = "Network Issue";
    324325localizedStrings["Network Requests"] = "Network Requests";
  • trunk/Source/WebInspectorUI/UserInterface/Base/Main.js

    r185968 r186368  
    147147    this._splitConsoleHeightSetting = new WebInspector.Setting("split-console-height", 150);
    148148
    149     this._openTabsSetting = new WebInspector.Setting("open-tabs", ["elements", "resources", "timeline", "debugger", "storage", "console"]);
     149    this._openTabsSetting = new WebInspector.Setting("open-tab-types", ["elements", "network", "resources", "timeline", "debugger", "storage", "console"]);
    150150    this._selectedTabIndexSetting = new WebInspector.Setting("selected-tab-index", 0);
    151151
     
    384384    case WebInspector.ElementsTabContentView.Type:
    385385        return !!window.DOMAgent;
     386    case WebInspector.NetworkTabContentView.Type:
     387        return !!window.NetworkAgent && !!window.PageAgent;
    386388    case WebInspector.StorageTabContentView.Type:
    387389        return !!window.DOMStorageAgent || !!window.DatabaseAgent || !!window.IndexedDBAgent;
     
    402404    case WebInspector.ElementsTabContentView.Type:
    403405        return new WebInspector.ElementsTabContentView;
     406    case WebInspector.NetworkTabContentView.Type:
     407        return new WebInspector.NetworkTabContentView;
    404408    case WebInspector.NewTabContentView.Type:
    405409        return new WebInspector.NewTabContentView;
     
    440444    var newTabAllowed = this.isNewTabWithTypeAllowed(WebInspector.ConsoleTabContentView.Type) || this.isNewTabWithTypeAllowed(WebInspector.ElementsTabContentView.Type)
    441445        || this.isNewTabWithTypeAllowed(WebInspector.ResourcesTabContentView.Type) || this.isNewTabWithTypeAllowed(WebInspector.StorageTabContentView.Type)
    442         || this.isNewTabWithTypeAllowed(WebInspector.TimelineTabContentView.Type) || this.isNewTabWithTypeAllowed(WebInspector.DebuggerTabContentView.Type);
     446        || this.isNewTabWithTypeAllowed(WebInspector.TimelineTabContentView.Type) || this.isNewTabWithTypeAllowed(WebInspector.DebuggerTabContentView.Type)
     447        || this.isNewTabWithTypeAllowed(WebInspector.NetworkTabContentView.Type);
    443448    this.tabBar.newTabItem.disabled = !newTabAllowed;
    444449};
  • trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js

    r186133 r186368  
    3434        WebInspector.Frame.addEventListener(WebInspector.Frame.Event.ResourceWasAdded, this._resourceWasAdded, this);
    3535
     36        this._persistentNetworkTimeline = new WebInspector.NetworkTimeline;
     37
    3638        this._isCapturing = false;
    3739        this._isCapturingPageReload = false;
     
    6163        console.assert(this._activeRecording || !this._isCapturing);
    6264        return this._activeRecording;
     65    }
     66
     67    get persistentNetworkTimeline()
     68    {
     69        return this._persistentNetworkTimeline;
    6370    }
    6471
     
    550557    _mainResourceDidChange(event)
    551558    {
     559        if (event.target.isMainFrame())
     560            this._persistentNetworkTimeline.reset();
     561
     562        var mainResource = event.target.mainResource;
     563        var record = new WebInspector.ResourceTimelineRecord(mainResource);
     564        if (!isNaN(record.startTime))
     565            this._persistentNetworkTimeline.addRecord(record);
     566
    552567        // Ignore resource events when there isn't a main frame yet. Those events are triggered by
    553568        // loading the cached resources when the inspector opens, and they do not have timing information.
     
    561576            return;
    562577
    563         var mainResource = event.target.mainResource;
    564578        if (mainResource === this._autoCapturingMainResource)
    565579            return;
    566580
    567         this._addRecord(new WebInspector.ResourceTimelineRecord(mainResource));
     581        this._addRecord(record);
    568582    }
    569583
    570584    _resourceWasAdded(event)
    571585    {
     586        var record = new WebInspector.ResourceTimelineRecord(event.data.resource);
     587        if (!isNaN(record.startTime))
     588            this._persistentNetworkTimeline.addRecord(record);
     589
    572590        // Ignore resource events when there isn't a main frame yet. Those events are triggered by
    573591        // loading the cached resources when the inspector opens, and they do not have timing information.
     
    578596            return;
    579597
    580         this._addRecord(new WebInspector.ResourceTimelineRecord(event.data.resource));
     598        this._addRecord(record);
    581599    }
    582600};
  • trunk/Source/WebInspectorUI/UserInterface/Main.html

    r186217 r186368  
    101101    <link rel="stylesheet" href="Views/NavigationBar.css">
    102102    <link rel="stylesheet" href="Views/NavigationSidebarPanel.css">
     103    <link rel="stylesheet" href="Views/NetworkGridContentView.css">
     104    <link rel="stylesheet" href="Views/NetworkSidebarPanel.css">
    103105    <link rel="stylesheet" href="Views/NetworkTimelineOverviewGraph.css">
    104106    <link rel="stylesheet" href="Views/NetworkTimelineView.css">
     
    344346    <script src="Views/FolderTreeElement.js"></script>
    345347    <script src="Views/FolderizedTreeElement.js"></script>
     348    <script src="Views/NetworkTabContentView.js"></script>
    346349    <script src="Views/NewTabContentView.js"></script>
    347350    <script src="Views/ObjectTreeBaseTreeElement.js"></script>
     
    461464    <script src="Views/MultipleScopeBarItem.js"></script>
    462465    <script src="Views/NavigationBar.js"></script>
     466    <script src="Views/NetworkGridContentView.js"></script>
     467    <script src="Views/NetworkSidebarPanel.js"></script>
    463468    <script src="Views/NetworkTimelineOverviewGraph.js"></script>
    464469    <script src="Views/NetworkTimelineView.js"></script>
  • trunk/Source/WebInspectorUI/UserInterface/Models/Timeline.js

    r186119 r186368  
    107107        this._endTime = NaN;
    108108
    109         if (!suppressEvents)
     109        if (!suppressEvents) {
    110110            this.dispatchEventToListeners(WebInspector.Timeline.Event.TimesUpdated);
     111            this.dispatchEventToListeners(WebInspector.Timeline.Event.Reset);
     112        }
    111113    }
    112114
     
    155157
    156158WebInspector.Timeline.Event = {
     159    Reset: "timeline-reset",
    157160    RecordAdded: "timeline-record-added",
    158161    TimesUpdated: "timeline-times-updated"
  • trunk/Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.css

    r186302 r186368  
    2525
    2626.sidebar > .panel.navigation > .content {
    27     bottom: 28px;
     27    bottom: 29px;
    2828}
    2929
  • trunk/Source/WebInspectorUI/UserInterface/Views/NewTabContentView.js

    r184971 r186368  
    3131
    3232    var allowedNewTabs = [
     33        {image: "Images/Console.svg", title: WebInspector.UIString("Console"), type: WebInspector.ConsoleTabContentView.Type},
     34        {image: "Images/Debugger.svg", title: WebInspector.UIString("Debugger"), type: WebInspector.DebuggerTabContentView.Type},
    3335        {image: "Images/Elements.svg", title: WebInspector.UIString("Elements"), type: WebInspector.ElementsTabContentView.Type},
     36        {image: "Images/Network.svg", title: WebInspector.UIString("Network"), type: WebInspector.NetworkTabContentView.Type},
    3437        {image: "Images/Resources.svg", title: WebInspector.UIString("Resources"), type: WebInspector.ResourcesTabContentView.Type},
    35         {image: "Images/Timeline.svg", title: WebInspector.UIString("Timelines"), type: WebInspector.TimelineTabContentView.Type},
    36         {image: "Images/Debugger.svg", title: WebInspector.UIString("Debugger"), type: WebInspector.DebuggerTabContentView.Type},
    3738        {image: "Images/Storage.svg", title: WebInspector.UIString("Storage"), type: WebInspector.StorageTabContentView.Type},
    38         {image: "Images/Console.svg", title: WebInspector.UIString("Console"), type: WebInspector.ConsoleTabContentView.Type}
     39        {image: "Images/Timeline.svg", title: WebInspector.UIString("Timelines"), type: WebInspector.TimelineTabContentView.Type}
    3940    ];
     41
     42    allowedNewTabs.sort(function(a, b) { return a.title.localeCompare(b.title); });
    4043
    4144    for (var info of allowedNewTabs) {
  • trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.js

    r185236 r186368  
    732732    }
    733733
    734     _handleNewTabClick(event) {
     734    _handleNewTabClick(event)
     735    {
     736        if (this._newTabItem.disabled)
     737            return;
    735738        this.dispatchEventToListeners(WebInspector.TabBar.Event.NewTabItemClicked);
    736739    }
Note: See TracChangeset for help on using the changeset viewer.