Re: [csswg-drafts] [css-view-transitions-1] Handle startVT when Document is hidden (#9543)

> What would happen given the current spec is that the transition would be delayed until the page is visible or the timeout passes.

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?

> Perhaps for iframe this is OK, and for explicitly hidden pages we can skip immediately?

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.

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


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

Received on Wednesday, 1 November 2023 18:02:37 UTC