|
Implement bare-bones of HTMLImports
This CL includes following parts of HTMLImports
- HTMLLinkElement.import property
- Single-level imports loading
- Duplication management - Imports of same URL point same DocumentFragment
- Proper CORS control
But it doesn't have:
- Sub-import loading,
- Anything more than DOM tree construction (like running script, etc.),
- Reasonable performance: No progressive HTML parsing, no prefetching.
This change introduces two major classes:
HTMLImportsController and LinkImport:
- The controller is a per-master-document registry of imports. It tracks
all imports in the master document.
- LinkImport is a dual of LinkStyle. It manages per-element states
like imported document fragment. LinkImport is a client of
CachedResource.
Several parts of the core module are extended to adopt HTMLImports:
- HTMLScriptRunner and StyleElement becomes aware of blocking imports.
They pauses until all imports, not only stylesheets, are loaded before execution.
- HTMLLinkElement adopts rel=import attribute and create
a LinkImport instance instead of one of LinkStyle for the attribute.
- LinkResource superclass is pulled out from LinkStyle
and new LinkImport derives from it.
BUG= 240592
TEST=fast/html/imports/, http/tests/htmlimports/
R=dglazkov@chromium.org
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=151523
Total comments: 13
Total comments: 13
Total comments: 1
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+950 lines, -129 lines) |
Patch |
|
A |
LayoutTests/fast/html/imports/import-insert.html
|
View
|
|
1 chunk |
+44 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/fast/html/imports/import-insert-expected.txt
|
View
|
|
1 chunk |
+8 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/fast/html/imports/import-owner.html
|
View
|
1
2
|
1 chunk |
+16 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/fast/html/imports/import-owner-expected.txt
|
View
|
1
2
|
1 chunk |
+7 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/fast/html/imports/import-remove.html
|
View
|
|
1 chunk |
+27 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/fast/html/imports/import-remove-expected.txt
|
View
|
|
1 chunk |
+9 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/fast/html/imports/import-same-url.html
|
View
|
|
1 chunk |
+15 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/fast/html/imports/import-same-url-expected.txt
|
View
|
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/fast/html/imports/import-success-fail.html
|
View
|
1
2
|
1 chunk |
+18 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/fast/html/imports/import-success-fail-expected.txt
|
View
|
1
2
|
1 chunk |
+8 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/fast/html/imports/rel-import-to-style.html
|
View
|
|
1 chunk |
+34 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/fast/html/imports/rel-import-to-style-expected.txt
|
View
|
|
1 chunk |
+11 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/fast/html/imports/rel-style-to-import.html
|
View
|
|
1 chunk |
+34 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/fast/html/imports/rel-style-to-import-expected.txt
|
View
|
|
1 chunk |
+11 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/fast/html/imports/resources/bye.css
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
A + |
LayoutTests/fast/html/imports/resources/bye.html
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
A + |
LayoutTests/fast/html/imports/resources/hello.css
|
View
|
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
|
A + |
LayoutTests/fast/html/imports/resources/hello.html
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
A |
LayoutTests/fast/html/imports/resources/import-helpers.js
|
View
|
|
1 chunk |
+48 lines, -0 lines |
0 comments
|
Download
|
|
A + |
LayoutTests/fast/html/imports/resources/placeholder.html
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
A |
LayoutTests/http/tests/htmlimports/block-cookies.html
|
View
|
1
|
1 chunk |
+14 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/http/tests/htmlimports/block-cookies-expected.txt
|
View
|
1
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/http/tests/htmlimports/cors-same-origin.html
|
View
|
1
|
1 chunk |
+13 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/http/tests/htmlimports/cors-same-origin-expected.txt
|
View
|
1
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
A + |
LayoutTests/http/tests/htmlimports/cross-origin.html
|
View
|
1
|
1 chunk |
+3 lines, -4 lines |
0 comments
|
Download
|
|
A + |
LayoutTests/http/tests/htmlimports/cross-origin-expected.txt
|
View
|
1
|
1 chunk |
+5 lines, -3 lines |
0 comments
|
Download
|
|
A |
LayoutTests/http/tests/htmlimports/resources/cookie.cgi
|
View
|
1
|
1 chunk |
+9 lines, -0 lines |
0 comments
|
Download
|
|
A + |
LayoutTests/http/tests/htmlimports/resources/cors-basic.cgi
|
View
|
1
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
|
A |
LayoutTests/http/tests/htmlimports/resources/hello.html
|
View
|
1
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
A + |
LayoutTests/http/tests/htmlimports/same-origin.html
|
View
|
1
|
1 chunk |
+3 lines, -4 lines |
0 comments
|
Download
|
|
A |
LayoutTests/http/tests/htmlimports/same-origin-expected.txt
|
View
|
1
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/core/core.gypi
|
View
|
1
2
3
4
5
6
|
2 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/core/css/StyleSheetContents.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
Source/core/dom/Document.h
|
View
|
1
2
3
|
5 chunks |
+10 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/Document.cpp
|
View
|
1
2
3
|
4 chunks |
+29 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/ScriptElement.cpp
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
Source/core/dom/ScriptableDocumentParser.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
A |
Source/core/html/HTMLImportsController.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+119 lines, -0 lines |
0 comments
|
Download
|
|
A |
Source/core/html/HTMLImportsController.cpp
|
View
|
1
2
3
|
1 chunk |
+237 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/core/html/HTMLLinkElement.h
|
View
|
1
2
3
4
5
6
|
6 chunks |
+31 lines, -13 lines |
0 comments
|
Download
|
|
M |
Source/core/html/HTMLLinkElement.cpp
|
View
|
1
2
3
|
7 chunks |
+46 lines, -18 lines |
0 comments
|
Download
|
|
M |
Source/core/html/HTMLLinkElement.idl
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/core/html/LinkRelAttribute.h
|
View
|
|
1 chunk |
+8 lines, -7 lines |
0 comments
|
Download
|
|
M |
Source/core/html/LinkRelAttribute.cpp
|
View
|
|
2 chunks |
+10 lines, -4 lines |
0 comments
|
Download
|
|
A + |
Source/core/html/LinkResource.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+34 lines, -26 lines |
0 comments
|
Download
|
|
A + |
Source/core/html/LinkResource.cpp
|
View
|
|
1 chunk |
+17 lines, -18 lines |
0 comments
|
Download
|
|
M |
Source/core/html/parser/HTMLDocumentParser.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
Source/core/html/parser/HTMLDocumentParser.cpp
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/html/parser/HTMLScriptRunner.h
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
Source/core/html/parser/HTMLScriptRunner.cpp
|
View
|
|
4 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
|
M |
Source/core/tests/LinkRelAttribute.cpp
|
View
|
1
|
3 chunks |
+6 lines, -1 line |
0 comments
|
Download
|
Total messages: 20 (0 generated)
|