Title: [191486] trunk/Source/WebInspectorUI
- Revision
- 191486
- Author
- mattba...@apple.com
- Date
- 2015-10-22 16:31:53 -0700 (Thu, 22 Oct 2015)
Log Message
Web Inspector: CSS Data URIs count against page weight twice
https://bugs.webkit.org/show_bug.cgi?id=150101
Reviewed by Timothy Hatcher.
* UserInterface/Models/DefaultDashboard.js:
(WebInspector.DefaultDashboard.prototype._resourceSizeDidChange):
Exclude resources with a data URI from the total page weight.
* UserInterface/Models/Resource.js:
(WebInspector.Resource):
(WebInspector.Resource.prototype.updateForRedirectResponse):
(WebInspector.Resource.prototype.updateForResponse):
(WebInspector.Resource.prototype.markAsFinished):
Removed uses of `delete`.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (191485 => 191486)
--- trunk/Source/WebInspectorUI/ChangeLog 2015-10-22 22:56:21 UTC (rev 191485)
+++ trunk/Source/WebInspectorUI/ChangeLog 2015-10-22 23:31:53 UTC (rev 191486)
@@ -1,3 +1,21 @@
+2015-10-22 Matt Baker <mattba...@apple.com>
+
+ Web Inspector: CSS Data URIs count against page weight twice
+ https://bugs.webkit.org/show_bug.cgi?id=150101
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Models/DefaultDashboard.js:
+ (WebInspector.DefaultDashboard.prototype._resourceSizeDidChange):
+ Exclude resources with a data URI from the total page weight.
+
+ * UserInterface/Models/Resource.js:
+ (WebInspector.Resource):
+ (WebInspector.Resource.prototype.updateForRedirectResponse):
+ (WebInspector.Resource.prototype.updateForResponse):
+ (WebInspector.Resource.prototype.markAsFinished):
+ Removed uses of `delete`.
+
2015-10-22 Joseph Pecoraro <pecor...@apple.com>
Web Inspector: Remove unused Timeline GCEvent Record type
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/DefaultDashboard.js (191485 => 191486)
--- trunk/Source/WebInspectorUI/UserInterface/Models/DefaultDashboard.js 2015-10-22 22:56:21 UTC (rev 191485)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/DefaultDashboard.js 2015-10-22 23:31:53 UTC (rev 191486)
@@ -167,6 +167,8 @@
_resourceSizeDidChange(event)
{
+ if (event.target.urlComponents.scheme === "data")
+ return;
this.resourcesSize += event.target.size - event.data.previousSize;
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/Resource.js (191485 => 191486)
--- trunk/Source/WebInspectorUI/UserInterface/Models/Resource.js 2015-10-22 22:56:21 UTC (rev 191485)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/Resource.js 2015-10-22 23:31:53 UTC (rev 191486)
@@ -35,7 +35,9 @@
type = WebInspector.Resource.Type[type];
this._url = url;
+ this._urlComponents = null;
this._mimeType = mimeType;
+ this._mimeTypeComponents = null;
this._type = type || WebInspector.Resource.typeFromMIMEType(mimeType);
this._loaderIdentifier = loaderIdentifier || null;
this._requestIdentifier = requestIdentifier || null;
@@ -51,6 +53,7 @@
this._lastRedirectReceivedTimestamp = NaN;
this._lastDataReceivedTimestamp = NaN;
this._finishedOrFailedTimestamp = NaN;
+ this._finishThenRequestContentPromise = null;
this._size = NaN;
this._transferSize = NaN;
this._cached = false;
@@ -415,7 +418,7 @@
if (oldURL !== url) {
// Delete the URL components so the URL is re-parsed the next time it is requested.
- delete this._urlComponents;
+ this._urlComponents = null;
this.dispatchEventToListeners(WebInspector.Resource.Event.URLDidChange, {oldURL});
}
@@ -454,14 +457,14 @@
if (oldURL !== url) {
// Delete the URL components so the URL is re-parsed the next time it is requested.
- delete this._urlComponents;
+ this._urlComponents = null;
this.dispatchEventToListeners(WebInspector.Resource.Event.URLDidChange, {oldURL});
}
if (oldMIMEType !== mimeType) {
// Delete the MIME-type components so the MIME-type is re-parsed the next time it is requested.
- delete this._mimeTypeComponents;
+ this._mimeTypeComponents = null;
this.dispatchEventToListeners(WebInspector.Resource.Event.MIMETypeDidChange, {oldMIMEType});
}
@@ -551,7 +554,7 @@
this._finishedOrFailedTimestamp = elapsedTime || NaN;
if (this._finishThenRequestContentPromise)
- delete this._finishThenRequestContentPromise;
+ this._finishThenRequestContentPromise = null;
this.dispatchEventToListeners(WebInspector.Resource.Event.LoadingDidFinish);
this.dispatchEventToListeners(WebInspector.Resource.Event.TimestampsDidChange);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes