[csswg-drafts] [css-view-transitions-1] What is the snapshot containing block for iframes? (#9786)

khushalsagar has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-view-transitions-1] What is the snapshot containing block for iframes? ==
The spec [here](https://drafts.csswg.org/css-view-transitions-1/#capture-rendering-characteristics-algorithm:~:text=However%2C%20the%20captured%20image%20should%20include%2C%20at%20the%20very%20least%2C%20the%20contents%20of%20element%20that%20intersect%20with%20the%20snapshot%20containing%20block.) says that if an element is too large for its entire image to be captured, implementations can clip the image as long as the contents in the snapshot containing block are captured.

But for definition of snapshot containing block is ambiguous for iframes: "all areas of the window that could potentially display page content". The impact it has on clipping of images aside, I think it should be the iframe's ICB. @bokand can explain this better.

But this means we need a better way to decide how to clip the image if the transition is happening in an iframe. The goal with the SCB recommendation was so we at least capture the onscreen content the user is seeing but the whole iframe could be offscreen. I'm thinking the following:

- If the iframe is completely offscreen, just skip the transition. Why animate instead of directly flipping to the new state.
- If its onscreen (fully or partially) use the SCB of the top level frame to decide what should be captured in the images.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9786 using your GitHub account


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

Received on Thursday, 11 January 2024 23:35:54 UTC