Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(106)

Issue 976263002: HTML Imports: Teach preloader about HTML Imports. (Closed)

Created:
5 years, 1 month ago by yoichio
Modified:
4 years, 10 months ago
Reviewers:
Yoav Weiss, Mike West
CC:
Mike West, arv+blink, blink-reviews, blink-reviews-html_chromium.org, Inactive, dglazkov+blink, gavinp+loader_chromium.org, Nate Chapin, tyoshino+watch_chromium.org, vivekg_samsung, vivekg
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

HTML 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -29 lines) Patch
M LayoutTests/http/tests/htmlimports/import-async.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/htmlimports/import-cors-credentials.html View 1 chunk +5 lines, -13 lines 0 comments Download
A LayoutTests/http/tests/htmlimports/import-preload.html View 1 1 chunk +20 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/htmlimports/import-preload-expected.txt View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/htmlimports/resources/hello.css View 1 chunk +4 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/htmlimports/resources/hello.js View 1 chunk +3 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/htmlimports/resources/import-cors-credentials-body.html View 1 chunk +6 lines, -8 lines 0 comments Download
A LayoutTests/http/tests/htmlimports/resources/preload.html View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M LayoutTests/http/tests/resources/redirect.php View 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/html/parser/HTMLPreloadScanner.cpp View 5 chunks +6 lines, -1 line 0 comments Download
M Source/core/html/parser/HTMLResourcePreloader.cpp View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/html/parser/PreloadRequest.cpp View 1 chunk +8 lines, -0 lines 0 comments Download
M Source/core/loader/DocumentLoader.cpp View 1 2 1 chunk +12 lines, -4 lines 0 comments Download
M Source/core/testing/Internals.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/testing/Internals.cpp View 1 2 1 chunk +7 lines, -1 line 0 comments Download
M Source/core/testing/Internals.idl View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 26 (12 generated)
yoichio
4 years, 10 months ago (2015-06-09 04:22:22 UTC) #8
Yoav Weiss
On 2015/06/09 04:22:22, yoichio wrote: Thanks! :) For the ResourceFetcher parts, you may want to ...
4 years, 10 months ago (2015-06-09 07:30:23 UTC) #9
Yoav Weiss
A few comments and questions. Also, from the spec: "The import is fetched and applied ...
4 years, 10 months ago (2015-06-09 07:53:40 UTC) #10
yoichio
> Also - why was moritta's patch reverted? The patch was reverted because of other ...
4 years, 10 months ago (2015-06-11 04:27:44 UTC) #11
Yoav Weiss
On 2015/06/11 04:27:44, yoichio wrote: > > Also - why was moritta's patch reverted? > ...
4 years, 10 months ago (2015-06-11 10:38:30 UTC) #12
Yoav Weiss
https://codereview.chromium.org/976263002/diff/120001/LayoutTests/http/tests/htmlimports/import-cors-credentials.html File LayoutTests/http/tests/htmlimports/import-cors-credentials.html (right): https://codereview.chromium.org/976263002/diff/120001/LayoutTests/http/tests/htmlimports/import-cors-credentials.html#newcode9 LayoutTests/http/tests/htmlimports/import-cors-credentials.html:9: window.location = "resources/import-cors-credentials-body.html"; On 2015/06/11 04:27:43, yoichio wrote: > ...
4 years, 10 months ago (2015-06-11 10:50:47 UTC) #13
Mike West
https://codereview.chromium.org/976263002/diff/140001/Source/core/html/parser/PreloadRequest.cpp File Source/core/html/parser/PreloadRequest.cpp (right): https://codereview.chromium.org/976263002/diff/140001/Source/core/html/parser/PreloadRequest.cpp#newcode41 Source/core/html/parser/PreloadRequest.cpp:41: On 2015/06/11 at 10:50:47, Yoav Weiss wrote: > OK, ...
4 years, 10 months ago (2015-06-12 07:33:04 UTC) #15
yoichio
> Why? This resource is not really needed for first load, and therefore adding it ...
4 years, 10 months ago (2015-06-16 05:13:09 UTC) #16
Mike West
LGTM.
4 years, 10 months ago (2015-06-16 06:50:17 UTC) #17
Yoav Weiss
On 2015/06/16 06:50:17, Mike West wrote: > LGTM. LGTM2
4 years, 10 months ago (2015-06-16 07:04:05 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/976263002/140001
4 years, 10 months ago (2015-06-16 07:40:47 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: mac_blink_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/mac_blink_rel/builds/59035)
4 years, 10 months ago (2015-06-16 07:43:55 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/976263002/160001
4 years, 10 months ago (2015-06-17 13:06:15 UTC) #25
commit-bot: I haz the power
4 years, 10 months ago (2015-06-17 13:50:35 UTC) #26
Message was sent while issue was closed.
Committed patchset #3 (id:160001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=197260

Powered by Google App Engine
This is Rietveld 408576698