Title: [187123] trunk/Source/WebInspectorUI
Revision
187123
Author
commit-qu...@webkit.org
Date
2015-07-21 14:23:26 -0700 (Tue, 21 Jul 2015)

Log Message

Web Inspector: Total download size doesn't update soon after loading
https://bugs.webkit.org/show_bug.cgi?id=147161

Patch by Joseph Pecoraro <pecor...@apple.com> on 2015-07-21
Reviewed by Timothy Hatcher.

* UserInterface/Models/DefaultDashboard.js:
(WebInspector.DefaultDashboard.prototype._mainResourceDidChange):
Previously autorecording would always have made us start capturing,
however we only autorecord if users are on the Timeline tab. Just
reset the time always, a navigation happened and start the timer.

(WebInspector.DefaultDashboard.prototype._resourceSizeDidChange):
Move to a better location within the file.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (187122 => 187123)


--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-21 21:23:12 UTC (rev 187122)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-21 21:23:26 UTC (rev 187123)
@@ -1,3 +1,19 @@
+2015-07-21  Joseph Pecoraro  <pecor...@apple.com>
+
+        Web Inspector: Total download size doesn't update soon after loading
+        https://bugs.webkit.org/show_bug.cgi?id=147161
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Models/DefaultDashboard.js:
+        (WebInspector.DefaultDashboard.prototype._mainResourceDidChange):
+        Previously autorecording would always have made us start capturing,
+        however we only autorecord if users are on the Timeline tab. Just
+        reset the time always, a navigation happened and start the timer.
+
+        (WebInspector.DefaultDashboard.prototype._resourceSizeDidChange):
+        Move to a better location within the file.
+
 2015-07-21  Nikita Vasilyev  <nvasil...@apple.com>
 
         Web Inspector: Convert all colors from RGB to HSL color scheme

Modified: trunk/Source/WebInspectorUI/UserInterface/Models/DefaultDashboard.js (187122 => 187123)


--- trunk/Source/WebInspectorUI/UserInterface/Models/DefaultDashboard.js	2015-07-21 21:23:12 UTC (rev 187122)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/DefaultDashboard.js	2015-07-21 21:23:26 UTC (rev 187123)
@@ -135,15 +135,10 @@
         if (!event.target.isMainFrame())
             return;
 
+        this._time = 0;
         this._resourcesCount = 1;
         this._resourcesSize = WebInspector.frameResourceManager.mainFrame.mainResource.size || 0;
 
-        // Only update the time if we are recording the timeline.
-        if (!WebInspector.timelineManager.isCapturing()) {
-            this._time = 0;
-            return;
-        }
-
         // We should only track resource sizes on fresh loads.
         if (this._waitingForFirstMainResourceToStartTrackingSize) {
             this._waitingForFirstMainResourceToStartTrackingSize = false;
@@ -170,6 +165,11 @@
         ++this.resourcesCount;
     }
 
+    _resourceSizeDidChange(event)
+    {
+        this.resourcesSize += event.target.size - event.data.previousSize;
+    }
+
     _startUpdatingTime()
     {
         this._stopUpdatingTime();
@@ -223,11 +223,6 @@
         this._stopUpdatingTime();
     }
 
-    _resourceSizeDidChange(event)
-    {
-        this.resourcesSize += event.target.size - event.data.previousSize;
-    }
-
     _consoleMessageAdded(event)
     {
         var message = event.data.message;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to