Closed
Bug 1504884
Opened 6 years ago
Closed 6 years ago
Change AnimationInfo::mAnimationGeneration to Maybe<uint64_t> to represent the state there is actually no animation
Categories
(Core :: DOM: Animation, enhancement, P3)
Core
DOM: Animation
Tracking
()
RESOLVED
FIXED
mozilla65
Tracking | Status | |
---|---|---|
firefox65 | --- | fixed |
People
(Reporter: hiro, Assigned: hiro)
References
Details
Attachments
(3 files)
While I was debugging the patch for bug 1504065, I noticed that we sometimes apply unwanted change hints in RestyleManager::AddLayerChangesForAnimation() because AnimationInfo::GetGenerationFromFrame returns 0 even if the layer has no animation. This situation happens when we created a layer for a display item (corresponding to a css property) but the layer has no animation, e.g. will-change property is specified.
Assignee | ||
Comment 1•6 years ago
|
||
I can come up with any ideas to write automated test cases for this, so I am going to attach an example to observe the issue on debugger. The example has an element having an opacity animation and fixed transform style rotate(360deg). We generate a transform layer and an opacity layer for this element respectively. When we call RequestRestyle(Layer), we increase the generation on RestyleManager, and unfortunately at the time, the animation generation of the opacity layer is zero, and it will never be increased since there is no opacity animation on the layer. Thus, every time we call RequestRestyle(Layer) we generate nsChangeHint_UpdateOpacityLayer, it's unwanted change hint.
Assignee | ||
Comment 2•6 years ago
|
||
(In reply to Hiroyuki Ikezoe (:hiro) from comment #1) > Created attachment 9022809 [details] > An example to see this issue > > I can come up with any ideas to write automated test cases for this, so I am > going to attach an example to observe the issue on debugger. I *can't*
Assignee | ||
Comment 3•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=8582351503a6b79ee30b37e40618a2dd4f905a0a
Assignee | ||
Comment 4•6 years ago
|
||
It's not used at all.
Assignee | ||
Comment 5•6 years ago
|
||
So that we don't generate anymore unnecessary change hints in RestyleManager::AddLayerChangesForAnimation for the layer has no corresponding animations. Depends on D11105
Pushed by hikezoe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bf7b500919fe Drop AnimationInfo::mLayerManager. r=birtles https://hg.mozilla.org/integration/autoland/rev/88a82ede1bc4 Wrap AnimationInfo::mAnimationGeneration into Maybe<> and returns Nothing() if there is no animation. r=birtles
Comment 7•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/bf7b500919fe https://hg.mozilla.org/mozilla-central/rev/88a82ede1bc4
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in
before you can comment on or make changes to this bug.
Description
•