Title: [156483] trunk/Source/WebInspectorUI
Revision
156483
Author
grao...@apple.com
Date
2013-09-26 11:40:36 -0700 (Thu, 26 Sep 2013)

Log Message

Web Inspector: Activity viewer not properly reset when reloading
https://bugs.webkit.org/show_bug.cgi?id=121958

Reviewed by Darin Adler.

Reset the resources count and accumulated size when we detect the main frame
has changed, which will work with documents where there are no resources besides
frames in which case WebInspector.Frame.Event.AllResourcesRemoved was not fired
and our counts wouldn't be reset correctly.

* UserInterface/DashboardManager.js:
(WebInspector.DashboardManager):
(WebInspector.DashboardManager.prototype._mainResourceDidChange):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (156482 => 156483)


--- trunk/Source/WebInspectorUI/ChangeLog	2013-09-26 18:31:29 UTC (rev 156482)
+++ trunk/Source/WebInspectorUI/ChangeLog	2013-09-26 18:40:36 UTC (rev 156483)
@@ -1,5 +1,21 @@
 2013-09-26  Antoine Quint  <grao...@apple.com>
 
+        Web Inspector: Activity viewer not properly reset when reloading
+        https://bugs.webkit.org/show_bug.cgi?id=121958
+
+        Reviewed by Darin Adler.
+
+        Reset the resources count and accumulated size when we detect the main frame
+        has changed, which will work with documents where there are no resources besides
+        frames in which case WebInspector.Frame.Event.AllResourcesRemoved was not fired
+        and our counts wouldn't be reset correctly.
+
+        * UserInterface/DashboardManager.js:
+        (WebInspector.DashboardManager):
+        (WebInspector.DashboardManager.prototype._mainResourceDidChange):
+
+2013-09-26  Antoine Quint  <grao...@apple.com>
+
         Web Inspector: Keep DOM tree expanded on page reload
         https://bugs.webkit.org/show_bug.cgi?id=121665
 

Modified: trunk/Source/WebInspectorUI/UserInterface/DashboardManager.js (156482 => 156483)


--- trunk/Source/WebInspectorUI/UserInterface/DashboardManager.js	2013-09-26 18:31:29 UTC (rev 156482)
+++ trunk/Source/WebInspectorUI/UserInterface/DashboardManager.js	2013-09-26 18:40:36 UTC (rev 156483)
@@ -37,7 +37,6 @@
 
     // Necessary events required to track load of resources.
     WebInspector.Frame.addEventListener(WebInspector.Frame.Event.ResourceWasAdded, this._resourceWasAdded, this);
-    WebInspector.Frame.addEventListener(WebInspector.Frame.Event.AllResourcesRemoved, this._resourcesWereCleared, this);
     WebInspector.frameResourceManager.addEventListener(WebInspector.FrameResourceManager.Event.FrameWasAdded, this._frameWasAdded, this);
 
     // Necessary events required to track console messages.
@@ -58,6 +57,9 @@
         if (!event.target.isMainFrame())
             return;
 
+        this._view.resourcesCount = 1;
+        this._view.resourcesSize = WebInspector.frameResourceManager.mainFrame.mainResource.size || 0;
+
         // Only update the time if we are recording the timeline.
         if (!WebInspector.timelineManager.recording) {
             this._view.time = 0;
@@ -84,12 +86,6 @@
         ++this._view.resourcesCount;
     },
 
-    _resourcesWereCleared: function(event)
-    {
-        this._view.resourcesCount = 1;
-        this._view.resourcesSize = WebInspector.frameResourceManager.mainFrame.mainResource.size || 0;
-    },
-
     _frameWasAdded: function(event)
     {
         ++this._view.resourcesCount;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to