Closed
Bug 1246046
Opened 9 years ago
Closed 9 years ago
Pausing and seeking a play-pending animation does not render as expected
Categories
(Core :: DOM: Animation, defect)
Core
DOM: Animation
Tracking
()
RESOLVED
FIXED
mozilla47
Tracking | Status | |
---|---|---|
firefox47 | --- | fixed |
People
(Reporter: birtles, Assigned: birtles)
References
Details
Attachments
(3 files, 1 obsolete file)
(deleted),
text/html
|
Details | |
(deleted),
patch
|
heycam
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
heycam
:
review+
|
Details | Diff | Splinter Review |
In the attached test case, we pause an animation and seek it but nothing is rendered. It should render a box with width: 75px, and height: 100px. Inspecting the console output, however, reveals that the computed style is updated.
If we wait for anim.ready before pausing and seeking then it works.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → bbirtles
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•9 years ago
|
||
It seems like the issue is that nsStyleSet::GetContext doesn't pick up the animation rule in the case where we *only* have script generated animations.
This patch is a hacky fix to demonstrate the problem.
We probably need to refactor nsAnimationManager::CheckAnimationRule so that it simply updates the state of CSS animations. Then we should have a separate step that fetches the animation rule for either case.
Assignee | ||
Comment 2•9 years ago
|
||
As for an automated test, we *could* use a reftest, but I can also reproduce this by calling getComputedStyle in attachment 8716131 [details] some time later... perhaps on the next frame. Then I get back "0px" for the width.
Assignee | ||
Comment 3•9 years ago
|
||
Apparently Chrome got a bug report that the following test works in Firefox but not in Chrome:
https://jsfiddle.net/ur1cp5d6/
Upon investigation, this test should *not* work and fixing this bug makes us behave like Chrome.
Assignee | ||
Comment 4•9 years ago
|
||
Without this patch, when we have script generated animations but *no* CSS
animations, nsStyleSet::GetContext will not use the updated animation rule.
Attachment #8717766 -
Flags: review?(cam)
Assignee | ||
Comment 5•9 years ago
|
||
Attachment #8717767 -
Flags: review?(cam)
Assignee | ||
Comment 6•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Attachment #8716187 -
Attachment is obsolete: true
Updated•9 years ago
|
Attachment #8717766 -
Flags: review?(cam) → review+
Updated•9 years ago
|
Attachment #8717767 -
Flags: review?(cam) → review+
Comment 8•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ab454c4469b7
https://hg.mozilla.org/mozilla-central/rev/08f313ec397a
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in
before you can comment on or make changes to this bug.
Description
•