Skip to content
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

Add declarative Shadow DOM features #5465

Merged
merged 14 commits into from
Oct 29, 2023
Merged

Conversation

mfreed7
Copy link
Contributor

@mfreed7 mfreed7 commented Apr 17, 2020

The explainer for this feature is here: https://github.com/mfreed7/declarative-shadow-dom/blob/master/README.md
The issue discussion is here: whatwg/dom#831
There is a corresponding Pull Request for the DOM spec that goes along with this PR.

Closes #7069


/acknowledgements.html ( diff )
/document-lifecycle.html ( diff )
/document-sequences.html ( diff )
/dynamic-markup-insertion.html ( diff )
/indices.html ( diff )
/infrastructure.html ( diff )
/parsing.html ( diff )
/scripting.html ( diff )

@sideshowbarker sideshowbarker added the impacts documentation Used by documentation communities, such as MDN, to track changes that impact documentation label Apr 18, 2020
@annevk annevk added needs implementer interest Moving the issue forward requires implementers to express interest topic: shadow Relates to shadow trees (as defined in DOM) labels Apr 20, 2020
pull bot pushed a commit to Yannic/chromium that referenced this pull request Apr 21, 2020
This CL cleans up the variations of element::attachShadow(), refactoring
the common subset back into attachShadow(). It also replaces the bool
delegates_focus and manual_slotting parameters with enum versions that
are common across declarative and imperative calls.

This CL should not change any functionality.

The spec text comes from my two PRs against DOM [1] and HTML [2].

[1] whatwg/dom#858
[2] whatwg/html#5465

Bug: 1042130
Change-Id: I3835b9d344d8005b6854909f287083cd984e832e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2155144
Commit-Queue: Mason Freed <masonfreed@chromium.org>
Auto-Submit: Mason Freed <masonfreed@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#760704}
@mfreed7
Copy link
Contributor Author

mfreed7 commented May 4, 2020

Ok, I believe this PR is ready for review. This is my first time with a PR of this size against HTML so please let me know what I need to change. All of this PR has now been implemented in Chromium behind the DeclarativeShadowDOM flag, and WPT tests have been written.

@mfreed7
Copy link
Contributor Author

mfreed7 commented May 21, 2020

Any comments on this PR? No rush, just bumping it in case people would like to take a look.

Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this doesn't properly introduce all the new template attributes and adds them to the various indexes (top of the source document has instructions). I guess some special care is needed given they seem to be parser-only.

source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
@mfreed7
Copy link
Contributor Author

mfreed7 commented Jun 11, 2020

It seems this doesn't properly introduce all the new template attributes and adds them to the various indexes (top of the source document has instructions). I guess some special care is needed given they seem to be parser-only.

Thanks for the review! I believe I've addressed all of your comments, but let me know if I missed anything. Note that the latest push also includes the addition of closed shadow roots to the serialization algorithm, which is used by my latest code in the DOM PR.

@mfreed7
Copy link
Contributor Author

mfreed7 commented Aug 4, 2020

Just checking in on this PR. Is there anything missing, other than multi-implementer interest?

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 4, 2020
This CL implements most of the suggestions from [1], which effectively
block declarative Shadow DOM from being used by any fragment parser
entry point, unless an explicit opt-in is toggled.

The opt-ins include:
 - DOMParser.allowDeclarativeShadowDom = true;
 - HTMLTemplateElement.allowDeclarativeShadowDom = true;
 - XMLHttpRequest.allowDeclarativeShadowDom = true;
 - DocumentFragment.allowDeclarativeShadowDom = true;
 - Document.allowDeclarativeShadowDom = true; // For innerHTML
 - A new <iframe> sandbox flag: allow-declarative-shadow-dom

This mitigates the potential client-side XSS sanitizer bypass detailed
in the explainer and at [1]. Assuming these changes are functional,
and mitigate the issue, this new behavior will be folded into the
spec PRs at [2] and [3]. But given the security implications of the
existing code, I'd like to get this landed first.

[1] whatwg/dom#912 (comment)
[2] whatwg/html#5465
[3] whatwg/dom#892

Bug: 1042130
Change-Id: I088f28f63078a0d26e354a4442494c0132b47ffc
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 5, 2020
This CL implements most of the suggestions from [1], which effectively
block declarative Shadow DOM from being used by any fragment parser
entry point, unless an explicit opt-in is toggled.

