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. |