Re: [csswg-drafts] [css-transitions] starting an animation and a transition with equal values yields some incompatible behavior between Safari, Chrome and Firefox (#8701)

I haven't touched this code for a long time (@emilio @BorisChiou or @hiikezoe are probably more familiar with it) but for the discrepancy between Safari and Firefox, it looks like Firefox aborts updating transitions early if the before-change and after-change styles match:

https://searchfox.org/mozilla-central/rev/5f10809bf5559e6e988e4d1a58ce1338d391cc5f/servo/components/style/animation.rs#1038-1049

They will match in this case due to the definition of the before-change style:

> Otherwise, define the before-change style as the computed values of all properties on the element as of the previous style change event, except with any styles derived from declarative animations such as CSS Transitions, CSS Animations ([[CSS3-ANIMATIONS]](https://w3c.github.io/csswg-drafts/css-transitions-1/#biblio-css3-animations)), and SMIL Animations ([[SMIL-ANIMATION]](https://w3c.github.io/csswg-drafts/css-transitions-1/#biblio-smil-animation), [[SVG11]](https://w3c.github.io/csswg-drafts/css-transitions-1/#biblio-svg11)) updated to the current time.

That is, the before-change style is brought up to date with the after-change style.

However, the spec only skips cancelling/starting transitions for the "no change" case if there are no running transitions for the property so Firefox is wrong here.

(For what it's worth, a long time ago I wrote some other tests for various edge cases involving CSS animations and transitions here: https://bug1192592.bmoattachments.org/attachment.cgi?id=8843824)

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


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

Received on Wednesday, 12 April 2023 09:51:43 UTC