You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://bugs.webkit.org/show_bug.cgi?id=288473
rdar://145557562
Reviewed by Ryosuke Niwa.
This makes a variety of changes to align ourselves with the latest
Scoped Custom Element Registries proposal:
1. Accept DOMString in addition to ElementCreationOptions. This was
already part of the DOM standard and is needed for compatibility.
(Although to be fair the need has not been proven recently, but now
does not seem like the time to find out.)
2. Have createElementNS take the same argument as
createElementForBindings.
3. createHTMLElementWithNameValidation no longer needs both TreeScope
and Document as they are once again the same.
4. Given that createHTMLElementWithNameValidation defaults registry to
document.customElementRegistry it does not seem unlikely that
registry is non-null so remove UNLIKELY there.
5. addToScopedCustomElementRegistryMap needs to be called by
createElementForBindings and createElementNS as it's relevant for
all elements. Since we only need to call it for scoped registries,
we don't have to move the registry defaulting to
document.customElementRegistry logic to these methods.
Tests are upstreamed here:
web-platform-tests/wpt#50925
* LayoutTests/imported/w3c/web-platform-tests/custom-elements/revamped-scoped-registry/Document-createElement.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/custom-elements/revamped-scoped-registry/Document-createElement.tentative.html:
* LayoutTests/imported/w3c/web-platform-tests/custom-elements/revamped-scoped-registry/Document-createElementNS.tentative-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/custom-elements/revamped-scoped-registry/Document-createElementNS.tentative.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/custom-elements/revamped-scoped-registry/w3c-import.log:
* Source/WebCore/dom/Document.cpp:
(WebCore::createHTMLElementWithNameValidation):
(WebCore::Document::createElementForBindings):
(WebCore::Document::createElementNS):
* Source/WebCore/dom/Document.h:
* Source/WebCore/dom/Document.idl:
Canonical link: https://commits.webkit.org/291093@main
Copy file name to clipboardexpand all lines: LayoutTests/imported/w3c/web-platform-tests/custom-elements/revamped-scoped-registry/Document-createElement.tentative.html
+29-5
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,8 @@
8
8
</head>
9
9
<body>
10
10
<script>
11
+
// Keep this ~synchronized with Document-createElementNS
0 commit comments