Closed Bug 1773149 Opened 3 years ago Closed 3 years ago

Handle scroll animations properly when changing animation-timeline from/to none

Categories

(Core :: CSS Transitions and Animations, defect, P3)

Firefox 103
defect

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox103 --- affected

People

(Reporter: boris, Assigned: boris)

References

(Blocks 2 open bugs, )

Details

Attachments

(1 obsolete file)

Summary: Handle scroll animations properly when changing animation-timeline from timeline name to none → Handle scroll animations properly when changing animation-timeline from/to none

Based on Bug 1774060 comment 4, it makes more sense to cancel the CSS animation when changing the animation-timeline to none. And we shouldn't generate the CSS animation if we set animation-timeline: none initially.

Blocks: 1774060

The bug addresses the following cases:

  1. Set animation-timeline: none initially
    -> No CSSAnimation is generated
  2. Set animation-timeline: unknown-timeline initially
    -> No CSSAnimation is generated
  3. Change animation-timeline from a scroll-timeline name to none
    -> The existing CSSAnimation is cancelled.
  4. Change animation-timeline from a scroll-timeline name to unknown-timeline
    -> The existing CSSAnimation is cancelled.

Basically, we treat the null timeline just like what we do for @keyframes.
If there is no matched @keyframes, we don't generate the CSS animation.
Same for timeline.

Attachment #9281255 - Attachment description: Bug 1773149 - Discard CSSAnimation with null timeline. → Bug 1773149 - Discard CSSAnimations with null timeline.
Assignee: nobody → boris.chiou
Status: NEW → ASSIGNED

Per the spec comment: https://github.com/w3c/csswg-drafts/issues/7364#issuecomment-1155851858

For now, I'd like to rely on set-the-timeline-of-an-animation procedure to make the decision, so let's close this bug for now.

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
Attachment #9281255 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: