-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Declarative shadow trees: getInnerHTML() is non-standard #42833
Conversation
Also test shadowRootMode setter.
A longer explanation of this feature can be found at https://github.com/mfreed7/declarative-shadow-dom/blob/master/README.md. It was originally discussed in whatwg/dom#831. Corresponding DOM PR: whatwg/dom#892. Tests: shadow-dom/declarative in WPT with web-platform-tests/wpt#42833 being the latest PR as of this commit. Closes #7069.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with one change to the test description
@@ -101,7 +101,7 @@ | |||
fragment = parser.parseFromString(content, 'text/html', {includeShadowRoots: false}); | |||
assert_dsd(fragment.body,false); | |||
fragment = parser.parseFromString(content, 'text/html', {includeShadowRoots: true}); | |||
assert_dsd(fragment.body,true); | |||
assert_dsd(fragment.body,false); | |||
}, 'DOMParser'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change the description of this test to indicate "includeShadowRoots is non-standard" or something similar?
t.shadowRootMode = 'CLOSED'; | ||
assert_equals(t.shadowRootMode, 'closed'); | ||
t.getAttribute('shadowrootmode', 'CLOSED'); | ||
}, 'Shadowrootmode reflection, setter'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
Commit title: Commit body:
|
https://bugs.webkit.org/show_bug.cgi?id=263852 rdar://117655691 Reviewed by Ryosuke Niwa. As discussed in whatwg/html#5465 shadowRootMode is to be reflected as DOMString, not DOMString?. DOMParser will also no longer be extended to have a dictionary argument. The tests have been synchronized with web-platform-tests up until and including web-platform-tests/wpt#42833 which upstreamed a couple minor adjustments. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-after-attachshadow-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-after-attachshadow.tentative-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-after-attachshadow.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-after-attachshadow.tentative.html. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-parser-interaction-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-parser-interaction.tentative-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-parser-interaction.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-parser-interaction.tentative.html. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-attachment-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-attachment.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-attachment.tentative.html. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-attachment.tentative-expected.txt: Removed. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-basic-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-basic.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-basic.tentative.html. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-basic.tentative-expected.txt: Removed. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-opt-in-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-opt-in.tentative-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-opt-in.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-opt-in.tentative.html. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-with-disabled-shadow-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-with-disabled-shadow.tentative-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-with-disabled-shadow.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-with-disabled-shadow.tentative.html. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/innerhtml-before-closing-tag-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/innerhtml-before-closing-tag.tentative-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/innerhtml-before-closing-tag.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/innerhtml-before-closing-tag.tentative.html. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/innerhtml-on-ordinary-template.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/innerhtml-on-ordinary-template.tentative.html. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/innerhtml-on-ordinary-template.tentative-expected.txt: Removed. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/move-template-before-closing-tag-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/move-template-before-closing-tag.tentative-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/move-template-before-closing-tag.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/move-template-before-closing-tag.tentative.html. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/script-access-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/script-access.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/script-access.tentative.html. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/script-access.tentative-expected.txt: Removed. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/support/helpers.js: Removed. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/support/w3c-import.log: * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/w3c-import.log: * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: * Source/WebCore/CMakeLists.txt: * Source/WebCore/DerivedSources-input.xcfilelist: * Source/WebCore/DerivedSources-output.xcfilelist: * Source/WebCore/DerivedSources.make: * Source/WebCore/Sources.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/html/HTMLTemplateElement.cpp: (WebCore::HTMLTemplateElement::shadowRootMode const): (WebCore::HTMLTemplateElement::setShadowRootMode): * Source/WebCore/html/HTMLTemplateElement.idl: * Source/WebCore/xml/DOMParser.cpp: (WebCore::DOMParser::parseFromString): * Source/WebCore/xml/DOMParser.h: * Source/WebCore/xml/DOMParser.idl: * Source/WebCore/xml/ParseFromStringOptions.h: Removed. * Source/WebCore/xml/ParseFromStringOptions.idl: Removed. Canonical link: https://commits.webkit.org/269976@main
Also test shadowRootMode setter.