wpt icon indicating copy to clipboard operation
wpt copied to clipboard

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=265734

Open mattwoodrow opened this issue 6 months ago • 6 comments

WebKit export from bug: [view-transitions] Exclude fragmented boxes from capture

mattwoodrow avatar May 27 '25 02:05 mattwoodrow

This patch has been exported from WebKit; it will be approved automatically once the downstream patch is r+.

wpt-pr-bot avatar May 27 '25 02:05 wpt-pr-bot

@nt1m @mattwoodrow do we think this can land as is, or can something be done to mitigate the Firefox flakiness? (cc @emilio)

gsnedders avatar Jun 03 '25 20:06 gsnedders

It seems the test is mostly fuzzy, not broken? Maybe using animation-play-state: paused rather than animation-duration: 500ms helps mitigate it

emilio avatar Jun 03 '25 22:06 emilio

(On the other hand it's visibility: hidden, so shouldn't matter I think? I can look at it more tomorrow, feel free to land as-is)

emilio avatar Jun 03 '25 22:06 emilio

Is there any way to view to failing images?

The idea of the test is that the 'target' view transition name animation is running, but the new/old images should be identical, so shouldn't be racy.

The 'root' animation is hidden, so anything not in target (including target itself if the spanning got detected as being fragmented) isn't in the capture at all.

The failing fuzz values seem fairly large, is it possible that one of the new/old captures is missing, so it's racily capturing a fade-in/out?

mattwoodrow avatar Jun 03 '25 22:06 mattwoodrow

@mattwoodrow so running the test on firefox nighly, I see that what happens is that we capture the old state just fine because it's not fragmented yet, and then fade it out, and skip the new one because it's fragmented, so there's a fade-out animation of the old content that is what's causing the flakyness.

I think (from memory, haven't dug, lmk if I'm wrong) that's right per spec? If so I think you need to hide the ::view-transition-old(target) pseudo to make the test not have that animation.

emilio avatar Jun 04 '25 09:06 emilio

@mattwoodrow so running the test on firefox nighly, I see that what happens is that we capture the old state just fine because it's not fragmented yet, and then fade it out, and skip the new one because it's fragmented, so there's a fade-out animation of the old content that is what's causing the flakyness.

I think (from memory, haven't dug, lmk if I'm wrong) that's right per spec? If so I think you need to hide the ::view-transition-old(target) pseudo to make the test not have that animation.

The intent was that column spanning would mean it's not fragmented, so both the new and old images should be available.

mattwoodrow avatar Jul 17 '25 22:07 mattwoodrow

@emilio I'd love to see this PR merged, because it's starting to cause issues with imports on our end. Do you know how we could move this forward?

nt1m avatar Jul 18 '25 20:07 nt1m

Feel free to merge it, I can dig into this next week / as time allows. But Matt's comment makes sense to me.

emilio avatar Jul 18 '25 22:07 emilio