Closed Bug 2045120 Opened 5 months ago Closed 4 months ago

Implement deferred `UpdateAnimationsTasks::CSSAnimations` task on animation target elements on scroll/view timelines change

Categories

(Core :: Layout, enhancement)

enhancement
Points:
3

Tracking

()

RESOLVED FIXED
154 Branch
Tracking Status
firefox154 --- fixed

People

(Reporter: dshin, Assigned: dshin)

References

(Blocks 1 open bug)

Details

(Whiteboard: [scrollanimation:mvp])

Attachments

(2 files, 2 external files)

... Also may be the case for timeline scope updates.

Currently updates take immediate effect as seen here, where we find all animations referring to changing timelines and update them right away. This goes against recent CSSWG resolutions (1, 2) and are causing behavioural differences.

Examining other browsers' behaviour and fitting them to our infrastructure, it seems that scroll/view/scope changes to some elements should collapse down to a single call to update the target element of the animation here.

Fixing this may have further knock-on effects to WPTs, in relation to bug 2024012.

  • With the gCS line commented, Blink and WebKit have the time-based animation play from where the scroll animation left off
  • With it uncommented, Blink starts the timed animation from 0%, where WebKit seems to.. Not apply any animation effect?
  • My WIP change has us always start the timed animation from 0%
  • Commenting scroller.classList.remove('st'); makes all browsers have the time-based animation play from where the scroll animation left off, regardless of gCS being commented out

Without timeline-scope, things are slightly different:

  • Commenting the gCS line out makes all browsers have the time-based animation play from where the scroll animation left off
  • Uncommenting the gCS line, current WIP changes behave identically as above, but WebKit and Blink freezes the animation where the scroll timeline left it
  • Commenting scroller.classList.remove('st'); makes all browsers have the time-based animation play from where the scroll animation left off, regardless of gCS being commented out

... I think once all browsers start following the spec (Where the lookup failure for unscoped timeline names don't result in null timelines), this case should become equivalent to one with timeline-scope.

Points: --- → 3
Whiteboard: [scrollanimation:triage] → [scrollanimation:mvp]
Assignee: nobody → dshin
Status: NEW → ASSIGNED
Pushed by dshin@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/522b43a89234 https://hg.mozilla.org/integration/autoland/rev/d06f64483eb5 Add comments to special handling of inactive timelines. r=layout-scroll-driven-animation-reviewers,boris https://github.com/mozilla-firefox/firefox/commit/bb976a22d739 https://hg.mozilla.org/integration/autoland/rev/f10a3a71c694 Implement deferred processing of named animation timelines. r=layout-scroll-driven-animation-reviewers,firefox-style-system-reviewers,boris https://github.com/mozilla-firefox/firefox/commit/2eedb2b1da9d https://hg.mozilla.org/integration/autoland/rev/7a894f07933f apply code formatting via Lando
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch
QA Whiteboard: [qa-triage-done-c155/b154]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: