Bug 150097

Summary: HTMLPreloadScanner should preload iframes
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, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 155754    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Archive of layout-test-results from ews106 for mac-mavericks-wk2
none
Patch none

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.