Index: Source/devtools/front_end/MetricsSidebarPane.js |
diff --git a/Source/devtools/front_end/MetricsSidebarPane.js b/Source/devtools/front_end/MetricsSidebarPane.js |
index 7d97539e8a259df6f76d0b69c9a6e97a7f8cf1b6..2ee72494f74353f169ee7fefcc1ff740c87b5411 100644 |
--- a/Source/devtools/front_end/MetricsSidebarPane.js |
+++ b/Source/devtools/front_end/MetricsSidebarPane.js |
@@ -38,6 +38,7 @@ WebInspector.MetricsSidebarPane = function() |
WebInspector.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.MediaQueryResultChanged, this._styleSheetOrMediaQueryResultChanged, this); |
WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.AttrModified, this._attributesUpdated, this); |
WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.AttrRemoved, this._attributesUpdated, this); |
+ WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.FrameResized, this._frameResized, this); |
} |
WebInspector.MetricsSidebarPane.prototype = { |
@@ -88,6 +89,20 @@ WebInspector.MetricsSidebarPane.prototype = { |
this._innerUpdate(); |
}, |
+ _frameResized: function() |
+ { |
+ function refreshContents() |
+ { |
+ this._innerUpdate(); |
+ delete this._activeTimer; |
+ } |
+ |
+ if (this._activeTimer) |
+ clearTimeout(this._activeTimer); |
+ |
+ this._activeTimer = setTimeout(refreshContents.bind(this), 100); |
+ }, |
+ |
_attributesUpdated: function(event) |
{ |
if (this.node !== event.data.node) |