DescriptionHTML Imports: Teach preloader about HTML Imports.
This change tells HTMLPreloadScanner about <link rel=import> so that
it can preload the resource for the import.
This patch let import load not blocked by previous scripts.
This is a revised patch. The original was written by morrita@ but reverted:
https://codereview.chromium.org/243793006
LayoutTests/http/tests/htmlimports/import-async.html,
LayoutTests/http/tests/resources/redirect.php:
- This test confirms <link rel=import async> doesn't block next script but this
patch
let import load not blocked by previous script. To clarify such two cases, delayed
loading.
LayoutTests/http/tests/htmlimports/import-cors-credentials.html,
LayoutTests/http/tests/htmlimports/resources/import-cors-credentials-body.html:
- Similar to previous case. Load the cookie surely before loading.
LayoutTests/http/tests/htmlimports/import-preload.html,
LayoutTests/http/tests/htmlimports/resources/hello.css,
LayoutTests/http/tests/htmlimports/resources/hello.js,
LayoutTests/http/tests/htmlimports/resources/preload.html:
- This is a main test. While there is slow script before import, we prefetch
resources.
Source/core/fetch/ResourceFetcher.cpp:
- Let ResourceFetcher::preload load import resource.
Source/core/html/parser/HTMLPreloadScanner.cpp:
- Let HTMLPreloadScanner::shouldPreload return true if import.
Source/core/html/parser/PreloadRequest.cpp:
- Set CORS enabled.
Source/core/testing/Internals*:
- Add the helper isPreloadedby(url, document) function generalized of
isPreloaded(url).
BUG=323096
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197260
Patch Set 1 : update #
Total comments: 13
Patch Set 2 : Fix test #
Total comments: 3
Patch Set 3 : Rebase #Messages
Total messages: 26 (12 generated)
|