Bug 149829 - data: URLs should not be preloaded
Summary: data: URLs should not be preloaded
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-05 21:07 PDT by Chris Dumez
Modified: 2015-10-08 15:59 PDT (History)
6 users (show)

See Also:


Attachments
Patch (3.92 KB, patch)
2015-10-05 21:09 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Post-mortem review comments (1.34 KB, patch)
2015-10-07 13:58 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews102 for mac-mavericks (698.14 KB, application/zip)
2015-10-07 14:12 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews104 for mac-mavericks-wk2 (776.35 KB, application/zip)
2015-10-07 14:20 PDT, Build Bot
no flags Details
Patch (1.37 KB, patch)
2015-10-08 14:53 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.