Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js b/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js |
| index 5b647e4495357ba7c00b977762495ffdca27f4d1..651ea79bfb7bc951d2da10ac44d4290dae4a68b8 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js |
| @@ -101,7 +101,7 @@ WebInspector.ElementsPanel.prototype = { |
| _revealProperty: function(cssProperty) |
| { |
| var stylesSidebarPane = this.sidebarPanes.styles; |
| - this.sidebarPaneView.selectTab(WebInspector.UIString("Styles")); |
| + this.sidebarPaneView.showView(WebInspector.UIString("Styles")); |
|
dgozman
2016/08/05 01:32:09
Instance!
|
| stylesSidebarPane.revealProperty(/** @type {!WebInspector.CSSProperty} */(cssProperty)); |
| return Promise.resolve(); |
| }, |
| @@ -863,21 +863,19 @@ WebInspector.ElementsPanel.prototype = { |
| if (this.sidebarPaneView && horizontally === !this._splitWidget.isVertical()) |
| return; |
| - if (this.sidebarPaneView && this.sidebarPaneView.shouldHideOnDetach()) |
| + if (this.sidebarPaneView && this.sidebarPaneView.tabbedPane().shouldHideOnDetach()) |
| return; // We can't reparent extension iframes. |
| - var selectedTabId = this.sidebarPaneView ? this.sidebarPaneView.selectedTabId : null; |
| - |
| var extensionSidebarPanes = WebInspector.extensionServer.sidebarPanes(); |
| if (this.sidebarPaneView) { |
| - this.sidebarPaneView.detach(); |
| - this._splitWidget.uninstallResizer(this.sidebarPaneView.headerElement()); |
| + this.sidebarPaneView.tabbedPane().detach(); |
| + this._splitWidget.uninstallResizer(this.sidebarPaneView.tabbedPane().headerElement()); |
| } |
| this._splitWidget.setVertical(!horizontally); |
| this.showToolbarPane(null); |
| - var computedPane = new WebInspector.View(WebInspector.UIString("Computed")); |
| + var computedPane = new WebInspector.SimpleView(WebInspector.UIString("Computed")); |
| computedPane.element.classList.add("composite"); |
| computedPane.element.classList.add("fill"); |
| computedPane.element.classList.add("metrics-and-computed"); |
| @@ -915,17 +913,18 @@ WebInspector.ElementsPanel.prototype = { |
| showMetrics.call(this, false); |
| } |
| - this.sidebarPaneView = new WebInspector.View.TabbedPaneContainer(); |
| - this.sidebarPaneView.element.addEventListener("contextmenu", this._sidebarContextMenuEventFired.bind(this), false); |
| + this.sidebarPaneView = WebInspector.viewManager.createTabbedLocation("elements-sidebar"); |
| + var tabbedPane = this.sidebarPaneView.tabbedPane(); |
| + tabbedPane.element.addEventListener("contextmenu", this._sidebarContextMenuEventFired.bind(this), false); |
| if (this._popoverHelper) |
| this._popoverHelper.hidePopover(); |
| - this._popoverHelper = new WebInspector.PopoverHelper(this.sidebarPaneView.element, this._getPopoverAnchor.bind(this), this._showPopover.bind(this)); |
| + this._popoverHelper = new WebInspector.PopoverHelper(tabbedPane.element, this._getPopoverAnchor.bind(this), this._showPopover.bind(this)); |
| this._popoverHelper.setTimeout(0); |
| if (horizontally) { |
| - this._splitWidget.installResizer(this.sidebarPaneView.headerElement()); |
| + this._splitWidget.installResizer(tabbedPane.headerElement()); |
| - var compositePane = new WebInspector.View(WebInspector.UIString("Styles")); |
| + var compositePane = new WebInspector.SimpleView(WebInspector.UIString("Styles")); |
| compositePane.element.classList.add("flex-auto"); |
| var splitWidget = new WebInspector.SplitWidget(true, true, "stylesPaneSplitViewState", 215); |
| @@ -937,13 +936,13 @@ WebInspector.ElementsPanel.prototype = { |
| computedPane.show(computedStylePanesWrapper.element); |
| this.sidebarPaneView.appendView(compositePane); |
| } else { |
| - var stylesPane = new WebInspector.View(WebInspector.UIString("Styles")); |
| + var stylesPane = new WebInspector.SimpleView(WebInspector.UIString("Styles")); |
| stylesPane.element.classList.add("flex-auto", "metrics-and-styles"); |
| matchedStylesContainer.show(stylesPane.element); |
| computedStylePanesWrapper.show(computedPane.element); |
| - this.sidebarPaneView.addEventListener(WebInspector.TabbedPane.EventTypes.TabSelected, tabSelected, this); |
| + tabbedPane.addEventListener(WebInspector.TabbedPane.EventTypes.TabSelected, tabSelected, this); |
| this.sidebarPaneView.appendView(stylesPane); |
| this.sidebarPaneView.appendView(computedPane); |
| } |
| @@ -964,10 +963,7 @@ WebInspector.ElementsPanel.prototype = { |
| for (var i = 0; i < extensionSidebarPanes.length; ++i) |
| this._addExtensionSidebarPane(extensionSidebarPanes[i]); |
| - this._splitWidget.setSidebarWidget(this.sidebarPaneView); |
| - |
| - if (selectedTabId) |
| - this.sidebarPaneView.selectTab(selectedTabId); |
| + this._splitWidget.setSidebarWidget(this.sidebarPaneView.tabbedPane()); |
| }, |
| /** |