Created attachment 263021 [details] Example HTML file that shows the problem OVERVIEW: This is a repeat of bug 75555, which was closed (automatically?) when the new Web Inspector appeared. Any CSS data URI is counted twice against page weight: once for the CSS code, and once for the separate resource entry for the image or font represented by the data URI. STEPS TO REPRODUCE: Open Web Inspector, load a single HTML page that uses a data URI in a <style> element, and look at the Page Weight indicator. EXPECTED RESULTS: The Page Weight total shows the exact HTML file size. ACTUAL RESULTS: The Page Weight total shows the sum of the HTML file size, PLUS the size of the image or font represented by the data URI, since it gets a separate Resource entry ADDITIONAL INFO: You can see this in action at http://75thtrombone.com/links/webkit/page-weight-test.html . That page is also attached.
<rdar://problem/23096774>
Thanks for the bug report! Should be a simple fix on DefaultDashboard's _resourceSizeDidChange to ignore data URLs.
Created attachment 263853 [details] [Patch] Proposed Fix
I considered using Resource.urlComponents.scheme, but the data URI resource's scheme was null (expected "data").
(In reply to comment #4) > I considered using Resource.urlComponents.scheme, but the data URI > resource's scheme was null (expected "data"). Maybe parseURL() doesn't properly handle a data URI. I think I was running into this recently.
(In reply to comment #5) > (In reply to comment #4) > > I considered using Resource.urlComponents.scheme, but the data URI > > resource's scheme was null (expected "data"). > > Maybe parseURL() doesn't properly handle a data URI. I think I was running > into this recently. I'm certain the scheme property was null at least once while refreshing the attached example page, but I can't reproduce the issue now. Going to switch to checking the scheme field since we do this elsewhere (CSSStyleDeclarationSection.js:516).
Created attachment 263866 [details] [Patch] Proposed Fix
Comment on attachment 263866 [details] [Patch] Proposed Fix Clearing flags on attachment: 263866 Committed r191486: <http://trac.webkit.org/changeset/191486>
All reviewed patches have been landed. Closing bug.