WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
150101
Web Inspector: CSS Data URIs count against page weight twice
https://bugs.webkit.org/show_bug.cgi?id=150101
Summary
Web Inspector: CSS Data URIs count against page weight twice
Lanny Heidbreder
Reported
2015-10-13 14:26:42 PDT
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.
Attachments
Example HTML file that shows the problem
(651 bytes, text/html)
2015-10-13 14:26 PDT
,
Lanny Heidbreder
no flags
Details
[Patch] Proposed Fix
(1.50 KB, patch)
2015-10-22 13:37 PDT
,
Matt Baker
no flags
Details
Formatted Diff
Diff
[Patch] Proposed Fix
(4.65 KB, patch)
2015-10-22 14:22 PDT
,
Matt Baker
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2015-10-13 14:27:40 PDT
<
rdar://problem/23096774
>
Timothy Hatcher
Comment 2
2015-10-22 08:13:58 PDT
Thanks for the bug report! Should be a simple fix on DefaultDashboard's _resourceSizeDidChange to ignore data URLs.
Matt Baker
Comment 3
2015-10-22 13:37:21 PDT
Created
attachment 263853
[details]
[Patch] Proposed Fix
Matt Baker
Comment 4
2015-10-22 13:40:12 PDT
I considered using Resource.urlComponents.scheme, but the data URI resource's scheme was null (expected "data").
Joseph Pecoraro
Comment 5
2015-10-22 13:49:24 PDT
(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.
Matt Baker
Comment 6
2015-10-22 14:15:22 PDT
(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).
Matt Baker
Comment 7
2015-10-22 14:22:26 PDT
Created
attachment 263866
[details]
[Patch] Proposed Fix
WebKit Commit Bot
Comment 8
2015-10-22 16:32:37 PDT
Comment on
attachment 263866
[details]
[Patch] Proposed Fix Clearing flags on attachment: 263866 Committed
r191486
: <
http://trac.webkit.org/changeset/191486
>
WebKit Commit Bot
Comment 9
2015-10-22 16:32:42 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug