Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Issue 274213003: HTML Imports: Make sure new imports being added to the "first child" (Closed)

Created:
6 years, 7 months ago by Hajime Morrita
Modified:
6 years, 7 months ago
CC:
blink-reviews, webcomponents-bugzilla_chromium.org, dglazkov+blink, blink-reviews-html_chromium.org
Visibility:
Public.

Description

HTML Imports: Make sure new imports being added to the "first child" The notion of first child was introduced at r171966. That is, The first import of import-tree order should take care of all the subimports of the same URL. This invariant is enforced by HTMLImportLoader::addImport() but its implementation wasn't enough. This change extends it so that the invariant enforcement is done against the subtree, instead of just against the added node itself. TEST=import-normalize-[123]{3}.html R=dominicc@chromium.org,dglazkov@chromium.org BUG=372055 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=173900

Patch Set 1 #

Patch Set 2 : WIP, should work, needs tests #

Patch Set 3 : Ready to review #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+182 lines, -19 lines) Patch
A LayoutTests/http/tests/htmlimports/import-normalize-123.html View 1 2 1 chunk +18 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/htmlimports/import-normalize-123-expected.txt View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/htmlimports/import-normalize-132.html View 1 2 1 chunk +18 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/htmlimports/import-normalize-132-expected.txt View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/htmlimports/import-normalize-213.html View 1 2 1 chunk +18 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/htmlimports/import-normalize-213-expected.txt View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/htmlimports/import-normalize-231.html View 1 2 1 chunk +18 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/htmlimports/import-normalize-231-expected.txt View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/htmlimports/import-normalize-312.html View 1 2 1 chunk +18 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/htmlimports/import-normalize-312-expected.txt View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/htmlimports/import-normalize-321.html View 1 2 1 chunk +18 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/htmlimports/import-normalize-321-expected.txt View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/htmlimports/resources/normalize-child-1.cgi View 1 2 1 chunk +4 lines, -3 lines 0 comments Download
A LayoutTests/http/tests/htmlimports/resources/normalize-child-2.html View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/htmlimports/resources/normalize-child-3.html View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
A + LayoutTests/http/tests/htmlimports/resources/normalize-child-4.html View 1 2 1 chunk +2 lines, -1 line 0 comments Download
A LayoutTests/http/tests/htmlimports/resources/normalize-test-helper.js View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M Source/core/html/imports/HTMLImportChild.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/imports/HTMLImportChild.cpp View 1 2 1 chunk +18 lines, -1 line 1 comment Download
M Source/core/html/imports/HTMLImportLoader.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/html/imports/HTMLImportLoader.cpp View 1 1 chunk +10 lines, -12 lines 0 comments Download
M Source/core/html/imports/HTMLImportsController.cpp View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Hajime Morrita
Could you rubberstamp/review please? I have to merge this to the fresh branch.
6 years, 7 months ago (2014-05-11 02:24:18 UTC) #1
dglazkov
lgtm https://codereview.chromium.org/274213003/diff/40001/Source/core/html/imports/HTMLImportChild.cpp File Source/core/html/imports/HTMLImportChild.cpp (right): https://codereview.chromium.org/274213003/diff/40001/Source/core/html/imports/HTMLImportChild.cpp#newcode220 Source/core/html/imports/HTMLImportChild.cpp:220: void HTMLImportChild::normalize() I apologize, I am trying to ...
6 years, 7 months ago (2014-05-12 17:32:36 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/morrita@chromium.org/274213003/40001
6 years, 7 months ago (2014-05-12 17:32:55 UTC) #3
commit-bot: I haz the power
Change committed as 173900
6 years, 7 months ago (2014-05-12 18:08:43 UTC) #4
Hajime Morrita
6 years, 7 months ago (2014-05-14 08:17:22 UTC) #5
Message was sent while issue was closed.
On 2014/05/12 17:32:36, dglazkov wrote:
> lgtm
> 
>
https://codereview.chromium.org/274213003/diff/40001/Source/core/html/imports...
> File Source/core/html/imports/HTMLImportChild.cpp (right):
> 
>
https://codereview.chromium.org/274213003/diff/40001/Source/core/html/imports...
> Source/core/html/imports/HTMLImportChild.cpp:220: void
> HTMLImportChild::normalize()
> I apologize, I am trying to (re)learn how this works.
> 
> normalize() is invoked in addImport, which itself comes from createLoader or
> shareLoader, which in turn comes from ensureLoader. This is where I get lost.
> The ensureLoader is called in several places, and all of them have to do with
> loading completion or start.
>
> I am not sure I understand why. Can't the ordering be ensured at the time the
> link is processed? Please help me understand :)

This is where I should revise for clarify.
The ensureLoader() is called when each HTMLImportChild is created and added into
import tree.
It used to be created lazily for a reason but no longer is. I'll make a cleanup
change.

Powered by Google App Engine
This is Rietveld 408576698