Chromium Code Reviews
DescriptionDo 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)
|
||||||||||||||||||||||||||||||||||||||||||||||