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

Unified Diff: Source/devtools/front_end/StylesSidebarPane.js

Issue 84643002: Update the metrics side bar pane and computed style pane after main frame resize. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch after review comments. Created 7 years, 1 month 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: Source/devtools/front_end/StylesSidebarPane.js
diff --git a/Source/devtools/front_end/StylesSidebarPane.js b/Source/devtools/front_end/StylesSidebarPane.js
index 79e20e16a204f37743826da81f342e23150ca461..bd9f70fe93acd4860c871891026b27586c501cdc 100644
--- a/Source/devtools/front_end/StylesSidebarPane.js
+++ b/Source/devtools/front_end/StylesSidebarPane.js
@@ -103,6 +103,7 @@ WebInspector.StylesSidebarPane = function(computedStylePane, setPseudoClassCallb
WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.AttrModified, this._attributeChanged, this);
WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.AttrRemoved, this._attributeChanged, this);
WebInspector.settings.showUserAgentStyles.addChangeListener(this._showUserAgentStylesSettingChanged.bind(this));
+ WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.FrameResized, this._frameResized, this);
this.element.addStyleClass("styles-pane");
this.element.enableStyleClass("show-user-styles", WebInspector.settings.showUserAgentStyles.get());
this.element.addEventListener("mousemove", this._mouseMovedOverElement.bind(this), false);
@@ -397,6 +398,16 @@ WebInspector.StylesSidebarPane.prototype = {
this._rebuildUpdate();
},
+ _frameResized: function()
+ {
+ function refreshContents()
+ {
+ this._rebuildUpdate();
+ }
+
+ setTimeout(refreshContents.bind(this), 0);
+ },
+
_attributeChanged: function(event)
{
// Any attribute removal or modification can affect the styles of "related" nodes.

Powered by Google App Engine
This is Rietveld 408576698