Re: [csswg-drafts] [css-shared-element-transitions-1] Define how rendering is suppressed between DOM changes (#7784)

> Transitions allow the developer to asynchronously mutate the DOM to the next state while the browser presents the visual output of the previous state to the user. This requires suppressing rendering of the DOM being transitioned to prevent presenting intermediate states to the user. The options for this are:
> 
> 1. Rendering opportunities are paused. The developer can trigger style/layout via script APIs like getComputedStyle but [update the rendering](https://html.spec.whatwg.org/multipage/webappapis.html#update-the-rendering) loop doesn't run. This is developer observable since script callbacks (like rAF) won't be dispatched.
>    The behaviour aligns with how [render-blocking](https://html.spec.whatwg.org/multipage/dom.html#render-blocking-mechanism) works. Cross-document transitions can then rely on render-blocking as an independent feature to control the first paint of the new Document. The animations start once all render-blocked resources are fetched or timed out. The same-document API provides the same contract, rendering opportunities remain paused until the promise returned by updateDOM callback resolves. However this can't be used for scoped transitions since a transition in a sub-tree shouldn't pause rendering for the complete Document.
> 2. Continue running rendering opportunities but skip painting the DOM tree participating in a transition. From the developer's point of view, rendering is proceeding as usual but the browser internally doesn't paint these updates for the user.
> 
> The proposal is to use 1 for root transitions and 2 for [scoped transitions](https://github.com/WICG/shared-element-transitions/blob/main/scoped-transitions.md).



-- 
GitHub Notification of comment by Villegas2121
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7784#issuecomment-1272459503 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 9 October 2022 05:24:40 UTC