Title: [185263] trunk/Source/WebInspectorUI
- Revision
- 185263
- Author
- nvasil...@apple.com
- Date
- 2015-06-05 14:36:16 -0700 (Fri, 05 Jun 2015)
Log Message
Web Inspector: [REGRESSION] Dashboard's resource count does not reset when main resource navigates
https://bugs.webkit.org/show_bug.cgi?id=144553
Add missing _mainResourceDidChange, which was removed after switching to the tabs UI.
Reviewed by Timothy Hatcher.
* UserInterface/Models/DefaultDashboard.js:
(WebInspector.DefaultDashboard):
_waitingForFirstMainResourceToStartTrackingSize is not used anywhere, remove it.
(WebInspector.DefaultDashboard.prototype._mainResourceDidChange): Added.
(WebInspector.DefaultDashboard.prototype._resourceSizeDidChange): Removed.
Unused.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (185262 => 185263)
--- trunk/Source/WebInspectorUI/ChangeLog 2015-06-05 21:31:27 UTC (rev 185262)
+++ trunk/Source/WebInspectorUI/ChangeLog 2015-06-05 21:36:16 UTC (rev 185263)
@@ -1,3 +1,21 @@
+2015-06-05 Nikita Vasilyev <nvasil...@apple.com>
+
+ Web Inspector: [REGRESSION] Dashboard's resource count does not reset when main resource navigates
+ https://bugs.webkit.org/show_bug.cgi?id=144553
+
+ Add missing _mainResourceDidChange, which was removed after switching to the tabs UI.
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Models/DefaultDashboard.js:
+ (WebInspector.DefaultDashboard):
+ _waitingForFirstMainResourceToStartTrackingSize is not used anywhere, remove it.
+
+ (WebInspector.DefaultDashboard.prototype._mainResourceDidChange): Added.
+
+ (WebInspector.DefaultDashboard.prototype._resourceSizeDidChange): Removed.
+ Unused.
+
2015-06-05 Matt Baker <mattba...@apple.com>
Web Inspector: Switch to doughnut chart and remove idle time in the Rendering Frames timeline
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/DefaultDashboard.js (185262 => 185263)
--- trunk/Source/WebInspectorUI/UserInterface/Models/DefaultDashboard.js 2015-06-05 21:31:27 UTC (rev 185262)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/DefaultDashboard.js 2015-06-05 21:36:16 UTC (rev 185263)
@@ -29,9 +29,8 @@
{
super();
- this._waitingForFirstMainResourceToStartTrackingSize = true;
-
// Necessary events required to track load of resources.
+ WebInspector.Frame.addEventListener(WebInspector.Frame.Event.MainResourceDidChange, this._mainResourceDidChange, this);
WebInspector.Frame.addEventListener(WebInspector.Frame.Event.ResourceWasAdded, this._resourceWasAdded, this);
WebInspector.frameResourceManager.addEventListener(WebInspector.FrameResourceManager.Event.FrameWasAdded, this._frameWasAdded, this);
@@ -100,6 +99,15 @@
this.dispatchEventToListeners(WebInspector.DefaultDashboard.Event.DataDidChange);
}
+ _mainResourceDidChange(event)
+ {
+ if (!event.target.isMainFrame())
+ return;
+
+ this._resourcesCount = 1;
+ this._dataDidChange();
+ }
+
_resourceWasAdded(event)
{
++this.resourcesCount;
@@ -110,11 +118,6 @@
++this.resourcesCount;
}
- _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