Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(560)

Unified Diff: third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js

Issue 2144923002: DevTools: remove the ComputedStyles -> Styles pane dependency. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaselined Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 9096ee1e8eaa7b66b46c4018ec5081043a25841d..d4ca4cc4a54dabe8eca764dec32beb5c98b2a0d9 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js
@@ -71,11 +71,8 @@ WebInspector.ElementsPanel = function()
this._elementsSidebarViewWrappers = [];
this._currentToolbarPane = null;
- var sharedSidebarModel = new WebInspector.SharedSidebarModel();
- this.sidebarPanes.platformFonts = WebInspector.PlatformFontsWidget.createSidebarWrapper(sharedSidebarModel);
this.sidebarPanes.styles = new WebInspector.StylesSidebarPane();
- this.sidebarPanes.computedStyle = WebInspector.ComputedStyleWidget.createSidebarWrapper(this.sidebarPanes.styles, sharedSidebarModel, this._revealProperty.bind(this));
-
+ this.sidebarPanes.computedStyle = WebInspector.ComputedStyleWidget.createSidebarWrapper();
this.sidebarPanes.metrics = new WebInspector.MetricsSidebarPane();
this.sidebarPanes.properties = WebInspector.PropertiesWidget.createSidebarWrapper();
this.sidebarPanes.domBreakpoints = WebInspector.domBreakpointsSidebarPane.createProxy(this);
@@ -948,7 +945,6 @@ WebInspector.ElementsPanel.prototype = {
this.sidebarPanes.styles.show(matchedStylePanesWrapper.element);
this.sidebarPanes.computedStyle.show(computedStylePanesWrapper.element);
showMetrics.call(this, horizontally);
- this.sidebarPanes.platformFonts.show(computedStylePanesWrapper.element);
this.sidebarPaneView.addPane(this.sidebarPanes.eventListeners);
this.sidebarPaneView.addPane(this.sidebarPanes.domBreakpoints);
@@ -1031,9 +1027,7 @@ WebInspector.ElementsPanel.ContextMenuProvider.prototype = {
* @constructor
* @implements {WebInspector.Revealer}
*/
-WebInspector.ElementsPanel.DOMNodeRevealer = function()
-{
-}
+WebInspector.ElementsPanel.DOMNodeRevealer = function() { }
WebInspector.ElementsPanel.DOMNodeRevealer.prototype = {
/**
@@ -1087,6 +1081,25 @@ WebInspector.ElementsPanel.DOMNodeRevealer.prototype = {
}
}
+/**
+ * @constructor
+ * @implements {WebInspector.Revealer}
+ */
+WebInspector.ElementsPanel.CSSPropertyRevealer = function() { }
+
+WebInspector.ElementsPanel.CSSPropertyRevealer.prototype = {
+ /**
+ * @override
+ * @param {!Object} property
+ * @return {!Promise}
+ */
+ reveal: function(property)
+ {
+ var panel = WebInspector.ElementsPanel.instance();
+ return panel._revealProperty(/** @type {!WebInspector.CSSProperty} */ (property));
+ }
+}
+
WebInspector.ElementsPanel.show = function()
{
WebInspector.inspectorView.setCurrentPanel(WebInspector.ElementsPanel.instance());

Powered by Google App Engine
This is Rietveld 408576698