The opt-ins include:
 - DOMParser.allowDeclarativeShadowDom = true;
 - HTMLTemplateElement.allowDeclarativeShadowDom = true;
 - XMLHttpRequest.allowDeclarativeShadowDom = true;
 - DocumentFragment.allowDeclarativeShadowDom = true;
 - Document.allowDeclarativeShadowDom = true; // For innerHTML
 - A new <iframe> sandbox flag: allow-declarative-shadow-dom

This mitigates the potential client-side XSS sanitizer bypass detailed
in the explainer and at [1]. Assuming these changes are functional,
and mitigate the issue, this new behavior will be folded into the
spec PRs at [2] and [3]. But given the security implications of the
existing code, I'd like to get this landed first.

[1] whatwg/dom#912 (comment)
[2] whatwg/html#5465
[3] whatwg/dom#892

Bug: 1042130
Change-Id: I088f28f63078a0d26e354a4442494c0132b47ffc
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 5, 2020
This CL implements most of the suggestions from [1], which effectively
block declarative Shadow DOM from being used by any fragment parser
entry point, unless an explicit opt-in is toggled.

The opt-ins include:
 - DOMParser.allowDeclarativeShadowDom = true;
 - HTMLTemplateElement.allowDeclarativeShadowDom = true;
 - XMLHttpRequest.allowDeclarativeShadowDom = true;
 - DocumentFragment.allowDeclarativeShadowDom = true;
 - Document.allowDeclarativeShadowDom = true; // For innerHTML
 - A new <iframe> sandbox flag: allow-declarative-shadow-dom

This mitigates the potential client-side XSS sanitizer bypass detailed
in the explainer and at [1]. Assuming these changes are functional,
and mitigate the issue, this new behavior will be folded into the
spec PRs at [2] and [3]. But given the security implications of the
existing code, I'd like to get this landed first.

[1] whatwg/dom#912 (comment)
[2] whatwg/html#5465
[3] whatwg/dom#892

Bug: 1042130
Change-Id: I088f28f63078a0d26e354a4442494c0132b47ffc
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 5, 2020
This CL implements most of the suggestions from [1], which effectively
block declarative Shadow DOM from being used by any fragment parser
entry point, unless an explicit opt-in is toggled.

The opt-ins include:
 - DOMParser.allowDeclarativeShadowDom = true;
 - HTMLTemplateElement.allowDeclarativeShadowDom = true;
 - XMLHttpRequest.allowDeclarativeShadowDom = true;
 - DocumentFragment.allowDeclarativeShadowDom = true;
 - Document.allowDeclarativeShadowDom = true; // For innerHTML
 - A new <iframe> sandbox flag: allow-declarative-shadow-dom

This mitigates the potential client-side XSS sanitizer bypass detailed
in the explainer and at [1]. Assuming these changes are functional,
and mitigate the issue, this new behavior will be folded into the
spec PRs at [2] and [3]. But given the security implications of the
existing code, I'd like to get this landed first.

[1] whatwg/dom#912 (comment)
[2] whatwg/html#5465
[3] whatwg/dom#892

Bug: 1042130
Change-Id: I088f28f63078a0d26e354a4442494c0132b47ffc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2513525
Commit-Queue: Mason Freed <masonfreed@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#824591}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 5, 2020
This CL implements most of the suggestions from [1], which effectively
block declarative Shadow DOM from being used by any fragment parser
entry point, unless an explicit opt-in is toggled.

The opt-ins include:
 - DOMParser.allowDeclarativeShadowDom = true;
 - HTMLTemplateElement.allowDeclarativeShadowDom = true;
 - XMLHttpRequest.allowDeclarativeShadowDom = true;
 - DocumentFragment.allowDeclarativeShadowDom = true;
 - Document.allowDeclarativeShadowDom = true; // For innerHTML
 - A new <iframe> sandbox flag: allow-declarative-shadow-dom

This mitigates the potential client-side XSS sanitizer bypass detailed
in the explainer and at [1]. Assuming these changes are functional,
and mitigate the issue, this new behavior will be folded into the
spec PRs at [2] and [3]. But given the security implications of the
existing code, I'd like to get this landed first.

[1] whatwg/dom#912 (comment)
[2] whatwg/html#5465
[3] whatwg/dom#892

Bug: 1042130
Change-Id: I088f28f63078a0d26e354a4442494c0132b47ffc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2513525
Commit-Queue: Mason Freed <masonfreed@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#824591}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 7, 2020
…arsing to be opt-in, a=testonly

Automatic update from web-platform-tests
Change declarative Shadow DOM fragment parsing to be opt-in

This CL implements most of the suggestions from [1], which effectively
block declarative Shadow DOM from being used by any fragment parser
entry point, unless an explicit opt-in is toggled.

The opt-ins include:
 - DOMParser.allowDeclarativeShadowDom = true;
 - HTMLTemplateElement.allowDeclarativeShadowDom = true;
 - XMLHttpRequest.allowDeclarativeShadowDom = true;
 - DocumentFragment.allowDeclarativeShadowDom = true;
 - Document.allowDeclarativeShadowDom = true; // For innerHTML
 - A new <iframe> sandbox flag: allow-declarative-shadow-dom

This mitigates the potential client-side XSS sanitizer bypass detailed
in the explainer and at [1]. Assuming these changes are functional,
and mitigate the issue, this new behavior will be folded into the
spec PRs at [2] and [3]. But given the security implications of the
existing code, I'd like to get this landed first.

[1] whatwg/dom#912 (comment)
[2] whatwg/html#5465
[3] whatwg/dom#892

Bug: 1042130
Change-Id: I088f28f63078a0d26e354a4442494c0132b47ffc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2513525
Commit-Queue: Mason Freed <masonfreed@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#824591}

--

wpt-commits: b13461b9a46b46eb1b092a58bde2b10418e7a73d
wpt-pr: 26398
sidvishnoi pushed a commit to sidvishnoi/gecko-webmonetization that referenced this pull request Nov 10, 2020
…arsing to be opt-in, a=testonly

Automatic update from web-platform-tests
Change declarative Shadow DOM fragment parsing to be opt-in

This CL implements most of the suggestions from [1], which effectively
block declarative Shadow DOM from being used by any fragment parser
entry point, unless an explicit opt-in is toggled.

The opt-ins include:
 - DOMParser.allowDeclarativeShadowDom = true;
 - HTMLTemplateElement.allowDeclarativeShadowDom = true;
 - XMLHttpRequest.allowDeclarativeShadowDom = true;
 - DocumentFragment.allowDeclarativeShadowDom = true;
 - Document.allowDeclarativeShadowDom = true; // For innerHTML
 - A new <iframe> sandbox flag: allow-declarative-shadow-dom

This mitigates the potential client-side XSS sanitizer bypass detailed
in the explainer and at [1]. Assuming these changes are functional,
and mitigate the issue, this new behavior will be folded into the
spec PRs at [2] and [3]. But given the security implications of the
existing code, I'd like to get this landed first.

[1] whatwg/dom#912 (comment)
[2] whatwg/html#5465
[3] whatwg/dom#892

Bug: 1042130
Change-Id: I088f28f63078a0d26e354a4442494c0132b47ffc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2513525
Commit-Queue: Mason Freed <masonfreed@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#824591}

--

wpt-commits: b13461b9a46b46eb1b092a58bde2b10418e7a73d
wpt-pr: 26398
@mfreed7
Copy link
Contributor Author

mfreed7 commented Nov 24, 2020

This PR has been updated to include the "opt-in" mechanics described in #912. The changes I made here roughly match the current implementation of Chromium, so I'm hoping they're functional. But comments appreciated.

Note that no matter what I do, I am unable to get rid of the "parse error while closing p element" error. I bisected this error down to the addition of <span>include shadow roots flag<span> which does not contain a <p>. Help.

source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 19, 2023
Per the spec discussion:

whatwg/html#5465 (comment)

this changes the expectation for the tests to be:

document.createElement("template").shadowRootMode === ""

rather than === null.

Note that this CL does not change Chromium's behavior, and as such
I cannot check if there are other tests that implicitly also
do a similar check. More tests might need to change once I (or
someone) implements this new behavior in a browser.

Bug: 1379513
Change-Id: I0ea1371d612d524fdecc287f3f1790d601c64982
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 19, 2023
Per the spec discussion:

whatwg/html#5465 (comment)

this changes the expectation for the tests to be:

document.createElement("template").shadowRootMode === ""

rather than === null.

Note that this CL does not change Chromium's behavior, and as such
I cannot check if there are other tests that implicitly also
do a similar check. More tests might need to change once I (or
someone) implements this new behavior in a browser.

Bug: 1379513
Change-Id: I0ea1371d612d524fdecc287f3f1790d601c64982
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 23, 2023
Per the spec discussion:

whatwg/html#5465 (comment)

this changes the expectation for the tests to be:

document.createElement("template").shadowRootMode === ""

rather than === null.

Note that this CL does not change Chromium's behavior, and as such
I cannot check if there are other tests that implicitly also
do a similar check. More tests might need to change once I (or
someone) implements this new behavior in a browser.

Bug: 1379513
Change-Id: I0ea1371d612d524fdecc287f3f1790d601c64982
aarongable pushed a commit to chromium/chromium that referenced this pull request Oct 23, 2023
Per the spec discussion:

whatwg/html#5465 (comment)

this changes the expectation for the tests to be:

document.createElement("template").shadowRootMode === ""

rather than === null.

Note that this CL does not change Chromium's behavior, and as such
I cannot check if there are other tests that implicitly also
do a similar check. More tests might need to change once I (or
someone) implements this new behavior in a browser.

Bug: 1379513
Change-Id: I0ea1371d612d524fdecc287f3f1790d601c64982
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4954120
Commit-Queue: Mason Freed <masonf@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1213658}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 23, 2023
Per the spec discussion:

whatwg/html#5465 (comment)

this changes the expectation for the tests to be:

document.createElement("template").shadowRootMode === ""

rather than === null.

Note that this CL does not change Chromium's behavior, and as such
I cannot check if there are other tests that implicitly also
do a similar check. More tests might need to change once I (or
someone) implements this new behavior in a browser.

Bug: 1379513
Change-Id: I0ea1371d612d524fdecc287f3f1790d601c64982
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4954120
Commit-Queue: Mason Freed <masonf@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1213658}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 23, 2023
Per the spec discussion:

whatwg/html#5465 (comment)

this changes the expectation for the tests to be:

document.createElement("template").shadowRootMode === ""

rather than === null.

Note that this CL does not change Chromium's behavior, and as such
I cannot check if there are other tests that implicitly also
do a similar check. More tests might need to change once I (or
someone) implements this new behavior in a browser.

Bug: 1379513
Change-Id: I0ea1371d612d524fdecc287f3f1790d601c64982
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4954120
Commit-Queue: Mason Freed <masonf@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1213658}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Oct 26, 2023
…ive shadow DOM tests, a=testonly

Automatic update from web-platform-tests
Remove .tentative extension for declarative shadow DOM tests

The spec PR [1] is about to land, so these tests should no longer
be tentative.

[1] whatwg/html#5465

Bug: 1379513
Change-Id: I577abb26b3c29a04f14ddafec7400abadb4119ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4932173
Auto-Submit: Mason Freed <masonf@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1208576}

--

wpt-commits: 6e6d5b9c16edca477916bf2118342160a2fb6243
wpt-pr: 42488
ErichDonGubler pushed a commit to ErichDonGubler/firefox that referenced this pull request Oct 27, 2023
…ive shadow DOM tests, a=testonly

Automatic update from web-platform-tests
Remove .tentative extension for declarative shadow DOM tests

The spec PR [1] is about to land, so these tests should no longer
be tentative.

[1] whatwg/html#5465

Bug: 1379513
Change-Id: I577abb26b3c29a04f14ddafec7400abadb4119ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4932173
Auto-Submit: Mason Freed <masonf@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1208576}

--

wpt-commits: 6e6d5b9c16edca477916bf2118342160a2fb6243
wpt-pr: 42488
@annevk annevk removed the do not merge yet Pull request must not be merged per rationale in comment label Oct 29, 2023
@annevk annevk merged commit 0a829aa into whatwg:main Oct 29, 2023
2 checks passed
annevk added a commit to whatwg/dom that referenced this pull request Oct 29, 2023
Corresponding HTML PR: whatwg/html#5465.

Tests: https://wpt.fyi/results/shadow-dom/declarative.

Closes #831 and closes #912.

Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
@mfreed7
Copy link
Contributor Author

mfreed7 commented Oct 29, 2023

🎉 Thanks for all of the reviews to get this landed!

gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 30, 2023
…ive shadow DOM tests, a=testonly

Automatic update from web-platform-tests
Remove .tentative extension for declarative shadow DOM tests

The spec PR [1] is about to land, so these tests should no longer
be tentative.

[1] whatwg/html#5465

Bug: 1379513
Change-Id: I577abb26b3c29a04f14ddafec7400abadb4119ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4932173
Auto-Submit: Mason Freed <masonfchromium.org>
Commit-Queue: Joey Arhar <jarharchromium.org>
Reviewed-by: Joey Arhar <jarharchromium.org>
Cr-Commit-Position: refs/heads/main{#1208576}

--

wpt-commits: 6e6d5b9c16edca477916bf2118342160a2fb6243
wpt-pr: 42488

UltraBlame original commit: 6b6fe421c8e0858c7ca0cabb67d3d480630583a9
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 30, 2023
…ive shadow DOM tests, a=testonly

Automatic update from web-platform-tests
Remove .tentative extension for declarative shadow DOM tests

The spec PR [1] is about to land, so these tests should no longer
be tentative.

[1] whatwg/html#5465

Bug: 1379513
Change-Id: I577abb26b3c29a04f14ddafec7400abadb4119ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4932173
Auto-Submit: Mason Freed <masonfchromium.org>
Commit-Queue: Joey Arhar <jarharchromium.org>
Reviewed-by: Joey Arhar <jarharchromium.org>
Cr-Commit-Position: refs/heads/main{#1208576}

--

wpt-commits: 6e6d5b9c16edca477916bf2118342160a2fb6243
wpt-pr: 42488

UltraBlame original commit: 6b6fe421c8e0858c7ca0cabb67d3d480630583a9
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 30, 2023
…ive shadow DOM tests, a=testonly

Automatic update from web-platform-tests
Remove .tentative extension for declarative shadow DOM tests

The spec PR [1] is about to land, so these tests should no longer
be tentative.

[1] whatwg/html#5465

Bug: 1379513
Change-Id: I577abb26b3c29a04f14ddafec7400abadb4119ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4932173
Auto-Submit: Mason Freed <masonfchromium.org>
Commit-Queue: Joey Arhar <jarharchromium.org>
Reviewed-by: Joey Arhar <jarharchromium.org>
Cr-Commit-Position: refs/heads/main{#1208576}

--

wpt-commits: 6e6d5b9c16edca477916bf2118342160a2fb6243
wpt-pr: 42488

UltraBlame original commit: 6b6fe421c8e0858c7ca0cabb67d3d480630583a9
@annevk
Copy link
Member

annevk commented Oct 30, 2023

@mfreed7 thank you! For contributing this feature to the web and working on these PRs over a period of three(!) years.

webkit-commit-queue pushed a commit to annevk/WebKit that referenced this pull request Oct 30, 2023
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
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 7, 2023
…hadowRootMode IDL to null, a=testonly

Automatic update from web-platform-tests
Change expectation for invalid/missing shadowRootMode IDL to null

Per the spec discussion:

whatwg/html#5465 (comment)

this changes the expectation for the tests to be:

document.createElement("template").shadowRootMode === ""

rather than === null.

Note that this CL does not change Chromium's behavior, and as such
I cannot check if there are other tests that implicitly also
do a similar check. More tests might need to change once I (or
someone) implements this new behavior in a browser.

Bug: 1379513
Change-Id: I0ea1371d612d524fdecc287f3f1790d601c64982
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4954120
Commit-Queue: Mason Freed <masonf@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1213658}

--

wpt-commits: af6cbc76339f4d2bd67bcee8e1d9b3be879853eb
wpt-pr: 42619
vinnydiehl pushed a commit to vinnydiehl/mozilla-unified that referenced this pull request Nov 7, 2023
…hadowRootMode IDL to null, a=testonly

Automatic update from web-platform-tests
Change expectation for invalid/missing shadowRootMode IDL to null

Per the spec discussion:

whatwg/html#5465 (comment)

this changes the expectation for the tests to be:

document.createElement("template").shadowRootMode === ""

rather than === null.

Note that this CL does not change Chromium's behavior, and as such
I cannot check if there are other tests that implicitly also
do a similar check. More tests might need to change once I (or
someone) implements this new behavior in a browser.

Bug: 1379513
Change-Id: I0ea1371d612d524fdecc287f3f1790d601c64982
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4954120
Commit-Queue: Mason Freed <masonf@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1213658}

--

wpt-commits: af6cbc76339f4d2bd67bcee8e1d9b3be879853eb
wpt-pr: 42619
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Nov 8, 2023
…hadowRootMode IDL to null, a=testonly

Automatic update from web-platform-tests
Change expectation for invalid/missing shadowRootMode IDL to null

Per the spec discussion:

whatwg/html#5465 (comment)

this changes the expectation for the tests to be:

document.createElement("template").shadowRootMode === ""

rather than === null.

Note that this CL does not change Chromium's behavior, and as such
I cannot check if there are other tests that implicitly also
do a similar check. More tests might need to change once I (or
someone) implements this new behavior in a browser.

Bug: 1379513
Change-Id: I0ea1371d612d524fdecc287f3f1790d601c64982
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4954120
Commit-Queue: Mason Freed <masonfchromium.org>
Auto-Submit: Mason Freed <masonfchromium.org>
Reviewed-by: Joey Arhar <jarharchromium.org>
Cr-Commit-Position: refs/heads/main{#1213658}

--

wpt-commits: af6cbc76339f4d2bd67bcee8e1d9b3be879853eb
wpt-pr: 42619

UltraBlame original commit: 36bafbbc0d89633570c02ee499f4ae40db42c4b0
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Nov 8, 2023
…hadowRootMode IDL to null, a=testonly

Automatic update from web-platform-tests
Change expectation for invalid/missing shadowRootMode IDL to null

Per the spec discussion:

whatwg/html#5465 (comment)

this changes the expectation for the tests to be:

document.createElement("template").shadowRootMode === ""

rather than === null.

Note that this CL does not change Chromium's behavior, and as such
I cannot check if there are other tests that implicitly also
do a similar check. More tests might need to change once I (or
someone) implements this new behavior in a browser.

Bug: 1379513
Change-Id: I0ea1371d612d524fdecc287f3f1790d601c64982
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4954120
Commit-Queue: Mason Freed <masonfchromium.org>
Auto-Submit: Mason Freed <masonfchromium.org>
Reviewed-by: Joey Arhar <jarharchromium.org>
Cr-Commit-Position: refs/heads/main{#1213658}

--

wpt-commits: af6cbc76339f4d2bd67bcee8e1d9b3be879853eb
wpt-pr: 42619

UltraBlame original commit: 36bafbbc0d89633570c02ee499f4ae40db42c4b0
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Nov 8, 2023
…hadowRootMode IDL to null, a=testonly

Automatic update from web-platform-tests
Change expectation for invalid/missing shadowRootMode IDL to null

Per the spec discussion:

whatwg/html#5465 (comment)

this changes the expectation for the tests to be:

document.createElement("template").shadowRootMode === ""

rather than === null.

Note that this CL does not change Chromium's behavior, and as such
I cannot check if there are other tests that implicitly also
do a similar check. More tests might need to change once I (or
someone) implements this new behavior in a browser.

Bug: 1379513
Change-Id: I0ea1371d612d524fdecc287f3f1790d601c64982
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4954120
Commit-Queue: Mason Freed <masonfchromium.org>
Auto-Submit: Mason Freed <masonfchromium.org>
Reviewed-by: Joey Arhar <jarharchromium.org>
Cr-Commit-Position: refs/heads/main{#1213658}

--

wpt-commits: af6cbc76339f4d2bd67bcee8e1d9b3be879853eb
wpt-pr: 42619

UltraBlame original commit: 36bafbbc0d89633570c02ee499f4ae40db42c4b0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impacts documentation Used by documentation communities, such as MDN, to track changes that impact documentation topic: shadow Relates to shadow trees (as defined in DOM)
Development

Successfully merging this pull request may close these issues.

Allow speculative fetches in Declarative Shadow DOM template elements
10 participants