Open Bug 1473242 Opened 6 years ago Updated 2 years ago

Summary graph does not update if change total duration to shorter than currentTime

Categories

(DevTools :: Inspector: Animations, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: daisuke, Unassigned)

Details

Attachments

(1 file)

Attached file css-animation.html
Summary graph does not update if change total duration to shorter than currentTime by user script or rule view. 

Steps to reproduce:
1. Open attached html which has CSS Animations.
2. Open animation inspector (in 3 pane mode)
3. Move the scrubber to end of timeline (at 30 sec)
4. Select <div> on node inspector to show the animation properties on the rule view.
5. Change animation-iteration-count to 2.

Expected result:
Summary graph updates.

Actual result:
Summary graph does not update.
This is because we don't dispatch mutation events for animations that are no longer relevant:

  https://searchfox.org/mozilla-central/rev/a80651653faa78fa4dfbd238d099c2aad1cec304/dom/animation/AnimationEffect.cpp#85-87

Maybe it's ok to drop the IsRelevant check here? I think we only added it because the idea was that animation mutation observers should only be informed of changes to the result of getAnimations() and finished non-filling animations don't appear in getAnimations().
I guess there are two options:

(a) Drop the IsRelevant() check here and probably in SetKeyframes() too.
(b) Add a special Chrome-only flag to Animation such as "DevToolsIsObserving" and then add
    Animation::ShouldNotifyObservers that returns true if IsRelevant is true or that flag is set.

I tend to lean towards (a). Either case will need tests, however.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: