Web Inspector: Network Tab - Turn on the new tab by default, remove the legacy networ...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Oct 2017 18:33:27 +0000 (18:33 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Oct 2017 18:33:27 +0000 (18:33 +0000)
https://bugs.webkit.org/show_bug.cgi?id=178559
<rdar://problem/34985503>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-10-20
Reviewed by Matt Baker.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Main.js:
(WI.contentLoaded):
* UserInterface/Base/Setting.js:
* UserInterface/Main.html:
* UserInterface/Views/LegacyNetworkSidebarPanel.css: Removed.
* UserInterface/Views/LegacyNetworkSidebarPanel.js: Removed.
* UserInterface/Views/LegacyNetworkTabContentView.js: Removed.
* UserInterface/Views/NetworkGridContentView.css: Removed.
* UserInterface/Views/NetworkGridContentView.js: Removed.
* UserInterface/Views/TabBrowser.js:
(WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
Remove LegacyNetwork tab, its NetworkGridContentView, and associated content.

* UserInterface/Views/NetworkTabContentView.js:
(WI.NetworkTabContentView.isTabAllowed):
Simplify now that this is the only Network tab.

* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
Remove experimental setting.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223778 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 files changed:
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
Source/WebInspectorUI/UserInterface/Base/Main.js
Source/WebInspectorUI/UserInterface/Base/Setting.js
Source/WebInspectorUI/UserInterface/Main.html
Source/WebInspectorUI/UserInterface/Views/LegacyNetworkSidebarPanel.css [deleted file]
Source/WebInspectorUI/UserInterface/Views/LegacyNetworkSidebarPanel.js [deleted file]
Source/WebInspectorUI/UserInterface/Views/LegacyNetworkTabContentView.js [deleted file]
Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.css [deleted file]
Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js [deleted file]
Source/WebInspectorUI/UserInterface/Views/NetworkTabContentView.js
Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js
Source/WebInspectorUI/UserInterface/Views/TabBrowser.js

index f41f0e2..cb7f3c6 100644 (file)
@@ -1,3 +1,34 @@
+2017-10-20  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Network Tab - Turn on the new tab by default, remove the legacy network tab
+        https://bugs.webkit.org/show_bug.cgi?id=178559
+        <rdar://problem/34985503>
+
+        Reviewed by Matt Baker.
+
+        * Localizations/en.lproj/localizedStrings.js:
+        * UserInterface/Base/Main.js:
+        (WI.contentLoaded):
+        * UserInterface/Base/Setting.js:
+        * UserInterface/Main.html:
+        * UserInterface/Views/LegacyNetworkSidebarPanel.css: Removed.
+        * UserInterface/Views/LegacyNetworkSidebarPanel.js: Removed.
+        * UserInterface/Views/LegacyNetworkTabContentView.js: Removed.
+        * UserInterface/Views/NetworkGridContentView.css: Removed.
+        * UserInterface/Views/NetworkGridContentView.js: Removed.
+        * UserInterface/Views/TabBrowser.js:
+        (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
+        Remove LegacyNetwork tab, its NetworkGridContentView, and associated content.
+
+        * UserInterface/Views/NetworkTabContentView.js:
+        (WI.NetworkTabContentView.isTabAllowed):
+        Simplify now that this is the only Network tab.
+
+        * UserInterface/Views/SettingsTabContentView.js:
+        (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
+        Remove experimental setting.
+
+
 2017-10-19  Joseph Pecoraro  <pecoraro@apple.com>
 
         Unreviewed localized strings update.
index cb082e1..91944ba 100644 (file)
@@ -204,7 +204,6 @@ localizedStrings["Close %s timeline view"] = "Close %s timeline view";
 localizedStrings["Close Other Tabs"] = "Close Other Tabs";
 localizedStrings["Close Tab"] = "Close Tab";
 localizedStrings["Close detail view"] = "Close detail view";
-localizedStrings["Close resource view"] = "Close resource view";
 localizedStrings["Closed"] = "Closed";
 localizedStrings["Closure Variables"] = "Closure Variables";
 localizedStrings["Closure Variables (%s)"] = "Closure Variables (%s)";
@@ -589,9 +588,7 @@ localizedStrings["Name"] = "Name";
 localizedStrings["Network"] = "Network";
 localizedStrings["Network Issue"] = "Network Issue";
 localizedStrings["Network Requests"] = "Network Requests";
-localizedStrings["Network Tab:"] = "Network Tab:";
 localizedStrings["Network:"] = "Network:";
-localizedStrings["New Network Tab"] = "New Network Tab";
 localizedStrings["New Tab"] = "New Tab";
 localizedStrings["No"] = "No";
 localizedStrings["No Accessibility Information"] = "No Accessibility Information";
index 4a070c2..c16e70a 100644 (file)
@@ -431,7 +431,6 @@ WI.contentLoaded = function()
         WI.DebuggerTabContentView,
         WI.ElementsTabContentView,
         WI.LayersTabContentView,
-        WI.LegacyNetworkTabContentView,
         WI.NetworkTabContentView,
         WI.NewTabContentView,
         WI.RecordingTabContentView,
@@ -988,16 +987,9 @@ WI.showStorageTab = function()
 
 WI.showNetworkTab = function()
 {
-    let tabContentView;
-    if (WI.settings.experimentalEnableNewNetworkTab.value) {
-        tabContentView = this.tabBrowser.bestTabContentViewForClass(WI.NetworkTabContentView);
-        if (!tabContentView)
-            tabContentView = new WI.NetworkTabContentView;
-    } else {
-        tabContentView = this.tabBrowser.bestTabContentViewForClass(WI.LegacyNetworkTabContentView);
-        if (!tabContentView)
-            tabContentView = new WI.LegacyNetworkTabContentView;
-    }
+    let tabContentView = this.tabBrowser.bestTabContentViewForClass(WI.NetworkTabContentView);
+    if (!tabContentView)
+        tabContentView = new WI.NetworkTabContentView;
 
     this.tabBrowser.showTabForContentView(tabContentView);
 };
index 7c91b1b..85f8602 100644 (file)
@@ -130,5 +130,4 @@ WI.settings = {
     experimentalSpreadsheetStyleEditor: new WI.Setting("experimental-spreadsheet-style-editor", false),
     experimentalEnableCanvasTab: new WI.Setting("experimental-enable-canvas-tab", false),
     experimentalEnableLayersTab: new WI.Setting("experimental-enable-layers-tab", false),
-    experimentalEnableNewNetworkTab: new WI.Setting("experimental-enable-new-network-tab", false),
 };
index c0f17b4..f2f5f1a 100644 (file)
     <link rel="stylesheet" href="Views/LayerTreeDetailsSidebarPanel.css">
     <link rel="stylesheet" href="Views/LayoutTimelineOverviewGraph.css">
     <link rel="stylesheet" href="Views/LayoutTimelineView.css">
-    <link rel="stylesheet" href="Views/LegacyNetworkSidebarPanel.css">
     <link rel="stylesheet" href="Views/LogContentView.css">
     <link rel="stylesheet" href="Views/LogIcon.css">
     <link rel="stylesheet" href="Views/MemoryCategoryView.css">
     <link rel="stylesheet" href="Views/Main.css">
     <link rel="stylesheet" href="Views/NavigationBar.css">
     <link rel="stylesheet" href="Views/NavigationSidebarPanel.css">
-    <link rel="stylesheet" href="Views/NetworkGridContentView.css">
     <link rel="stylesheet" href="Views/NetworkResourceDetailView.css">
     <link rel="stylesheet" href="Views/NetworkTabContentView.css">
     <link rel="stylesheet" href="Views/NetworkTableContentView.css">
     <script src="Views/DOMDetailsSidebarPanel.js"></script>
     <script src="Views/FolderTreeElement.js"></script>
     <script src="Views/FolderizedTreeElement.js"></script>
-    <script src="Views/LegacyNetworkTabContentView.js"></script>
     <script src="Views/NetworkTabContentView.js"></script>
     <script src="Views/NewTabContentView.js"></script>
     <script src="Views/ObjectTreeBaseTreeElement.js"></script>
     <script src="Views/LayoutTimelineDataGridNode.js"></script>
     <script src="Views/LayoutTimelineOverviewGraph.js"></script>
     <script src="Views/LayoutTimelineView.js"></script>
-    <script src="Views/LegacyNetworkSidebarPanel.js"></script>
     <script src="Views/LineChart.js"></script>
     <script src="Views/LogContentView.js"></script>
     <script src="Views/MemoryCategoryView.js"></script>
     <script src="Views/MemoryTimelineView.js"></script>
     <script src="Views/MultipleScopeBarItem.js"></script>
     <script src="Views/NavigationBar.js"></script>
-    <script src="Views/NetworkGridContentView.js"></script>
     <script src="Views/NetworkResourceDetailView.js"></script>
     <script src="Views/NetworkTableContentView.js"></script>
     <script src="Views/NetworkTimelineOverviewGraph.js"></script>
diff --git a/Source/WebInspectorUI/UserInterface/Views/LegacyNetworkSidebarPanel.css b/Source/WebInspectorUI/UserInterface/Views/LegacyNetworkSidebarPanel.css
deleted file mode 100644 (file)
index 60f7b7d..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-.sidebar > .panel.navigation.network > :matches(.content, .empty-content-placeholder) {
-    top: 52px;
-}
-
-.sidebar > .panel.navigation.network > .navigation-bar {
-    position: absolute;
-    top: 0;
-    left: 0;
-    right: 0;
-}
-
-.sidebar > .panel.navigation.network > .title-bar {
-    position: absolute;
-    top: var(--navigation-bar-height);
-    left: 0;
-    right: 0;
-
-    height: 23px;
-
-    border-bottom: 1px solid var(--border-color);
-    background-color: var(--panel-background-color);
-    color: hsl(0, 0%, 22%);
-
-    white-space: nowrap;
-    overflow: hidden;
-    text-overflow: ellipsis;
-
-    font-weight: bold;
-
-    padding: 4px 9px;
-
-    white-space: nowrap;
-    overflow: hidden;
-}
-
-.sidebar > .panel.navigation.network.network-grid-content-view-showing > .content {
- /* This hides the scrollbar. The view shows a scrollbar, we don't need two. */
-    padding-right: 16px;
-    right: -16px;
-    overflow-y: overlay;
-}
-
-.sidebar > .panel.navigation.network .item:not(:hover, .selected) .status .status-button,
-.sidebar > .panel.navigation.network .item:hover:not(.selected) .status .close.status-button {
-    display: none;
-}
-
-.sidebar > .panel.navigation.network:not(.network-grid-content-view-showing) .status .go-to-arrow.status-button {
-    display: none;
-}
-
-.sidebar > .panel.navigation.network .status .close.status-button {
-    padding-bottom: 1px;
-}
-
-.sidebar > .panel.navigation.network.network-grid-content-view-showing .status .close.status-button {
-    display: none;
-}
-
-.sidebar > .panel.navigation.network.network-grid-content-view-showing .tree-outline.network-grid .item .subtitle {
-    display: none;
-}
-
-.sidebar > .panel.navigation.network > .content > .tree-outline {
-    min-height: 100%;
-    background-image: none;
-}
-
-.sidebar > .panel.navigation.network.network-grid-content-view-showing > .content > .tree-outline {
-    background: var(--transparent-stripe-background-gradient);
-}
-
-.sidebar > .panel.navigation.network .tree-outline > .preserved:not(.selected) > :not(.status) {
-    opacity: 0.5;
-}
-
-.sidebar > .panel.navigation.network .tree-outline > .preserved:not(.selected) > .icon {
-    filter: grayscale(); 
-}
diff --git a/Source/WebInspectorUI/UserInterface/Views/LegacyNetworkSidebarPanel.js b/Source/WebInspectorUI/UserInterface/Views/LegacyNetworkSidebarPanel.js
deleted file mode 100644 (file)
index 5479a8a..0000000
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-WI.LegacyNetworkSidebarPanel = class LegacyNetworkSidebarPanel extends WI.NavigationSidebarPanel
-{
-    constructor(contentBrowser)
-    {
-        super("network", WI.UIString("Network"), false);
-
-        WI.Frame.addEventListener(WI.Frame.Event.MainResourceDidChange, this._mainResourceDidChange, this);
-
-        this.contentBrowser = contentBrowser;
-
-        this.contentTreeOutline.element.classList.add("network-grid");
-        this.contentTreeOutline.disclosureButtons = false;
-    }
-
-    // Public
-
-    get minimumWidth()
-    {
-        return this._navigationBar.minimumWidth;
-    }
-
-    showDefaultContentView()
-    {
-        if (!this._networkGridView)
-            this._networkGridView = new WI.NetworkGridContentView(null, {legacyNetworkSidebarPanel: this});
-
-        this.contentBrowser.showContentView(this._networkGridView);
-    }
-
-    canShowDifferentContentView()
-    {
-        if (this._clickedTreeElementGoToArrow)
-            return true;
-
-        if (this.contentBrowser.currentContentView instanceof WI.NetworkGridContentView)
-            return false;
-
-        return !this.restoringState;
-    }
-
-    // Protected
-
-    initialLayout()
-    {
-        this._navigationBar = new WI.NavigationBar;
-        this.addSubview(this._navigationBar);
-
-        this._resourcesTitleBarElement = document.createElement("div");
-        this._resourcesTitleBarElement.textContent = WI.UIString("Name");
-        this._resourcesTitleBarElement.classList.add("title-bar");
-        this.element.appendChild(this._resourcesTitleBarElement);
-
-        let scopeItemPrefix = "network-sidebar-";
-        let scopeBarItems = [];
-
-        scopeBarItems.push(new WI.ScopeBarItem(scopeItemPrefix + "type-all", WI.UIString("All Resources"), true));
-
-        for (let key in WI.Resource.Type) {
-            let value = WI.Resource.Type[key];
-            let scopeBarItem = new WI.ScopeBarItem(scopeItemPrefix + value, WI.Resource.displayNameForType(value, true));
-            scopeBarItem[WI.LegacyNetworkSidebarPanel.ResourceTypeSymbol] = value;
-            scopeBarItems.push(scopeBarItem);
-        }
-
-        this._scopeBar = new WI.ScopeBar("network-sidebar-scope-bar", scopeBarItems, scopeBarItems[0], true);
-        this._scopeBar.addEventListener(WI.ScopeBar.Event.SelectionChanged, this._scopeBarSelectionDidChange, this);
-
-        this._navigationBar.addNavigationItem(this._scopeBar);
-
-        WI.timelineManager.persistentNetworkTimeline.addEventListener(WI.Timeline.Event.Reset, this._networkTimelineReset, this);
-
-        this.contentBrowser.addEventListener(WI.ContentBrowser.Event.CurrentContentViewDidChange, this._contentBrowserCurrentContentViewDidChange, this);
-        this._contentBrowserCurrentContentViewDidChange();
-    }
-
-    saveStateToCookie(cookie)
-    {
-        console.assert(cookie);
-
-        cookie[WI.LegacyNetworkSidebarPanel.ShowingNetworkGridContentViewCookieKey] = this.contentBrowser.currentContentView instanceof WI.NetworkGridContentView;
-
-        super.saveStateToCookie(cookie);
-    }
-
-    restoreStateFromCookie(cookie, relaxedMatchDelay)
-    {
-        console.assert(cookie);
-
-        // Don't call NavigationSidebarPanel.restoreStateFromCookie, because it tries to match based
-        // on type selected tree element. This would cause the grid to be deselected.
-        if (cookie[WI.LegacyNetworkSidebarPanel.ShowingNetworkGridContentViewCookieKey])
-            return;
-
-        super.restoreStateFromCookie(cookie, relaxedMatchDelay);
-    }
-
-    hasCustomFilters()
-    {
-        console.assert(this._scopeBar.selectedItems.length === 1);
-        var selectedScopeBarItem = this._scopeBar.selectedItems[0];
-        return selectedScopeBarItem && !selectedScopeBarItem.exclusive;
-    }
-
-    matchTreeElementAgainstCustomFilters(treeElement, flags)
-    {
-        console.assert(this._scopeBar.selectedItems.length === 1);
-        var selectedScopeBarItem = this._scopeBar.selectedItems[0];
-
-        // Show everything if there is no selection or "All Resources" is selected (the exclusive item).
-        if (!selectedScopeBarItem || selectedScopeBarItem.exclusive)
-            return true;
-
-        function match()
-        {
-            if (treeElement instanceof WI.FrameTreeElement)
-                return selectedScopeBarItem[WI.LegacyNetworkSidebarPanel.ResourceTypeSymbol] === WI.Resource.Type.Document;
-
-            console.assert(treeElement instanceof WI.ResourceTreeElement, "Unknown treeElement", treeElement);
-            if (!(treeElement instanceof WI.ResourceTreeElement))
-                return false;
-
-            return treeElement.resource.type === selectedScopeBarItem[WI.LegacyNetworkSidebarPanel.ResourceTypeSymbol];
-        }
-
-        var matched = match();
-        if (matched)
-            flags.expandTreeElement = true;
-        return matched;
-    }
-
-    treeElementAddedOrChanged(treeElement)
-    {
-        if (treeElement.status && treeElement.status[WI.LegacyNetworkSidebarPanel.TreeElementStatusButtonSymbol] || !treeElement.treeOutline)
-            return;
-
-        var fragment = document.createDocumentFragment();
-
-        var closeButton = new WI.TreeElementStatusButton(useSVGSymbol("Images/Close.svg", null, WI.UIString("Close resource view")));
-        closeButton.element.classList.add("close");
-        closeButton.addEventListener(WI.TreeElementStatusButton.Event.Clicked, this._treeElementCloseButtonClicked, this);
-        fragment.appendChild(closeButton.element);
-
-        let goToButton = new WI.TreeElementStatusButton(WI.createGoToArrowButton());
-        goToButton[WI.LegacyNetworkSidebarPanel.TreeElementSymbol] = treeElement;
-        goToButton.addEventListener(WI.TreeElementStatusButton.Event.Clicked, this._treeElementGoToArrowWasClicked, this);
-        fragment.appendChild(goToButton.element);
-
-        treeElement.status = fragment;
-        treeElement.status[WI.LegacyNetworkSidebarPanel.TreeElementStatusButtonSymbol] = true;
-    }
-
-    // Private
-
-    _mainResourceDidChange(event)
-    {
-        let frame = event.target;
-        if (!frame.isMainFrame() || WI.settings.clearNetworkOnNavigate.value)
-            return;
-
-        for (let treeElement of this.contentTreeOutline.children)
-            treeElement.element.classList.add("preserved");
-    }
-
-    _networkTimelineReset(event)
-    {
-        this.contentBrowser.contentViewContainer.closeAllContentViews();
-        this.showDefaultContentView();
-    }
-
-    _contentBrowserCurrentContentViewDidChange(event)
-    {
-        var didShowNetworkGridContentView = this.contentBrowser.currentContentView instanceof WI.NetworkGridContentView;
-        this.element.classList.toggle("network-grid-content-view-showing", didShowNetworkGridContentView);
-    }
-
-    _treeElementGoToArrowWasClicked(event)
-    {
-        this._clickedTreeElementGoToArrow = true;
-
-        let treeElement = event.target[WI.LegacyNetworkSidebarPanel.TreeElementSymbol];
-        console.assert(treeElement instanceof WI.TreeElement);
-
-        treeElement.select(true, true);
-
-        this._clickedTreeElementGoToArrow = false;
-    }
-
-    _treeElementCloseButtonClicked(event)
-    {
-        // Say we are processing a selection change to avoid the selected tree element
-        // from being deselected when the default content view is shown.
-        this.contentTreeOutline.processingSelectionChange = true;
-
-        this.showDefaultContentView();
-
-        this.contentTreeOutline.processingSelectionChange = false;
-    }
-
-    _scopeBarSelectionDidChange(event)
-    {
-        this.updateFilter();
-    }
-};
-
-WI.LegacyNetworkSidebarPanel.ResourceTypeSymbol = Symbol("resource-type");
-WI.LegacyNetworkSidebarPanel.TreeElementSymbol = Symbol("tree-element");
-WI.LegacyNetworkSidebarPanel.TreeElementStatusButtonSymbol = Symbol("tree-element-status-button");
-
-WI.LegacyNetworkSidebarPanel.ShowingNetworkGridContentViewCookieKey = "network-sidebar-panel-showing-network-grid-content-view";
diff --git a/Source/WebInspectorUI/UserInterface/Views/LegacyNetworkTabContentView.js b/Source/WebInspectorUI/UserInterface/Views/LegacyNetworkTabContentView.js
deleted file mode 100644 (file)
index 2d48401..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-WI.LegacyNetworkTabContentView = class LegacyNetworkTabContentView extends WI.ContentBrowserTabContentView
-{
-    constructor(identifier)
-    {
-        let {image, title} = WI.LegacyNetworkTabContentView.tabInfo();
-        let tabBarItem = new WI.GeneralTabBarItem(image, title);
-        let detailsSidebarPanelConstructors = [WI.ResourceDetailsSidebarPanel, WI.ProbeDetailsSidebarPanel];
-
-        super(identifier || "network", "network", tabBarItem, WI.LegacyNetworkSidebarPanel, detailsSidebarPanelConstructors);
-    }
-
-    static tabInfo()
-    {
-        return {
-            image: "Images/Network.svg",
-            title: WI.UIString("Network"),
-        };
-    }
-
-    static isTabAllowed()
-    {
-        return !!window.NetworkAgent && !!window.PageAgent && !WI.settings.experimentalEnableNewNetworkTab.value;
-    }
-
-    // Public
-
-    get type()
-    {
-        return WI.LegacyNetworkTabContentView.Type;
-    }
-
-    canShowRepresentedObject(representedObject)
-    {
-        if (!(representedObject instanceof WI.Resource))
-            return false;
-
-        return !!this.navigationSidebarPanel.contentTreeOutline.getCachedTreeElement(representedObject);
-    }
-
-    get supportsSplitContentBrowser()
-    {
-        // Since the Network tab has a real sidebar, showing the split console would cause items in
-        // the sidebar to be aligned with an item in the datagrid that isn't shown.
-        return false;
-    }
-};
-
-WI.LegacyNetworkTabContentView.Type = "network";
diff --git a/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.css b/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.css
deleted file mode 100644 (file)
index ee09c88..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-.content-view.network-grid > .data-grid {
-    position: absolute;
-    top: 0;
-    left: 0;
-    right: 0;
-    bottom: 0;
-}
-
-.content-view.network-grid > .data-grid th {
-    border-top: none;
-}
-
-.content-view.network-grid > .data-grid .preserved:not(.selected) .cell-content {
-    opacity: 0.5;
-}
-
-.content-view.network-grid > .data-grid .preserved:not(.selected) .cell-content .timeline-record-bar > .segment {
-    filter: grayscale();
-}
-
-.content-view:matches(.network, .network-grid) > .data-grid .cache-type {
-    color: gray;
-}
-
-.content-view:matches(.network, .network-grid) > .data-grid:matches(:focus, .force-focus) tr.selected .cache-type {
-    color: var(--selected-foreground-color) !important;
-}
diff --git a/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js b/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js
deleted file mode 100644 (file)
index d176d86..0000000
+++ /dev/null
@@ -1,457 +0,0 @@
-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-WI.NetworkGridContentView = class NetworkGridContentView extends WI.ContentView
-{
-    constructor(representedObject, extraArguments)
-    {
-        console.assert(extraArguments);
-        console.assert(extraArguments.legacyNetworkSidebarPanel instanceof WI.LegacyNetworkSidebarPanel);
-
-        super(representedObject);
-
-        WI.Frame.addEventListener(WI.Frame.Event.MainResourceDidChange, this._mainResourceDidChange, this);
-
-        this._networkSidebarPanel = extraArguments.legacyNetworkSidebarPanel;
-
-        this._contentTreeOutline = this._networkSidebarPanel.contentTreeOutline;
-        this._contentTreeOutline.addEventListener(WI.TreeOutline.Event.SelectionDidChange, this._treeSelectionDidChange, this);
-
-        let columns = {domain: {}, type: {}, method: {}, scheme: {}, statusCode: {}, cached: {}, protocol: {}, priority: {}, remoteAddress: {}, connectionIdentifier: {}, size: {}, transferSize: {}, requestSent: {}, latency: {}, duration: {}, graph: {}};
-
-        columns.domain.title = columns.domain.tooltip = WI.UIString("Domain");
-        columns.domain.width = "10%";
-
-        columns.type.title = columns.type.tooltip = WI.UIString("Type");
-        columns.type.width = "6%";
-
-        columns.method.title = columns.method.tooltip = WI.UIString("Method");
-        columns.method.width = "5%";
-
-        columns.scheme.title = columns.scheme.tooltip = WI.UIString("Scheme");
-        columns.scheme.width = "5%";
-
-        columns.statusCode.title = columns.statusCode.tooltip = WI.UIString("Status");
-        columns.statusCode.width = "5%";
-
-        columns.cached.title = columns.cached.tooltip = WI.UIString("Cached");
-        columns.cached.width = "8%";
-
-        columns.protocol.title = columns.protocol.tooltip = WI.UIString("Protocol");
-        columns.protocol.width = "5%";
-        columns.protocol.hidden = true;
-
-        columns.priority.title = columns.priority.tooltip = WI.UIString("Priority");
-        columns.priority.width = "5%";
-        columns.priority.hidden = true;
-
-        columns.remoteAddress.title = columns.remoteAddress.tooltip = WI.UIString("IP Address");
-        columns.remoteAddress.width = "8%";
-        columns.remoteAddress.hidden = true;
-
-        columns.connectionIdentifier.title = columns.connectionIdentifier.tooltip = WI.UIString("Connection ID");
-        columns.connectionIdentifier.width = "5%";
-        columns.connectionIdentifier.hidden = true;
-        columns.connectionIdentifier.aligned = "right";
-
-        columns.size.title = columns.size.tooltip = WI.UIString("Size");
-        columns.size.width = "6%";
-        columns.size.aligned = "right";
-
-        columns.transferSize.title = columns.transferSize.tooltip = WI.UIString("Transferred");
-        columns.transferSize.width = "8%";
-        columns.transferSize.aligned = "right";
-
-        columns.requestSent.title = columns.requestSent.tooltip = WI.UIString("Start Time");
-        columns.requestSent.width = "9%";
-        columns.requestSent.aligned = "right";
-
-        columns.latency.title = columns.latency.tooltip = WI.UIString("Latency");
-        columns.latency.width = "9%";
-        columns.latency.aligned = "right";
-
-        columns.duration.title = columns.duration.tooltip = WI.UIString("Duration");
-        columns.duration.width = "9%";
-        columns.duration.aligned = "right";
-
-        for (let column in columns)
-            columns[column].sortable = true;
-
-        this._timelineRuler = new WI.TimelineRuler;
-        this._timelineRuler.allowsClippedLabels = true;
-
-        columns.graph.title = WI.UIString("Timeline");
-        columns.graph.width = "20%";
-        columns.graph.headerView = this._timelineRuler;
-        columns.graph.sortable = false;
-
-        // COMPATIBILITY(iOS 10.3): Network load metrics were not previously available.
-        if (!NetworkAgent.hasEventParameter("loadingFinished", "metrics")) {
-            delete columns.protocol;
-            delete columns.priority;
-            delete columns.remoteAddress;
-            delete columns.connectionIdentifier;
-        }
-
-        this._dataGrid = new WI.TimelineDataGrid(columns, this._contentTreeOutline);
-        this._dataGrid.addEventListener(WI.DataGrid.Event.SelectedNodeChanged, this._dataGridNodeSelected, this);
-        this._dataGrid.sortDelegate = this;
-        this._dataGrid.sortColumnIdentifier = "requestSent";
-        this._dataGrid.sortOrder = WI.DataGrid.SortOrder.Ascending;
-        this._dataGrid.createSettings("network-grid-content-view");
-
-        this.element.classList.add("network-grid");
-        this.addSubview(this._dataGrid);
-
-        let networkTimeline = WI.timelineManager.persistentNetworkTimeline;
-        networkTimeline.addEventListener(WI.Timeline.Event.RecordAdded, this._networkTimelineRecordAdded, this);
-        networkTimeline.addEventListener(WI.Timeline.Event.Reset, this._networkTimelineReset, this);
-
-        // COMPATIBILITY (iOS 10.3): Network.setDisableResourceCaching did not exist.
-        if (window.NetworkAgent && NetworkAgent.setResourceCachingDisabled) {
-            let toolTipForDisableResourceCache = WI.UIString("Ignore the resource cache when loading resources");
-            let activatedToolTipForDisableResourceCache = WI.UIString("Use the resource cache when loading resources");
-            this._disableResourceCacheNavigationItem = new WI.ActivateButtonNavigationItem("disable-resource-cache", toolTipForDisableResourceCache, activatedToolTipForDisableResourceCache, "Images/IgnoreCaches.svg", 16, 16);
-            this._disableResourceCacheNavigationItem.activated = WI.resourceCachingDisabledSetting.value;
-
-            this._disableResourceCacheNavigationItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, this._toggleDisableResourceCache, this);
-            WI.resourceCachingDisabledSetting.addEventListener(WI.Setting.Event.Changed, this._resourceCachingDisabledSettingChanged, this);
-        }
-
-        this._clearNetworkItemsNavigationItem = new WI.ButtonNavigationItem("clear-network-items", WI.UIString("Clear Network Items (%s)").format(WI.clearKeyboardShortcut.displayName), "Images/NavigationItemTrash.svg", 15, 15);
-        this._clearNetworkItemsNavigationItem.visibilityPriority = WI.NavigationItem.VisibilityPriority.Low;
-        this._clearNetworkItemsNavigationItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, () => this.reset());
-
-        this._pendingRecords = [];
-        this._loadingResourceCount = 0;
-        this._lastRecordEndTime = NaN;
-        this._lastUpdateTimestamp = NaN;
-        this._startTime = NaN;
-        this._endTime = NaN;
-        this._scheduledCurrentTimeUpdateIdentifier = undefined;
-    }
-
-    // Public
-
-    get secondsPerPixel() { return this._timelineRuler.secondsPerPixel; }
-    get startTime() { return this._startTime; }
-    get currentTime() { return this.endTime || this.startTime; }
-    get endTime() { return this._endTime; }
-    get zeroTime() { return this.startTime; }
-
-    get selectionPathComponents()
-    {
-        if (!this._contentTreeOutline.selectedTreeElement || this._contentTreeOutline.selectedTreeElement.hidden)
-            return null;
-
-        var pathComponent = new WI.GeneralTreeElementPathComponent(this._contentTreeOutline.selectedTreeElement);
-        pathComponent.addEventListener(WI.HierarchicalPathComponent.Event.SiblingWasSelected, this._treeElementPathComponentSelected, this);
-        return [pathComponent];
-    }
-
-    get navigationItems()
-    {
-        let items = [];
-
-        if (this._disableResourceCacheNavigationItem)
-            items.push(this._disableResourceCacheNavigationItem);
-        items.push(this._clearNetworkItemsNavigationItem);
-
-        return items;
-    }
-
-    shown()
-    {
-        super.shown();
-
-        this._dataGrid.shown();
-
-        this._dataGrid.updateLayout(WI.View.LayoutReason.Resize);
-
-        if (this._loadingResourceCount && !this._scheduledCurrentTimeUpdateIdentifier)
-            this._startUpdatingCurrentTime();
-    }
-
-    hidden()
-    {
-        this._dataGrid.hidden();
-
-        if (this._scheduledCurrentTimeUpdateIdentifier)
-            this._stopUpdatingCurrentTime();
-
-        super.hidden();
-    }
-
-    closed()
-    {
-        super.closed();
-
-        this._dataGrid.closed();
-
-        WI.Frame.removeEventListener(null, null, this);
-    }
-
-    reset()
-    {
-        this._contentTreeOutline.removeChildren();
-        this._dataGrid.reset();
-
-        if (this._scheduledCurrentTimeUpdateIdentifier)
-            this._stopUpdatingCurrentTime();
-
-        this._pendingRecords = [];
-        this._loadingResourceCount = 0;
-        this._lastRecordEndTime = NaN;
-        this._lastUpdateTimestamp = NaN;
-        this._startTime = NaN;
-        this._endTime = NaN;
-
-        this._timelineRuler.startTime = 0;
-        this._timelineRuler.endTime = 0;
-    }
-
-    // Protected
-
-    layout()
-    {
-        if (isNaN(this.startTime) || isNaN(this.endTime))
-            return;
-
-        let oldZeroTime = this._timelineRuler.zeroTime;
-        let oldStartTime = this._timelineRuler.startTime;
-        let oldEndTime = this._timelineRuler.endTime;
-
-        this._timelineRuler.zeroTime = this.zeroTime;
-        this._timelineRuler.startTime = this.startTime;
-
-        if (this.startTime >= this.endTime)
-            return;
-
-        if (!this._scheduledCurrentTimeUpdateIdentifier) {
-            this._timelineRuler.endTime = this.endTime;
-            this._endTime = this._lastRecordEndTime + WI.TimelineRecordBar.MinimumWidthPixels * this.secondsPerPixel;
-        }
-
-        this._timelineRuler.endTime = this.endTime;
-
-        // We only need to refresh the graphs when the any of the times change.
-        if (this.zeroTime !== oldZeroTime || this.startTime !== oldStartTime || this.endTime !== oldEndTime) {
-            for (let dataGridNode of this._dataGrid.children)
-                dataGridNode.refreshGraph();
-        }
-
-        this._processPendingRecords();
-    }
-
-    handleClearShortcut(event)
-    {
-        this.reset();
-    }
-
-    // TimelineDataGrid sort delegate
-
-    dataGridSortComparator(sortColumnIdentifier, sortDirection, node1, node2)
-    {
-        if (sortColumnIdentifier === "priority")
-            return WI.Resource.comparePriority(node1.data.priority, node2.data.priority) * sortDirection;
-
-        return null;
-    }
-
-    // Private
-
-    _resourceCachingDisabledSettingChanged()
-    {
-        this._disableResourceCacheNavigationItem.activated = WI.resourceCachingDisabledSetting.value;
-    }
-
-    _toggleDisableResourceCache()
-    {
-        WI.resourceCachingDisabledSetting.value = !WI.resourceCachingDisabledSetting.value;
-    }
-
-    _processPendingRecords()
-    {
-        if (!this._pendingRecords.length)
-            return;
-
-        for (var resourceTimelineRecord of this._pendingRecords) {
-            // Skip the record if it already exists in the tree.
-            var treeElement = this._contentTreeOutline.findTreeElement(resourceTimelineRecord.resource);
-            if (treeElement)
-                continue;
-
-            treeElement = new WI.ResourceTreeElement(resourceTimelineRecord.resource);
-
-            const includesGraph = false;
-            const shouldShowPopover = true;
-            let dataGridNode = new WI.ResourceTimelineDataGridNode(resourceTimelineRecord, includesGraph, this, shouldShowPopover);
-
-            this._dataGrid.addRowInSortOrder(treeElement, dataGridNode);
-        }
-
-        this._pendingRecords = [];
-    }
-
-    _mainResourceDidChange(event)
-    {
-        let frame = event.target;
-        if (!frame.isMainFrame() || WI.settings.clearNetworkOnNavigate.value)
-            return;
-
-        for (let dataGridNode of this._dataGrid.children)
-            dataGridNode.element.classList.add("preserved");
-    }
-
-    _networkTimelineReset(event)
-    {
-        this.reset();
-    }
-
-    _networkTimelineRecordAdded(event)
-    {
-        let resourceTimelineRecord = event.data.record;
-        console.assert(resourceTimelineRecord instanceof WI.ResourceTimelineRecord);
-
-        let update = (event) => {
-            if (event.target[WI.NetworkGridContentView.ResourceDidFinishOrFail])
-                return;
-
-            event.target.removeEventListener(null, null, this);
-            event.target[WI.NetworkGridContentView.ResourceDidFinishOrFail] = true;
-
-            this._loadingResourceCount--;
-            if (this._loadingResourceCount)
-                return;
-
-            this._lastRecordEndTime = resourceTimelineRecord.endTime;
-            this._endTime = Math.max(this._lastRecordEndTime, this._endTime);
-
-            if (this._scheduledCurrentTimeUpdateIdentifier)
-                this.debounce(150)._stopUpdatingCurrentTime();
-        };
-
-        this._pendingRecords.push(resourceTimelineRecord);
-
-        this.needsLayout();
-
-        let resource = resourceTimelineRecord.resource;
-        if (!resource.isLoading())
-            return;
-
-        resource[WI.NetworkGridContentView.ResourceDidFinishOrFail] = false;
-        resource.addEventListener(WI.Resource.Event.LoadingDidFinish, update, this);
-        resource.addEventListener(WI.Resource.Event.LoadingDidFail, update, this);
-
-        this._loadingResourceCount++;
-        if (this._scheduledCurrentTimeUpdateIdentifier)
-            return;
-
-        if (isNaN(this._startTime))
-            this._startTime = this._endTime = resourceTimelineRecord.startTime;
-
-        // FIXME: <https://webkit.org/b/153634> Web Inspector: some background tabs think they are the foreground tab and do unnecessary work
-        if (!(WI.tabBrowser.selectedTabContentView instanceof WI.LegacyNetworkTabContentView))
-            return;
-
-        this._startUpdatingCurrentTime();
-    }
-
-    _treeElementPathComponentSelected(event)
-    {
-        var dataGridNode = this._dataGrid.dataGridNodeForTreeElement(event.data.pathComponent.generalTreeElement);
-        if (!dataGridNode)
-            return;
-        dataGridNode.revealAndSelect();
-    }
-
-    _treeSelectionDidChange(event)
-    {
-        this.dispatchEventToListeners(WI.ContentView.Event.SelectionPathComponentsDidChange);
-
-        if (!this._networkSidebarPanel.canShowDifferentContentView())
-            return;
-
-        let treeElement = event.data.selectedElement;
-        if (treeElement instanceof WI.ResourceTreeElement) {
-            WI.showRepresentedObject(treeElement.representedObject);
-            return;
-        }
-
-        console.error("Unknown tree element", treeElement);
-    }
-
-    _dataGridNodeSelected(event)
-    {
-        this.dispatchEventToListeners(WI.ContentView.Event.SelectionPathComponentsDidChange);
-    }
-
-    _update(timestamp)
-    {
-        console.assert(this._scheduledCurrentTimeUpdateIdentifier);
-
-        if (!isNaN(this._lastUpdateTimestamp)) {
-            let timespanSinceLastUpdate = (timestamp - this._lastUpdateTimestamp) / 1000 || 0;
-            this._endTime += timespanSinceLastUpdate;
-
-            this.updateLayout();
-        }
-
-        this._lastUpdateTimestamp = timestamp;
-        this._scheduledCurrentTimeUpdateIdentifier = requestAnimationFrame(this._updateCallback);
-    }
-
-    _startUpdatingCurrentTime()
-    {
-        console.assert(!this._scheduledCurrentTimeUpdateIdentifier);
-        if (this._scheduledCurrentTimeUpdateIdentifier)
-            return;
-
-        // Don't update the current time if the Inspector is not visible, as the requestAnimationFrames won't work.
-        if (!WI.visible)
-            return;
-
-        if (!this._updateCallback)
-            this._updateCallback = this._update.bind(this);
-
-        this._scheduledCurrentTimeUpdateIdentifier = requestAnimationFrame(this._updateCallback);
-    }
-
-    _stopUpdatingCurrentTime()
-    {
-        console.assert(this._scheduledCurrentTimeUpdateIdentifier);
-        if (!this._scheduledCurrentTimeUpdateIdentifier)
-            return;
-
-        this._stopUpdatingCurrentTime.cancelDebounce();
-
-        cancelAnimationFrame(this._scheduledCurrentTimeUpdateIdentifier);
-        this._scheduledCurrentTimeUpdateIdentifier = undefined;
-
-        this.needsLayout();
-    }
-};
-
-WI.NetworkGridContentView.ResourceDidFinishOrFail = Symbol("ResourceDidFinishOrFail");
index 4eaf35a..524f80b 100644 (file)
@@ -58,7 +58,7 @@ WI.NetworkTabContentView = class NetworkTabContentView extends WI.TabContentView
 
     static isTabAllowed()
     {
-        return !!window.NetworkAgent && !!window.PageAgent && WI.settings.experimentalEnableNewNetworkTab.value;
+        return !!window.NetworkAgent && !!window.PageAgent;
     }
 
     // Protected
@@ -104,5 +104,4 @@ WI.NetworkTabContentView = class NetworkTabContentView extends WI.TabContentView
     }
 };
 
-// FIXME: When removing LegacyNetworkTabContentView this should move back to just "network".
-WI.NetworkTabContentView.Type = "new-network";
+WI.NetworkTabContentView.Type = "network";
index 17826aa..9e01dd5 100644 (file)
@@ -251,30 +251,6 @@ WI.SettingsTabContentView = class SettingsTabContentView extends WI.TabContentVi
             experimentalSettingsView.addSeparator();
         }
 
-        if (window.NetworkAgent) {
-            experimentalSettingsView.addSetting(WI.UIString("Network Tab:"), WI.settings.experimentalEnableNewNetworkTab, WI.UIString("New Network Tab"));
-            experimentalSettingsView.addSeparator();
-
-            // Ensure the toggled network tab is open after reloading the frontend.
-            // Put it in the same place as the existing network tab or just at the end.
-            WI.settings.experimentalEnableNewNetworkTab.addEventListener(WI.Setting.Event.Changed, () => {
-                let newNetworkTableEnabled = WI.settings.experimentalEnableNewNetworkTab.value;
-                let incomingTabIdentifier = newNetworkTableEnabled ? WI.NetworkTabContentView.Type : WI.LegacyNetworkTabContentView.Type;
-                let outgoingTabIdentifier = newNetworkTableEnabled ? WI.LegacyNetworkTabContentView.Type : WI.NetworkTabContentView.Type;
-
-                let tabs = WI._openTabsSetting.value.slice();
-                tabs.remove(incomingTabIdentifier);
-
-                let index = tabs.indexOf(outgoingTabIdentifier);
-                if (index !== -1)
-                    tabs.insertAtIndex(incomingTabIdentifier, index);
-                else
-                    tabs.push(incomingTabIdentifier);
-
-                WI._openTabsSetting.value = tabs;
-            });
-        }
-
         if (window.LayerTreeAgent) {
             experimentalSettingsView.addSetting(WI.UIString("Layers:"), WI.settings.experimentalEnableLayersTab, WI.UIString("Enable Layers Tab"));
             experimentalSettingsView.addSeparator();
@@ -296,7 +272,6 @@ WI.SettingsTabContentView = class SettingsTabContentView extends WI.TabContentVi
 
         listenForChange(WI.settings.experimentalShowCanvasContextsInResources);
         listenForChange(WI.settings.experimentalSpreadsheetStyleEditor);
-        listenForChange(WI.settings.experimentalEnableNewNetworkTab);
         listenForChange(WI.settings.experimentalEnableLayersTab);
         listenForChange(WI.settings.experimentalEnableCanvasTab);
 
index 74302b9..9d1c176 100644 (file)
@@ -126,8 +126,6 @@ WI.TabBrowser = class TabBrowser extends WI.View
             if (options.ignoreSearchTab && tabContentView instanceof WI.SearchTabContentView)
                 continue;
 
-            if (options.ignoreNetworkTab && tabContentView instanceof WI.LegacyNetworkTabContentView)
-                continue;
             if (options.ignoreNetworkTab && tabContentView instanceof WI.NetworkTabContentView)
                 continue;