Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c13b9f161be7e2cfeb05c08a3041a722516c7fed
https://github.com/WebKit/WebKit/commit/c13b9f161be7e2cfeb05c08a3041a722516c7fed
Author: Ryosuke Niwa <[email protected]>
Date: 2025-11-19 (Wed, 19 Nov 2025)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/custom-elements/registries/pseudo-class-defined.window-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/custom-elements/registries/pseudo-class-defined.window.js
A
LayoutTests/imported/w3c/web-platform-tests/custom-elements/registries/scoped-registry-initialize-upgrades-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/custom-elements/registries/scoped-registry-initialize-upgrades.html
M Source/WebCore/bindings/js/JSCustomElementInterface.cpp
M Source/WebCore/dom/CustomElementRegistry.cpp
M Source/WebCore/dom/Document.cpp
Log Message:
-----------
CustomElementRegistry.prototype.initialize should upgrade custom elements
https://bugs.webkit.org/show_bug.cgi?id=302534
Reviewed by Anne van Kesteren.
Implement https://github.com/whatwg/html/pull/11913. This PR also fixes a few
bugs in the existing code, which were revealed by
the newly introduced test.
Test:
imported/w3c/web-platform-tests/custom-elements/registries/scoped-registry-initialize-upgrades.html
*
LayoutTests/imported/w3c/web-platform-tests/custom-elements/registries/pseudo-class-defined.window-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/custom-elements/registries/pseudo-class-defined.window.js:
*
LayoutTests/imported/w3c/web-platform-tests/custom-elements/registries/scoped-registry-initialize-upgrades-expected.txt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/custom-elements/registries/scoped-registry-initialize-upgrades.html:
Added.
* Source/WebCore/bindings/js/JSCustomElementInterface.cpp:
(WebCore::JSCustomElementInterface::tryToConstructCustomElement): Replaced the
bad assertion with a code to get the global object
through the script execution context associated with this custom element
interface.
* Source/WebCore/dom/CustomElementRegistry.cpp:
(WebCore::CustomElementRegistry::initialize): Implement the new semantics.
* Source/WebCore/dom/Document.cpp:
(WebCore::createUpgradeCandidateElement): Call setUsesNullCustomElementRegistry
in the callers of this function (createElementNS
and createElementForBindings).
(WebCore::Document::createElementForBindings):
(WebCore::Document::createElementNS):
Canonical link: https://commits.webkit.org/303250@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications