-
Notifications
You must be signed in to change notification settings - Fork 666
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
[css-view-transitions-1] Handle startVT/cross-doc transitions when Document is hidden #9543
Comments
What would happen given the current spec is that the transition would be delayed until the page is visible or the timeout passes. Perhaps for iframe this is OK, and for explicitly hidden pages we can skip immediately? |
Right now it depends on when the page is hidden. If its before rendering has been frozen then we'll keep waiting for the next frame. If its during rendering frozen then we timeout. And if its after the DOM has been constructed then it will wait until all animations are finished. I'm not sure how we deal with animation progress for hidden Documents but if that's checked when the Document is made visible again then likely we'll discover the transition to be finished then?
Sounds reasonable. If the Document is hidden, that probably means the user doesn't care to see an animation when its made visible again. We can render the new DOM directly. For the iframe case, browsers can stop rendering the iframe if its far off from the viewport. That means sometimes authors might see a timeout error if the iframe goes offscreen right after the transition was initiated. Its rare enough that we can ignore this case. But this was why I was leaning towards using a "rendering opportunity" based definition. So we skip for any case where the Document is not going to produce any more frames. |
Proposed Resolution It's unclear what to do for offscreen iframes, filed #9839 for that. |
The proposal is for same and cross-document transitions. |
The CSS Working Group just discussed
The full IRC log of that discussion<TabAtkins> khush: this is about what to do if, in any phase of he transition, the doc is hidden (you switch tabs)<TabAtkins> khush: two quirky cases <TabAtkins> khush: one, tab is hidden before you even cache the old dom's appearance <TabAtkins> khush: In the spec we wait for a frame to happen so we can cache, and eventually time out <TabAtkins> khush: confusing to authors <TabAtkins> khush: second is we cache the screenshot, create the pseudo, but animations don't tick <TabAtkins> khush: in principle they tick, like a web animation, but unless we queue a task for when the transition *should* finish we just hang onto the memory for the snapshot indefinitely <TabAtkins> khush: both are bad. there's no reason to keep the machinery alive when the doc isn't visible. user should just see the new state when they arrive <TabAtkins> khush: so proposal is, if the doc ever changes to hidden, just flip to the end state <TabAtkins> khush: quiriker case is iframes. if you scroll it off-screen enough, browsers will throttle rendering <emilio> q+ <TabAtkins> khush: so maybe another resolution - if an iframe isn't going to get rendering opportunities, just skip the transition. if needed i can go into detail about where that change will happen in html <bramus> q+ <TabAtkins> khush: So first proposed resolution: if page is hidden, skip transitions. <miriam> ack emilio <TabAtkins> emilio: seems reasonable. what's the author-visible behavior? does promise reject or something else? <noamr> q+ <flackr> q+ <TabAtkins> khush: there's already a bit in the API where a transition can skip to the end at any point. <TabAtkins> khush: So all the promises define how they act in this case already <TabAtkins> khush: [describes the promises behavior] <TabAtkins> emilio: so that won't cause spurious exceptions... unless you await the ready promise? <TabAtkins> emilio: Might be bad to test <TabAtkins> TabAtkins: we dont' *reject* the promises, do we? <TabAtkins> khush: we do reject the XXX promise because it indicates there is no pseudo-elements generated <noamr> We reject the ready promise <TabAtkins> khush: I'd expect most authors to have written error-handling code <TabAtkins> emilio: ehhhhhhh <TabAtkins> khush: if you do try to do something to the pseudo-element, your code will be wrong anyway and throw other errors <TabAtkins> emilio: yeah my concern is just that it's really easy to write code that doesn't test for this <TabAtkins> vmpstr: ready promise already rejects on timeout <TabAtkins> emilio: ready promise is okay, i just don't want the other promises to reject <miriam> ack bramus <TabAtkins> bramus: Maybe we should only do that if animations are linked to document timeline? <TabAtkins> khush: spec already says the only transition that holds the pseudo dom are those attached to document timeline <TabAtkins> khush: So if the browser is slow internally or your callback is slow, that can already cause a timeout and reject the ready promise <TabAtkins> khush: This also applies to cross-document transitions <miriam> ack noamr <TabAtkins> noamr: I think we already have spec language that says we can skip transitions for UA-defined reasons, that might be a good place to put the "if iframe is hidden" part since that's also UA-defined <TabAtkins> noamr: And I suggest that if whole document is hidden (document.hidden) we should never expect a VT to work <khush> q? <TabAtkins> flackr: I didn't fully catch the reponse to Bramus' question, i think i have same concern <noamr> q+ <TabAtkins> flackr: could create unpredictable behavior for transitions that last a long time or have a non-monotonic timeline <miriam> ack flackr <TabAtkins> bramus: it was covered <TabAtkins> khush: If the only animations you ahve are non-document timeline'd, we already don't let you hold a transition forever <noamr> q- <TabAtkins> khush: when we walk thru the transitions and ask if there's anything that should keep the pseudo-dom alive, we ignore any that aren't attached to the document timeline <TabAtkins> flackr: So you're not allowed to do this today <TabAtkins> khush: Yeah, you'd have to manually hack it up <TabAtkins> khush: There's an issue about us allowing raf/script-driven animations, and have an option to let people say "please dont' auto-shut-off my animation, I know what i'm doing" <miriam> ack fantasai <TabAtkins> fantasai: I hear emilio's concern about testing pathways <TabAtkins> fantasai: but if we already have that problem, making it happen more often is helpful because it's more likely to occur in front of the dev <TabAtkins> fantasai: re: what the user expects, since transitions should be temporary, it seems okay to just skip <khush> q? <vmpstr> q+ <TabAtkins> fantasai: so it seems that making them skip on hidden seems reasonable, and hopefully helps devs hit the error case more often if their code is broken <miriam> ack vmpstr <TabAtkins> vmpstr: the only thing from Bramus' point, there *are* cases where you want to control the animation with WebAnimations, so you can animation-play-state:paused and then respond to user input <TabAtkins> vmpstr: Skipping on *those* cases if you swtich the tab seems unfortunate <noamr> q+ <TabAtkins> khush: It's a behavior change you'd have to explicitly code for now <TabAtkins> bramus: Isn't that already covered by the conditions? <TabAtkins> khush: spec says keep the structure alive if the animation is running or paused <TabAtkins> bramus: So should we remove the paused condition? <TabAtkins> khush: I think I'm concurring with elika, since there are situations where this can occur already (gpu busy, your callback is longer than expected), in some cases the promise will reject already <TabAtkins> khush: And in these scenarios the most logical thing to do is skip the transition <miriam> ack noamr <TabAtkins> noamr: The whole thing about paused transitions - at this time the document isn't interactive <TabAtkins> noamr: It's a strange state, needs to be dealt with holistically <TabAtkins> khush: proposed resolution: Skip transitions if the document state is hidden (or changes to hidden) <TabAtkins> miriam: objections? <TabAtkins> bramus: And this is with the current conditions in the spec right now? <TabAtkins> khush: yes <TabAtkins> RESOLVED: Skip transitions if the document state is hidden (or changes to hidden) |
…idden See [resolution](w3c#9543 (comment)).
…idden (#9942) See [resolution](#9543 (comment)).
…a hidden document See w3c#9543
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
- Skip the transition if document becomes hidden - Disallow oubound cross-document view transitions when document is hidden - Skip inbound cross-document view transition if document becomes hidden - When calling startViewTransition() in a hidden document, start is as skipped. Based on following CSS resolution: w3c/csswg-drafts#9543 (comment) Bug: 329302331 Change-Id: Ieef3238240b35c5d7f7f819793f65f71d7d75037
…allowed when page is visible", a=testonly Automatic update from web-platform-tests Revert "View-transitions should only be allowed when page is visible" This reverts commit 763158dc9602048a522e165a8dcdabcc9da37db7. Reason for revert: [Gardening] Test hide-before-reveal.html is consistently failing on CI bots. Original change's description: > View-transitions should only be allowed when page is visible > > - Skip the transition if document becomes hidden > - Disallow oubound cross-document view transitions when document is > hidden > - Skip inbound cross-document view transition if document becomes > hidden > - When calling startViewTransition() in a hidden document, start is > as skipped. > > Based on following CSS resolution: > w3c/csswg-drafts#9543 (comment) > > Bug: 329302331 > Change-Id: Ieef3238240b35c5d7f7f819793f65f71d7d75037 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5374309 > Reviewed-by: David Bokan <bokan@chromium.org> > Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org> > Cr-Commit-Position: refs/heads/main@{#1273445} Bug: 329302331 Change-Id: Idd4ae8f47af123401e6c8d2673e26d23e296b9b1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5375475 Commit-Queue: Brad Triebwasser <btriebw@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Owners-Override: Brad Triebwasser <btriebw@chromium.org> Auto-Submit: Brad Triebwasser <btriebw@chromium.org> Cr-Commit-Position: refs/heads/main@{#1273716} -- wpt-commits: ddf5b1d83d7bd893030f1761af17deab9d9881c1 wpt-pr: 45143
…rce.com/c/chromium/src/+/5374309, a=testonly Automatic update from web-platform-tests Reland https://chromium-review.googlesource.com/c/chromium/src/+/5374309 ... This time marking test as long. View-transitions should only be allowed when page is visible - Skip the transition if document becomes hidden - Disallow oubound cross-document view transitions when document is hidden - Skip inbound cross-document view transition if document becomes hidden - When calling startViewTransition() in a hidden document, start is as skipped. Based on following CSS resolution: w3c/csswg-drafts#9543 (comment) Bug: 329302331 Change-Id: Ifbd8be3765307d2756ef2955eb6ef72e4b2b8756 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5372454 Reviewed-by: David Bokan <bokan@chromium.org> Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org> Cr-Commit-Position: refs/heads/main@{#1274101} -- wpt-commits: d4535158a3196da9278c836c1d679545b026aaaf wpt-pr: 45162
- Skip the transition if document becomes hidden - Disallow oubound cross-document view transitions when document is hidden - Skip inbound cross-document view transition if document becomes hidden - When calling startViewTransition() in a hidden document, start is as skipped. Based on following CSS resolution: w3c/csswg-drafts#9543 (comment) Bug: 329302331 Change-Id: Ieef3238240b35c5d7f7f819793f65f71d7d75037 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5374309 Reviewed-by: David Bokan <bokan@chromium.org> Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org> Cr-Commit-Position: refs/heads/main@{#1273445}
This reverts commit 763158dc9602048a522e165a8dcdabcc9da37db7. Reason for revert: [Gardening] Test hide-before-reveal.html is consistently failing on CI bots. Original change's description: > View-transitions should only be allowed when page is visible > > - Skip the transition if document becomes hidden > - Disallow oubound cross-document view transitions when document is > hidden > - Skip inbound cross-document view transition if document becomes > hidden > - When calling startViewTransition() in a hidden document, start is > as skipped. > > Based on following CSS resolution: > w3c/csswg-drafts#9543 (comment) > > Bug: 329302331 > Change-Id: Ieef3238240b35c5d7f7f819793f65f71d7d75037 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5374309 > Reviewed-by: David Bokan <bokan@chromium.org> > Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org> > Cr-Commit-Position: refs/heads/main@{#1273445} Bug: 329302331 Change-Id: Idd4ae8f47af123401e6c8d2673e26d23e296b9b1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5375475 Commit-Queue: Brad Triebwasser <btriebw@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Owners-Override: Brad Triebwasser <btriebw@chromium.org> Auto-Submit: Brad Triebwasser <btriebw@chromium.org> Cr-Commit-Position: refs/heads/main@{#1273716}
... This time marking test as long. View-transitions should only be allowed when page is visible - Skip the transition if document becomes hidden - Disallow oubound cross-document view transitions when document is hidden - Skip inbound cross-document view transition if document becomes hidden - When calling startViewTransition() in a hidden document, start is as skipped. Based on following CSS resolution: w3c/csswg-drafts#9543 (comment) Bug: 329302331 Change-Id: Ifbd8be3765307d2756ef2955eb6ef72e4b2b8756 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5372454 Reviewed-by: David Bokan <bokan@chromium.org> Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org> Cr-Commit-Position: refs/heads/main@{#1274101}
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
…when page is visible, a=testonly Automatic update from web-platform-tests View-transitions should only be allowed when page is visible - Skip the transition if document becomes hidden - Disallow oubound cross-document view transitions when document is hidden - Skip inbound cross-document view transition if document becomes hidden - When calling startViewTransition() in a hidden document, start is as skipped. Based on following CSS resolution: w3c/csswg-drafts#9543 (comment) Bug: 329302331 Change-Id: Ieef3238240b35c5d7f7f819793f65f71d7d75037 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5374309 Reviewed-by: David Bokan <bokan@chromium.org> Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org> Cr-Commit-Position: refs/heads/main@{#1273445} -- wpt-commits: de64b61df17bec0ed1e2777ab717bec6f8959a25 wpt-pr: 45122
…allowed when page is visible", a=testonly Automatic update from web-platform-tests Revert "View-transitions should only be allowed when page is visible" This reverts commit 763158dc9602048a522e165a8dcdabcc9da37db7. Reason for revert: [Gardening] Test hide-before-reveal.html is consistently failing on CI bots. Original change's description: > View-transitions should only be allowed when page is visible > > - Skip the transition if document becomes hidden > - Disallow oubound cross-document view transitions when document is > hidden > - Skip inbound cross-document view transition if document becomes > hidden > - When calling startViewTransition() in a hidden document, start is > as skipped. > > Based on following CSS resolution: > w3c/csswg-drafts#9543 (comment) > > Bug: 329302331 > Change-Id: Ieef3238240b35c5d7f7f819793f65f71d7d75037 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5374309 > Reviewed-by: David Bokan <bokan@chromium.org> > Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org> > Cr-Commit-Position: refs/heads/main@{#1273445} Bug: 329302331 Change-Id: Idd4ae8f47af123401e6c8d2673e26d23e296b9b1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5375475 Commit-Queue: Brad Triebwasser <btriebw@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Owners-Override: Brad Triebwasser <btriebw@chromium.org> Auto-Submit: Brad Triebwasser <btriebw@chromium.org> Cr-Commit-Position: refs/heads/main@{#1273716} -- wpt-commits: ddf5b1d83d7bd893030f1761af17deab9d9881c1 wpt-pr: 45143
…rce.com/c/chromium/src/+/5374309, a=testonly Automatic update from web-platform-tests Reland https://chromium-review.googlesource.com/c/chromium/src/+/5374309 ... This time marking test as long. View-transitions should only be allowed when page is visible - Skip the transition if document becomes hidden - Disallow oubound cross-document view transitions when document is hidden - Skip inbound cross-document view transition if document becomes hidden - When calling startViewTransition() in a hidden document, start is as skipped. Based on following CSS resolution: w3c/csswg-drafts#9543 (comment) Bug: 329302331 Change-Id: Ifbd8be3765307d2756ef2955eb6ef72e4b2b8756 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5372454 Reviewed-by: David Bokan <bokan@chromium.org> Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org> Cr-Commit-Position: refs/heads/main@{#1274101} -- wpt-commits: d4535158a3196da9278c836c1d679545b026aaaf wpt-pr: 45162
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.
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.
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.
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.
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.
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.
https://bugs.webkit.org/show_bug.cgi?id=271248 rdar://125017653 Reviewed by NOBODY (OOPS!). Follow: - https://drafts.csswg.org/css-view-transitions-1/#page-visibility-change-steps - w3c/csswg-drafts#9543 Add transition-in-hidden-page.html WPT from upstream. * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/transition-in-hidden-page-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/transition-in-hidden-page.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/window-resize-aborts-transition-before-ready-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/window-resize-aborts-transition-expected.txt: * Source/WebCore/dom/Document.cpp: (WebCore::Document::visibilityStateChanged): Make this more robust to allow unregistering clients while iterating. (WebCore::Document::startViewTransition): * Source/WebCore/dom/ViewTransition.cpp: (WebCore::ViewTransition::ViewTransition): (WebCore::ViewTransition::skipViewTransition): (WebCore::ViewTransition::stop): (WebCore::ViewTransition::visibilityStateChanged): * Source/WebCore/dom/ViewTransition.h:
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.
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.
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.
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.
https://bugs.webkit.org/show_bug.cgi?id=271248 rdar://125017653 Reviewed by NOBODY (OOPS!). Follow: - https://drafts.csswg.org/css-view-transitions-1/#page-visibility-change-steps - w3c/csswg-drafts#9543 - w3c/csswg-drafts#10815 * LayoutTests/TestExpectations: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/transition-in-hidden-page-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/transition-in-hidden-page.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/window-resize-aborts-transition-before-ready.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/window-resize-aborts-transition.html: * Source/WebCore/dom/Document.cpp: (WebCore::Document::visibilityStateChanged): Make this more robust to allow unregistering clients while iterating. (WebCore::Document::reveal): (WebCore::Document::clearInboundViewTransitionParams): (WebCore::Document::startViewTransition): * Source/WebCore/dom/ViewTransition.cpp: (WebCore::ViewTransition::ViewTransition): (WebCore::ViewTransition::skipViewTransition): (WebCore::ViewTransition::stop): (WebCore::ViewTransition::visibilityStateChanged): * Source/WebCore/dom/ViewTransition.h:
https://bugs.webkit.org/show_bug.cgi?id=271248 rdar://125017653 Reviewed by NOBODY (OOPS!). Follow: - https://drafts.csswg.org/css-view-transitions-1/#page-visibility-change-steps - w3c/csswg-drafts#9543 - w3c/csswg-drafts#10815 * LayoutTests/TestExpectations: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/transition-in-hidden-page-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/transition-in-hidden-page.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/window-resize-aborts-transition-before-ready.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/window-resize-aborts-transition.html: * Source/WebCore/dom/Document.cpp: (WebCore::Document::visibilityStateChanged): Make this more robust to allow unregistering clients while iterating. (WebCore::Document::reveal): (WebCore::Document::clearInboundViewTransitionParams): (WebCore::Document::startViewTransition): * Source/WebCore/dom/ViewTransition.cpp: (WebCore::ViewTransition::ViewTransition): (WebCore::ViewTransition::skipViewTransition): (WebCore::ViewTransition::stop): (WebCore::ViewTransition::visibilityStateChanged): * Source/WebCore/dom/ViewTransition.h:
https://bugs.webkit.org/show_bug.cgi?id=271248 rdar://125017653 Reviewed by NOBODY (OOPS!). Follow: - https://drafts.csswg.org/css-view-transitions-1/#page-visibility-change-steps - w3c/csswg-drafts#9543 - w3c/csswg-drafts#10815 * LayoutTests/TestExpectations: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/transition-in-hidden-page-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/transition-in-hidden-page.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/window-resize-aborts-transition-before-ready.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/window-resize-aborts-transition.html: * LayoutTests/platform/mac-wk2/TestExpectations: Remove duplicate test expectations to reduce confusion. * Source/WebCore/dom/Document.cpp: (WebCore::Document::visibilityStateChanged): Make this more robust to allow unregistering clients while iterating. (WebCore::Document::reveal): (WebCore::Document::clearInboundViewTransitionParams): (WebCore::Document::startViewTransition): * Source/WebCore/dom/ViewTransition.cpp: (WebCore::ViewTransition::ViewTransition): (WebCore::ViewTransition::skipViewTransition): (WebCore::ViewTransition::stop): (WebCore::ViewTransition::visibilityStateChanged): * Source/WebCore/dom/ViewTransition.h:
https://bugs.webkit.org/show_bug.cgi?id=271248 rdar://125017653 Reviewed by NOBODY (OOPS!). Follow: - https://drafts.csswg.org/css-view-transitions-1/#page-visibility-change-steps - w3c/csswg-drafts#9543 - w3c/csswg-drafts#10815 * LayoutTests/TestExpectations: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/transition-in-hidden-page-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/transition-in-hidden-page.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/window-resize-aborts-transition-before-ready.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/window-resize-aborts-transition.html: * LayoutTests/platform/ios/TestExpectations: * LayoutTests/platform/mac-wk2/TestExpectations: Remove duplicate test expectations to reduce confusion. * LayoutTests/platform/wpe/TestExpectations: * Source/WebCore/dom/Document.cpp: (WebCore::Document::visibilityStateChanged): Make this more robust to allow unregistering clients while iterating. (WebCore::Document::resolveViewTransitionRule): (WebCore::Document::reveal): (WebCore::Document::startViewTransition): * Source/WebCore/dom/ViewTransition.cpp: (WebCore::ViewTransition::ViewTransition): (WebCore::ViewTransition::stop): (WebCore::ViewTransition::visibilityStateChanged): * Source/WebCore/dom/ViewTransition.h:
https://bugs.webkit.org/show_bug.cgi?id=271248 rdar://125017653 Reviewed by NOBODY (OOPS!). Follow: - https://drafts.csswg.org/css-view-transitions-1/#page-visibility-change-steps - w3c/csswg-drafts#9543 * LayoutTests/TestExpectations: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/transition-in-hidden-page-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/transition-in-hidden-page.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/window-resize-aborts-transition-before-ready.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/window-resize-aborts-transition.html: * LayoutTests/platform/ios/TestExpectations: * LayoutTests/platform/mac-wk2/TestExpectations: Remove duplicate test expectations to reduce confusion. * LayoutTests/platform/wpe/TestExpectations: * Source/WebCore/dom/Document.cpp: (WebCore::Document::visibilityStateChanged): Make this more robust to allow unregistering clients while iterating. (WebCore::Document::resolveViewTransitionRule): (WebCore::Document::reveal): (WebCore::Document::startViewTransition): * Source/WebCore/dom/ViewTransition.cpp: (WebCore::ViewTransition::ViewTransition): (WebCore::ViewTransition::stop): (WebCore::ViewTransition::visibilityStateChanged): * Source/WebCore/dom/ViewTransition.h:
https://bugs.webkit.org/show_bug.cgi?id=271248 rdar://125017653 Reviewed by Matt Woodrow. Follow: - https://drafts.csswg.org/css-view-transitions-1/#page-visibility-change-steps - w3c/csswg-drafts#9543 * LayoutTests/TestExpectations: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/transition-in-hidden-page-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/transition-in-hidden-page.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/window-resize-aborts-transition-before-ready.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/window-resize-aborts-transition.html: * LayoutTests/platform/ios/TestExpectations: * LayoutTests/platform/mac-wk2/TestExpectations: Remove duplicate test expectations to reduce confusion. * LayoutTests/platform/wpe/TestExpectations: * Source/WebCore/dom/Document.cpp: (WebCore::Document::visibilityStateChanged): Make this more robust to allow unregistering clients while iterating. (WebCore::Document::resolveViewTransitionRule): (WebCore::Document::reveal): (WebCore::Document::startViewTransition): * Source/WebCore/dom/ViewTransition.cpp: (WebCore::ViewTransition::ViewTransition): (WebCore::ViewTransition::stop): (WebCore::ViewTransition::visibilityStateChanged): * Source/WebCore/dom/ViewTransition.h: Canonical link: https://commits.webkit.org/283084@main
If
startViewTransition
is called while a Document is hidden. Or the document is hidden at any point during the transition's lifecycle, we don't do anything special. We should probably explicitly skip the transition if the Document is hidden.Not sure what to do with iframes. The UA can stop rendering opportunities if the iframe is far enough for the viewport. Should we assume its hidden?
The spec way of when a Document is hidden can be based on this : The step labeled Rendering opportunities prevents the user agent from updating the rendering when it is unable to present new content to the user. If the Document is in this state, skip all ViewTransitions?
The text was updated successfully, but these errors were encountered: