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 serializable to ShadowRoot and "attach a shadow root" #1256

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

mfreed7
Copy link
Contributor

@mfreed7 mfreed7 commented Feb 16, 2024

Add getHTML() and the serializable concept for shadow roots. See whatwg/html#8867 (comment) for the rough consensus on how this should work, plus the few comments below that with modifications.

See the corresponding HTML spec PR here: whatwg/html#10139


Preview | Diff

dom.bs Outdated Show resolved Hide resolved
@annevk annevk added the topic: shadow Relates to shadow trees (as defined in DOM) label Mar 18, 2024
@mfreed7
Copy link
Contributor Author

mfreed7 commented Mar 18, 2024

Thanks for the review!

@annevk annevk merged commit 2d890bd into whatwg:main Apr 4, 2024
2 checks passed
annevk pushed a commit to whatwg/html that referenced this pull request Apr 4, 2024
Corresponding DOM PR: whatwg/dom#1256.

Closes #8867.

Co-authored-by: Domenic Denicola <d@domenic.me>
rubberyuzu pushed a commit to rubberyuzu/html that referenced this pull request Apr 8, 2024
Corresponding DOM PR: whatwg/dom#1256.

Closes whatwg#8867.

Co-authored-by: Domenic Denicola <d@domenic.me>
rubberyuzu added a commit to rubberyuzu/html that referenced this pull request Apr 8, 2024
Allow top layer elements to be nested within popovers

This allows top layer elements, including the dialog element, to be nested inside of an open popover, by not closing the popover when the new top layer element is opened. Without this patch, opening a modal dialog inside of a popover will make the page inert and make the dialog invisible.

Fixes whatwg#9998. See also whatwg/fullscreen#237.

Editorial: order of comparisons

For consistency:
- greater than or equal to
- less than or equal to

Improve element reflection

This attempts to make the following improvements:

1. Make it more clear that initializing attr is not the first step in an algorithm, but rather something that counts for all the list items.
2. Rewrite the associated element(s) fields as algorithms. As there are no downstream references so far this is a change we can still make.
3. Add another layer of caching that is separate from the FrozenArray to avoid having to compare a list of elements with a FrozenArray directly.

This helps with whatwg#10219.

Disable PageSwapEvent's activation on cross-origin redirects

Closes whatwg#10196.

Upstream Long Animation Frames monkey-patches

Long Animation Frames (https://w3c.github.io/long-animation-frames/) expects a few calls from HTML and other specs, for reporting when tasks, rendering or JS entry points take place. This moves those calls from the Long Animation Frames spec to HTML.

Preload: only allow certain values for as=""

Closes whatwg#8332.

Call the view transition page visibility change steps

This allows the CSS view-transitions spec to react to page visibility changes. Specifically, skip the active transition once a page is hidden.

See w3c/csswg-drafts#9543.

Style marquee using overflow: hidden

This matches Chromium and WebKit. Tests will be worked on in https://bugzilla.mozilla.org/show_bug.cgi?id=306344.

Editorial: export Element's innerText getter and setter steps

These will be used by Trusted Types (and eventually HTML once upstreamed) as part of shadowing this attribute to HTMLScriptElement.

Add getHTML() and serializable shadow roots

Corresponding DOM PR: whatwg/dom#1256.

Closes whatwg#8867.

Co-authored-by: Domenic Denicola <d@domenic.me>

Make buttons respect display: none/contents in button layout

Fixes whatwg#10238. This matches what is already implemented in browsers.

Remove duplicate requirement for 'overflow' for marquee

The duplication was introduced by whatwg#10243.

Meta: make all the SVGs darkmode-aware

Also tag them as such, so that they don't get a white background after whatwg/whatwg.org#439 is merged.

Warn that the XML syntax is not recommended

Closes whatwg#10237.
rubberyuzu added a commit to rubberyuzu/html that referenced this pull request Apr 8, 2024
Allow top layer elements to be nested within popovers

This allows top layer elements, including the dialog element, to be nested inside of an open popover, by not closing the popover when the new top layer element is opened. Without this patch, opening a modal dialog inside of a popover will make the page inert and make the dialog invisible.

Fixes whatwg#9998. See also whatwg/fullscreen#237.

Editorial: order of comparisons

For consistency:
- greater than or equal to
- less than or equal to

Improve element reflection

This attempts to make the following improvements:

1. Make it more clear that initializing attr is not the first step in an algorithm, but rather something that counts for all the list items.
2. Rewrite the associated element(s) fields as algorithms. As there are no downstream references so far this is a change we can still make.
3. Add another layer of caching that is separate from the FrozenArray to avoid having to compare a list of elements with a FrozenArray directly.

This helps with whatwg#10219.

Disable PageSwapEvent's activation on cross-origin redirects

Closes whatwg#10196.

Upstream Long Animation Frames monkey-patches

Long Animation Frames (https://w3c.github.io/long-animation-frames/) expects a few calls from HTML and other specs, for reporting when tasks, rendering or JS entry points take place. This moves those calls from the Long Animation Frames spec to HTML.

Preload: only allow certain values for as=""

Closes whatwg#8332.

Call the view transition page visibility change steps

This allows the CSS view-transitions spec to react to page visibility changes. Specifically, skip the active transition once a page is hidden.

See w3c/csswg-drafts#9543.

Style marquee using overflow: hidden

This matches Chromium and WebKit. Tests will be worked on in https://bugzilla.mozilla.org/show_bug.cgi?id=306344.

Editorial: export Element's innerText getter and setter steps

These will be used by Trusted Types (and eventually HTML once upstreamed) as part of shadowing this attribute to HTMLScriptElement.

Add getHTML() and serializable shadow roots

Corresponding DOM PR: whatwg/dom#1256.

Closes whatwg#8867.

Co-authored-by: Domenic Denicola <d@domenic.me>

Make buttons respect display: none/contents in button layout

Fixes whatwg#10238. This matches what is already implemented in browsers.

Remove duplicate requirement for 'overflow' for marquee

The duplication was introduced by whatwg#10243.

Meta: make all the SVGs darkmode-aware

Also tag them as such, so that they don't get a white background after whatwg/whatwg.org#439 is merged.

Warn that the XML syntax is not recommended

Closes whatwg#10237.
aarongable pushed a commit to chromium/chromium that referenced this pull request Apr 11, 2024
I2S:
 - https://groups.google.com/a/chromium.org/g/blink-dev/c/T4jcCXRkwB8/m/GD81-4bNAAAJ

Spec:
 - whatwg/html#10139
 - whatwg/dom#1256

Fixed: 41490936
Change-Id: Ie9b52d5d7a5aa626f1d9f96326c2d4826e11874f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5427272
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1285896}
rubberyuzu added a commit to rubberyuzu/html that referenced this pull request May 13, 2024
Allow top layer elements to be nested within popovers

This allows top layer elements, including the dialog element, to be nested inside of an open popover, by not closing the popover when the new top layer element is opened. Without this patch, opening a modal dialog inside of a popover will make the page inert and make the dialog invisible.

Fixes whatwg#9998. See also whatwg/fullscreen#237.

Editorial: order of comparisons

For consistency:
- greater than or equal to
- less than or equal to

Improve element reflection

This attempts to make the following improvements:

1. Make it more clear that initializing attr is not the first step in an algorithm, but rather something that counts for all the list items.
2. Rewrite the associated element(s) fields as algorithms. As there are no downstream references so far this is a change we can still make.
3. Add another layer of caching that is separate from the FrozenArray to avoid having to compare a list of elements with a FrozenArray directly.

This helps with whatwg#10219.

Disable PageSwapEvent's activation on cross-origin redirects

Closes whatwg#10196.

Upstream Long Animation Frames monkey-patches

Long Animation Frames (https://w3c.github.io/long-animation-frames/) expects a few calls from HTML and other specs, for reporting when tasks, rendering or JS entry points take place. This moves those calls from the Long Animation Frames spec to HTML.

Preload: only allow certain values for as=""

Closes whatwg#8332.

Call the view transition page visibility change steps

This allows the CSS view-transitions spec to react to page visibility changes. Specifically, skip the active transition once a page is hidden.

See w3c/csswg-drafts#9543.

Style marquee using overflow: hidden

This matches Chromium and WebKit. Tests will be worked on in https://bugzilla.mozilla.org/show_bug.cgi?id=306344.

Editorial: export Element's innerText getter and setter steps

These will be used by Trusted Types (and eventually HTML once upstreamed) as part of shadowing this attribute to HTMLScriptElement.

Add getHTML() and serializable shadow roots

Corresponding DOM PR: whatwg/dom#1256.

Closes whatwg#8867.

Co-authored-by: Domenic Denicola <d@domenic.me>

Make buttons respect display: none/contents in button layout

Fixes whatwg#10238. This matches what is already implemented in browsers.

Remove duplicate requirement for 'overflow' for marquee

The duplication was introduced by whatwg#10243.

Meta: make all the SVGs darkmode-aware

Also tag them as such, so that they don't get a white background after whatwg/whatwg.org#439 is merged.

Warn that the XML syntax is not recommended

Closes whatwg#10237.
rubberyuzu added a commit to rubberyuzu/html that referenced this pull request May 20, 2024
Allow top layer elements to be nested within popovers

This allows top layer elements, including the dialog element, to be nested inside of an open popover, by not closing the popover when the new top layer element is opened. Without this patch, opening a modal dialog inside of a popover will make the page inert and make the dialog invisible.

Fixes whatwg#9998. See also whatwg/fullscreen#237.

Editorial: order of comparisons

For consistency:
- greater than or equal to
- less than or equal to

Improve element reflection

This attempts to make the following improvements:

1. Make it more clear that initializing attr is not the first step in an algorithm, but rather something that counts for all the list items.
2. Rewrite the associated element(s) fields as algorithms. As there are no downstream references so far this is a change we can still make.
3. Add another layer of caching that is separate from the FrozenArray to avoid having to compare a list of elements with a FrozenArray directly.

This helps with whatwg#10219.

Disable PageSwapEvent's activation on cross-origin redirects

Closes whatwg#10196.

Upstream Long Animation Frames monkey-patches

Long Animation Frames (https://w3c.github.io/long-animation-frames/) expects a few calls from HTML and other specs, for reporting when tasks, rendering or JS entry points take place. This moves those calls from the Long Animation Frames spec to HTML.

Preload: only allow certain values for as=""

Closes whatwg#8332.

Call the view transition page visibility change steps

This allows the CSS view-transitions spec to react to page visibility changes. Specifically, skip the active transition once a page is hidden.

See w3c/csswg-drafts#9543.

Style marquee using overflow: hidden

This matches Chromium and WebKit. Tests will be worked on in https://bugzilla.mozilla.org/show_bug.cgi?id=306344.

Editorial: export Element's innerText getter and setter steps

These will be used by Trusted Types (and eventually HTML once upstreamed) as part of shadowing this attribute to HTMLScriptElement.

Add getHTML() and serializable shadow roots

Corresponding DOM PR: whatwg/dom#1256.

Closes whatwg#8867.

Co-authored-by: Domenic Denicola <d@domenic.me>

Make buttons respect display: none/contents in button layout

Fixes whatwg#10238. This matches what is already implemented in browsers.

Remove duplicate requirement for 'overflow' for marquee

The duplication was introduced by whatwg#10243.

Meta: make all the SVGs darkmode-aware

Also tag them as such, so that they don't get a white background after whatwg/whatwg.org#439 is merged.

Warn that the XML syntax is not recommended

Closes whatwg#10237.
rubberyuzu added a commit to rubberyuzu/html that referenced this pull request Jun 17, 2024
Allow top layer elements to be nested within popovers

This allows top layer elements, including the dialog element, to be nested inside of an open popover, by not closing the popover when the new top layer element is opened. Without this patch, opening a modal dialog inside of a popover will make the page inert and make the dialog invisible.

Fixes whatwg#9998. See also whatwg/fullscreen#237.

Editorial: order of comparisons

For consistency:
- greater than or equal to
- less than or equal to

Improve element reflection

This attempts to make the following improvements:

1. Make it more clear that initializing attr is not the first step in an algorithm, but rather something that counts for all the list items.
2. Rewrite the associated element(s) fields as algorithms. As there are no downstream references so far this is a change we can still make.
3. Add another layer of caching that is separate from the FrozenArray to avoid having to compare a list of elements with a FrozenArray directly.

This helps with whatwg#10219.

Disable PageSwapEvent's activation on cross-origin redirects

Closes whatwg#10196.

Upstream Long Animation Frames monkey-patches

Long Animation Frames (https://w3c.github.io/long-animation-frames/) expects a few calls from HTML and other specs, for reporting when tasks, rendering or JS entry points take place. This moves those calls from the Long Animation Frames spec to HTML.

Preload: only allow certain values for as=""

Closes whatwg#8332.

Call the view transition page visibility change steps

This allows the CSS view-transitions spec to react to page visibility changes. Specifically, skip the active transition once a page is hidden.

See w3c/csswg-drafts#9543.

Style marquee using overflow: hidden

This matches Chromium and WebKit. Tests will be worked on in https://bugzilla.mozilla.org/show_bug.cgi?id=306344.

Editorial: export Element's innerText getter and setter steps

These will be used by Trusted Types (and eventually HTML once upstreamed) as part of shadowing this attribute to HTMLScriptElement.

Add getHTML() and serializable shadow roots

Corresponding DOM PR: whatwg/dom#1256.

Closes whatwg#8867.

Co-authored-by: Domenic Denicola <d@domenic.me>

Make buttons respect display: none/contents in button layout

Fixes whatwg#10238. This matches what is already implemented in browsers.

Remove duplicate requirement for 'overflow' for marquee

The duplication was introduced by whatwg#10243.

Meta: make all the SVGs darkmode-aware

Also tag them as such, so that they don't get a white background after whatwg/whatwg.org#439 is merged.

Warn that the XML syntax is not recommended

Closes whatwg#10237.
rubberyuzu added a commit to rubberyuzu/html that referenced this pull request Jun 25, 2024
Allow top layer elements to be nested within popovers

This allows top layer elements, including the dialog element, to be nested inside of an open popover, by not closing the popover when the new top layer element is opened. Without this patch, opening a modal dialog inside of a popover will make the page inert and make the dialog invisible.

Fixes whatwg#9998. See also whatwg/fullscreen#237.

Editorial: order of comparisons

For consistency:
- greater than or equal to
- less than or equal to

Improve element reflection

This attempts to make the following improvements:

1. Make it more clear that initializing attr is not the first step in an algorithm, but rather something that counts for all the list items.
2. Rewrite the associated element(s) fields as algorithms. As there are no downstream references so far this is a change we can still make.
3. Add another layer of caching that is separate from the FrozenArray to avoid having to compare a list of elements with a FrozenArray directly.

This helps with whatwg#10219.

Disable PageSwapEvent's activation on cross-origin redirects

Closes whatwg#10196.

Upstream Long Animation Frames monkey-patches

Long Animation Frames (https://w3c.github.io/long-animation-frames/) expects a few calls from HTML and other specs, for reporting when tasks, rendering or JS entry points take place. This moves those calls from the Long Animation Frames spec to HTML.

Preload: only allow certain values for as=""

Closes whatwg#8332.

Call the view transition page visibility change steps

This allows the CSS view-transitions spec to react to page visibility changes. Specifically, skip the active transition once a page is hidden.

See w3c/csswg-drafts#9543.

Style marquee using overflow: hidden

This matches Chromium and WebKit. Tests will be worked on in https://bugzilla.mozilla.org/show_bug.cgi?id=306344.

Editorial: export Element's innerText getter and setter steps

These will be used by Trusted Types (and eventually HTML once upstreamed) as part of shadowing this attribute to HTMLScriptElement.

Add getHTML() and serializable shadow roots

Corresponding DOM PR: whatwg/dom#1256.

Closes whatwg#8867.

Co-authored-by: Domenic Denicola <d@domenic.me>

Make buttons respect display: none/contents in button layout

Fixes whatwg#10238. This matches what is already implemented in browsers.

Remove duplicate requirement for 'overflow' for marquee

The duplication was introduced by whatwg#10243.

Meta: make all the SVGs darkmode-aware

Also tag them as such, so that they don't get a white background after whatwg/whatwg.org#439 is merged.

Warn that the XML syntax is not recommended

Closes whatwg#10237.
rubberyuzu added a commit to rubberyuzu/html that referenced this pull request Aug 20, 2024
Allow top layer elements to be nested within popovers

This allows top layer elements, including the dialog element, to be nested inside of an open popover, by not closing the popover when the new top layer element is opened. Without this patch, opening a modal dialog inside of a popover will make the page inert and make the dialog invisible.

Fixes whatwg#9998. See also whatwg/fullscreen#237.

Editorial: order of comparisons

For consistency:
- greater than or equal to
- less than or equal to

Improve element reflection

This attempts to make the following improvements:

1. Make it more clear that initializing attr is not the first step in an algorithm, but rather something that counts for all the list items.
2. Rewrite the associated element(s) fields as algorithms. As there are no downstream references so far this is a change we can still make.
3. Add another layer of caching that is separate from the FrozenArray to avoid having to compare a list of elements with a FrozenArray directly.

This helps with whatwg#10219.

Disable PageSwapEvent's activation on cross-origin redirects

Closes whatwg#10196.

Upstream Long Animation Frames monkey-patches

Long Animation Frames (https://w3c.github.io/long-animation-frames/) expects a few calls from HTML and other specs, for reporting when tasks, rendering or JS entry points take place. This moves those calls from the Long Animation Frames spec to HTML.

Preload: only allow certain values for as=""

Closes whatwg#8332.

Call the view transition page visibility change steps

This allows the CSS view-transitions spec to react to page visibility changes. Specifically, skip the active transition once a page is hidden.

See w3c/csswg-drafts#9543.

Style marquee using overflow: hidden

This matches Chromium and WebKit. Tests will be worked on in https://bugzilla.mozilla.org/show_bug.cgi?id=306344.

Editorial: export Element's innerText getter and setter steps

These will be used by Trusted Types (and eventually HTML once upstreamed) as part of shadowing this attribute to HTMLScriptElement.

Add getHTML() and serializable shadow roots

Corresponding DOM PR: whatwg/dom#1256.

Closes whatwg#8867.

Co-authored-by: Domenic Denicola <d@domenic.me>

Make buttons respect display: none/contents in button layout

Fixes whatwg#10238. This matches what is already implemented in browsers.

Remove duplicate requirement for 'overflow' for marquee

The duplication was introduced by whatwg#10243.

Meta: make all the SVGs darkmode-aware

Also tag them as such, so that they don't get a white background after whatwg/whatwg.org#439 is merged.

Warn that the XML syntax is not recommended

Closes whatwg#10237.
rubberyuzu added a commit to rubberyuzu/html that referenced this pull request Aug 27, 2024
Allow top layer elements to be nested within popovers

This allows top layer elements, including the dialog element, to be nested inside of an open popover, by not closing the popover when the new top layer element is opened. Without this patch, opening a modal dialog inside of a popover will make the page inert and make the dialog invisible.

Fixes whatwg#9998. See also whatwg/fullscreen#237.

Editorial: order of comparisons

For consistency:
- greater than or equal to
- less than or equal to

Improve element reflection

This attempts to make the following improvements:

1. Make it more clear that initializing attr is not the first step in an algorithm, but rather something that counts for all the list items.
2. Rewrite the associated element(s) fields as algorithms. As there are no downstream references so far this is a change we can still make.
3. Add another layer of caching that is separate from the FrozenArray to avoid having to compare a list of elements with a FrozenArray directly.

This helps with whatwg#10219.

Disable PageSwapEvent's activation on cross-origin redirects

Closes whatwg#10196.

Upstream Long Animation Frames monkey-patches

Long Animation Frames (https://w3c.github.io/long-animation-frames/) expects a few calls from HTML and other specs, for reporting when tasks, rendering or JS entry points take place. This moves those calls from the Long Animation Frames spec to HTML.

Preload: only allow certain values for as=""

Closes whatwg#8332.

Call the view transition page visibility change steps

This allows the CSS view-transitions spec to react to page visibility changes. Specifically, skip the active transition once a page is hidden.

See w3c/csswg-drafts#9543.

Style marquee using overflow: hidden

This matches Chromium and WebKit. Tests will be worked on in https://bugzilla.mozilla.org/show_bug.cgi?id=306344.

Editorial: export Element's innerText getter and setter steps

These will be used by Trusted Types (and eventually HTML once upstreamed) as part of shadowing this attribute to HTMLScriptElement.

Add getHTML() and serializable shadow roots

Corresponding DOM PR: whatwg/dom#1256.

Closes whatwg#8867.

Co-authored-by: Domenic Denicola <d@domenic.me>

Make buttons respect display: none/contents in button layout

Fixes whatwg#10238. This matches what is already implemented in browsers.

Remove duplicate requirement for 'overflow' for marquee

The duplication was introduced by whatwg#10243.

Meta: make all the SVGs darkmode-aware

Also tag them as such, so that they don't get a white background after whatwg/whatwg.org#439 is merged.

Warn that the XML syntax is not recommended

Closes whatwg#10237.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: shadow Relates to shadow trees (as defined in DOM)
Development

Successfully merging this pull request may close these issues.

2 participants