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

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

Issue 1530353003: DevTools: jump from computed style to styles sidebar pane. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaseline Created 4 years, 11 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 6b1ece1405367ec101f196aac1b0501864614aa0..d9d112afd364f07db0ca0af07f0bc73b0a1d9cd9 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js
@@ -74,7 +74,7 @@ WebInspector.ElementsPanel = function()
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.sidebarPanes.computedStyle = WebInspector.ComputedStyleWidget.createSidebarWrapper(this.sidebarPanes.styles, sharedSidebarModel, this._revealProperty.bind(this));
this.sidebarPanes.metrics = new WebInspector.MetricsSidebarPane();
this.sidebarPanes.properties = WebInspector.PropertiesWidget.createSidebarWrapper();
@@ -101,6 +101,17 @@ WebInspector.ElementsPanel._elementsSidebarViewTitleSymbol = Symbol("title");
WebInspector.ElementsPanel.prototype = {
/**
+ * @param {!WebInspector.CSSProperty} cssProperty
+ */
+ _revealProperty: function(cssProperty)
+ {
+ var stylesSidebarPane = this.sidebarPanes.styles;
+ this.sidebarPaneView.selectTab(stylesSidebarPane.title());
+ stylesSidebarPane.revealProperty(/** @type {!WebInspector.CSSProperty} */(cssProperty));
+ return Promise.resolve();
+ },
+
+ /**
* @param {!WebInspector.StylesSidebarPane} ssp
* @return {!Element}
*/

Powered by Google App Engine
This is Rietveld 408576698