Bug 149829

Summary: data: URLs should not be preloaded
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Page LoadingAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, commit-queue, esprehn+autocc, gyuyoung.kim, koivisto, rniwa
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Post-mortem review comments
none
Archive of layout-test-results from ews102 for mac-mavericks
none
Archive of layout-test-results from ews104 for mac-mavericks-wk2
none
Patch none

Description Chris Dumez 2015-10-05 21:07:29 PDT
data: URLs should not be preloaded. The HTMLPreloadScanner currently preloads them but there is no need as the data is already available.
Comment 1 Chris Dumez 2015-10-05 21:09:37 PDT
Created attachment 262493 [details]
Patch
Comment 2 WebKit Commit Bot 2015-10-05 22:43:34 PDT
Comment on attachment 262493 [details]
Patch

Clearing flags on attachment: 262493

Committed r190605: <http://trac.webkit.org/changeset/190605>
Comment 3 WebKit Commit Bot 2015-10-05 22:43:39 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Darin Adler 2015-10-07 09:32:35 PDT
Comment on attachment 262493 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=262493&action=review

> Source/WebCore/html/parser/HTMLPreloadScanner.cpp:222
> +        if (m_urlToLoad.startsWith("data:", false))
> +            return false;

There’s a more optimized way to do this provided by URL.h:

    if (protocolIs(m_urlToLoad, "data"))

I also think we could add a protocolIsData function.
Comment 5 Chris Dumez 2015-10-07 13:58:49 PDT
Reopening to attach new patch.
Comment 6 Chris Dumez 2015-10-07 13:58:52 PDT
Created attachment 262638 [details]
Post-mortem review comments
Comment 7 Build Bot 2015-10-07 14:12:51 PDT
Comment on attachment 262638 [details]
Post-mortem review comments

Attachment 262638 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/255207

New failing tests:
fast/preloader/image-data-url.html
Comment 8 Build Bot 2015-10-07 14:12:55 PDT
Created attachment 262641 [details]
Archive of layout-test-results from ews102 for mac-mavericks

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-mavericks  Platform: Mac OS X 10.9.5
Comment 9 Build Bot 2015-10-07 14:20:14 PDT
Comment on attachment 262638 [details]
Post-mortem review comments

Attachment 262638 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/255211

New failing tests:
fast/preloader/image-data-url.html
Comment 10 Build Bot 2015-10-07 14:20:17 PDT
Created attachment 262643 [details]
Archive of layout-test-results from ews104 for mac-mavericks-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-mavericks-wk2  Platform: Mac OS X 10.9.5
Comment 11 Chris Dumez 2015-10-08 14:53:10 PDT
Created attachment 262716 [details]
Patch
Comment 12 WebKit Commit Bot 2015-10-08 15:59:48 PDT
Comment on attachment 262716 [details]
Patch

Clearing flags on attachment: 262716

Committed r190755: <http://trac.webkit.org/changeset/190755>
Comment 13 WebKit Commit Bot 2015-10-08 15:59:54 PDT
All reviewed patches have been landed.  Closing bug.