Bug 150097 - HTMLPreloadScanner should preload iframes
Summary: HTMLPreloadScanner should preload iframes
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: InRadar
Depends on:
Blocks: 155754
  Show dependency treegraph
 
Reported: 2015-10-13 13:32 PDT by Chris Dumez
Modified: 2016-03-25 03:51 PDT (History)
7 users (show)

See Also:


Attachments
Patch (6.61 KB, patch)
2015-10-13 14:52 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (6.88 KB, patch)
2015-10-14 11:36 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (9.14 KB, patch)
2015-10-15 10:09 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews106 for mac-mavericks-wk2 (672.88 KB, application/zip)
2015-10-15 10:47 PDT, Build Bot
no flags Details
Patch (9.10 KB, patch)
2015-10-16 09:20 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-13 13:32:27 PDT
HTMLPreloadScanner should preload iframes to decrease page load time.
Comment 1 Chris Dumez 2015-10-13 13:32:47 PDT
rdar://problem/23094475
Comment 2 Chris Dumez 2015-10-13 14:52:21 PDT
Created attachment 263023 [details]
Patch
Comment 3 Chris Dumez 2015-10-13 14:58:03 PDT
I unfortunately did not see an impact on PLT locally.
Comment 4 Antti Koivisto 2015-10-14 00:24:55 PDT
Comment on attachment 263023 [details]
Patch

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

> LayoutTests/fast/preloader/frame-src.html:13
> +<html>
> +<head>
> +<script src="../../resources/js-test-pre.js"></script>
> +<script src="http://127.0.0.1:8000/resources/slow-script.pl?delay=100"></script>
> +<script>
> +    shouldBeTrue('internals.isPreloaded("resources/testFrame.html");');
> +</script>
> +</head>
> +<body>
> +<p>Tests that iframes are preloaded.</p>
> +<iframe src="resources/testFrame.html"></iframe>
> +</body>
> +</html>

This test verifies that the iframe is preloaded but not that the preloaded resources is actually used (and doesn't just load again). Could you change it so that it verifies this too? This should happen even if the resource is uncacheable (as it often is).
Comment 5 Chris Dumez 2015-10-14 11:36:29 PDT
Created attachment 263091 [details]
Patch
Comment 6 Chris Dumez 2015-10-14 11:37:41 PDT
Comment on attachment 263091 [details]
Patch

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

> LayoutTests/fast/preloader/frame-src-expected.txt:2
> +testFrame.html has MIME type text/html

I now dump the responses so we see the frame is only requested once. Is this sufficient or did you have something else in mind?
Comment 7 Antti Koivisto 2015-10-15 06:48:51 PDT
Comment on attachment 263091 [details]
Patch

It would be also good to have the test ensure that this works when testFrame is served no-store (like it often is).
Comment 8 Chris Dumez 2015-10-15 10:09:40 PDT
Created attachment 263167 [details]
Patch
Comment 9 Chris Dumez 2015-10-15 10:10:03 PDT
(In reply to comment #7)
> Comment on attachment 263091 [details]
> Patch
> 
> It would be also good to have the test ensure that this works when testFrame
> is served no-store (like it often is).

Added such test in the patch.
Comment 10 Build Bot 2015-10-15 10:47:39 PDT
Comment on attachment 263167 [details]
Patch

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

New failing tests:
fast/preloader/frame-src.html
Comment 11 Build Bot 2015-10-15 10:47:43 PDT
Created attachment 263172 [details]
Archive of layout-test-results from ews106 for mac-mavericks-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-mavericks-wk2  Platform: Mac OS X 10.9.5
Comment 12 Chris Dumez 2015-10-16 09:20:57 PDT
Created attachment 263273 [details]
Patch
Comment 13 WebKit Commit Bot 2015-10-16 10:06:43 PDT
Comment on attachment 263273 [details]
Patch

Clearing flags on attachment: 263273

Committed r191180: <http://trac.webkit.org/changeset/191180>
Comment 14 WebKit Commit Bot 2015-10-16 10:06:50 PDT
All reviewed patches have been landed.  Closing bug.