Closed Bug 2019080 Opened 4 months ago Closed 4 months ago

commitStyles() does not work with parallel animations of different length

Categories

(Core :: CSS Transitions and Animations, defect)

Firefox 148
defect

Tracking

()

RESOLVED FIXED
150 Branch
Tracking Status
firefox150 --- fixed

People

(Reporter: ondras, Assigned: canalun)

References

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:148.0) Gecko/20100101 Firefox/148.0

Steps to reproduce:

See the fiddle: https://jsfiddle.net/ondras/p36y0nzv/9/

Actual results:

When both animations are run in parallel, the "position/translate" end style is not persisted.
This only happens:

  • when there are two animations running together,
  • their duration is different

Expected results:

The square's both position and size should have been persisted after the animation ended.

Works as expected in Chrome.

The Bugbug bot thinks this bug should belong to the 'Core::CSS Transitions and Animations' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → CSS Transitions and Animations
Product: Firefox → Core

I made a variant of this test using top/left and it still reproduces so I believe:

  • This is not specific to our handling of transform properties
  • This is not related to compositor animations
  • This doesn't appear to be related to implicit keyframes (I tried adding specific 0% values and the issue still reproduces)

So this appears to be a bug in the way we fetch the final value of a finished animation when there is another animation running on the same element.

:canalun, would you care to take a look?

Flags: needinfo?(i.am.kanaru.sato)
Status: UNCONFIRMED → NEW
Ever confirmed: true
See Also: → 1947061

(replying to :birtles)
Thank you so much for taking a look and making a variant!
I work on it :)

Flags: needinfo?(i.am.kanaru.sato)
Assignee: nobody → i.am.kanaru.sato

In ComposeSortedEffects, the path to override transitions overridden by animations does not count finished animations. And that path is used when there is an EffectSet for the target, i.e. when animations or transitions are present on the element. As a result, endpoint-inclusive commitStyles can fail when another animation is running on a different property. This patch fixes that.

Attachment #9548824 - Attachment description: Bug 2019080 - Add a test case for concurrent animations with different props. r?birtles → Bug 2019080 - Add a test case for concurrent animations with different props. r=birtles,hiro
Attachment #9548825 - Attachment description: Bug 2019080 - Fix CommitStyles for concurrent animations with different props. r?birtles → Bug 2019080 - Fix CommitStyles for concurrent animations with different props. r=birtles,hiro
Attachment #9548824 - Attachment description: Bug 2019080 - Add a test case for concurrent animations with different props. r=birtles,hiro → Bug 2019080 - Add a test case for concurrent animations with different props. r=birtles
Attachment #9548825 - Attachment description: Bug 2019080 - Fix CommitStyles for concurrent animations with different props. r=birtles,hiro → Bug 2019080 - Fix CommitStyles for concurrent animations with different props. r=birtles
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 150 Branch
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/58340 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: