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

Issue 2589383002: Do not push the custom element construction stack in some cases. (Closed)

Created:
4 years ago by dominicc (has gone to gerrit)
Modified:
4 years ago
Reviewers:
haraken, blink-reviews-bindings, kojii
CC:
blink-reviews, blink-reviews-bindings_chromium.org, blink-reviews-w3ctests_chromium.org, chromium-reviews, tfarina
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Do not push the custom element construction stack in some cases. The custom element construction stack arranges rendezvous between an existing element and the super() call in a custom element constructor, for example when doing "upgrade". Blink had been pushing the construction stack as a way to get imports created in the right (import) document, even when that element is created by createElement or by the parser in "synchronous custom elements" mode (for example, parsing import documents, not fragments). This caused us to fail the spirit of the imported/wpt/custom-elements/parser/parser-uses-constructed-element.html tests. Note that test is itself buggy; I am fixing that upstream in https://github.com/w3c/web-platform-tests/pull/4373 Unfortunately, there's still the question of what to do for elements in import documents. For now I have left the behavior unchanged by special casing imports, which means elements in import documents will keep the subtly non-compliant behavior in recursive creation cases. Another possible approach would be to create the elements in the main document but then adopt them into the import document. This would at least be "explained" by the adoptedCallback. This change is covered by our tests in custom-elements/spec/construct.html BUG=676232 Committed: https://crrev.com/85393cb1a42b466e08b54cdb900a880c1742bb7b Cr-Commit-Position: refs/heads/master@{#440358}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Remove redundant scope and rebase. #

Messages

Total messages: 22 (15 generated)
dominicc (has gone to gerrit)
blink-reviews-bindings: PTAL bindings/... kojii: PTAL
4 years ago (2016-12-21 06:18:27 UTC) #4
haraken
bindings/ LGTM https://codereview.chromium.org/2589383002/diff/1/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp File third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp (right): https://codereview.chromium.org/2589383002/diff/1/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp#newcode206 third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp:206: { This clause looks redundant.
4 years ago (2016-12-21 07:43:57 UTC) #8
dominicc (has gone to gerrit)
Remove redundant scope and rebase.
4 years ago (2016-12-22 03:47:57 UTC) #9
kojii
lgtm, the rniwa's test breaking our assumption is interesting ;)
4 years ago (2016-12-22 04:31:08 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2589383002/20001
4 years ago (2016-12-22 07:53:38 UTC) #17
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years ago (2016-12-22 07:57:15 UTC) #20
commit-bot: I haz the power
4 years ago (2016-12-22 07:59:34 UTC) #22
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/85393cb1a42b466e08b54cdb900a880c1742bb7b
Cr-Commit-Position: refs/heads/master@{#440358}

Powered by Google App Engine
This is Rietveld 408576698