Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d49fe62f68615a250dc40a95a5a0aad8f6625bab
https://github.com/WebKit/WebKit/commit/d49fe62f68615a250dc40a95a5a0aad8f6625bab
Author: Anne van Kesteren <[email protected]>
Date: 2025-07-23 (Wed, 23 Jul 2025)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/custom-elements/registries/CustomElementRegistry-upgrade-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/custom-elements/registries/Document-importNode-cross-document.window-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/custom-elements/registries/Document-importNode-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/custom-elements/registries/adoption.window-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/custom-elements/registries/global.window-expected.txt
M Source/WebCore/dom/ContainerNode.cpp
M Source/WebCore/dom/CustomElementRegistry.cpp
M Source/WebCore/dom/CustomElementRegistry.h
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/dom/Element.cpp
M Source/WebCore/dom/Element.h
M Source/WebCore/dom/ShadowRoot.cpp
M Source/WebCore/dom/TreeScope.cpp
M Source/WebCore/dom/TreeScope.h
M Source/WebCore/page/LocalDOMWindow.cpp
Log Message:
-----------
Align Scoped Custom Element Registries with latest specification
https://bugs.webkit.org/show_bug.cgi?id=295337
rdar://155438084
Reviewed by Ryosuke Niwa.
WebKit's current implementation is not aligned with the DOM and HTML
standards in these ways:
1. When cloning, children of ShadowRoot nodes can have their registry
impacted. This is not supposed to happen as that violates
encapsulation.
2. When cloning, the supplied registry is not treated as a fallback. A
clone of a node with a non-null registry can end up with a different
registry. This is not supposed to happen.
3. The global registry is only sometimes confined to its original
document. As we want consistent behavior, we make it always belong
to a single document and nodes that use that registry will use a new
global registry (or null) when moving into another document going
forward.
4. To ensure that confinement and allow for flexibility, we're also
adding exceptions.
One edge case that is not tackled by this PR is that a global registry
element does not become a null registry element when inserted into a
scoped registry document. (Instead it starts using the scoped registry,
which is wrong.)
Canonical link: https://commits.webkit.org/297779@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes