Re: [csswg-drafts] [css-view-transitions-1] Display live image when element is outside the snapshot containing block in old state (#10587)

The main optimization we're after is fundamental for all engines. The browser has to cache some content representation of the old elements and it's very hard to make that cheap. So we want to avoid the spec forcing engines to spend resources for rendering offscreen content.

This is not an issue for new images, they are live. The engine can paint them when/if the content comes onscreen. But this is not an option for old elements.

> I'm not against optimizing, but I think this particular optimization makes assumptions about the implementation. It assumes you can straightforwardly render the live snapshot in two places, which I don't think is the case in WebKit.

The other option is to not render anything for the old image pseudo, what this PR is doing in the exit animation case. I wouldn't be opposed to trying that in all cases. We just went with reusing the live snapshot for old since it seemed less risky compat wise and we didn't have implementor feedback saying it's hard to do. :)

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


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

Received on Friday, 19 July 2024 19:46:00 UTC