Closed
Bug 1235002
Opened 9 years ago
Closed 9 years ago
Skip requesting a restyle when mProperties is empty in NotifyAnimationTimingUpdated
Categories
(Core :: DOM: Animation, defect)
Core
DOM: Animation
Tracking
()
RESOLVED
FIXED
mozilla49
People
(Reporter: birtles, Assigned: hiro)
References
Details
Attachments
(2 files)
2.66 KB,
patch
|
Details | Diff | Splinter Review | |
58 bytes,
text/x-review-board-request
|
birtles
:
review+
|
Details |
As of bug 1232563, we no longer skip posting restyles for empty effects in KeyframeEffectReadOnly::NotifyAnimationTimingUpdated.
This is because when we create animations in nsAnimationManager and nsTransitionManager, we'll create the effect, attach it to an animation, play it, then add properties to it. We'll get a call to NotifyAnimationTimingUpdated when we play the animation but we update the properties just by settings the members of the effect directly and not via any method that will know to request a restyle as a result.
We should drop the non-const Properties() method and add a SetProperties in its place. Then in SetProperties we can trigger a layer update.
After doing that, we can re-instate the check for an empty property set before requesting a restyle in NotifyAnimationTimingUpdated.
Assignee | ||
Comment 1•9 years ago
|
||
I think this bug will be fixed by bug 1260976 and bug 1260655. Right?
Reporter | ||
Comment 2•9 years ago
|
||
Yes, but we still need to:
> re-instate the check for an empty property set before requesting a restyle in NotifyAnimationTimingUpdated.
Assignee | ||
Updated•9 years ago
|
Assignee | ||
Comment 3•9 years ago
|
||
I am going to take this, but I have two concerns about test.
1. We don't have any ability to check whether requesting a restyle is processed or skipped for now.
We can, of course, check restyles but it's already skipped at IsInEfect() check in CanThrottle() because mProgress is null.
2. I am not sure that mProgressOnLastCompose should be nullified when mProperties is empty.
I can write a test case for the second concern here. The first one will not be resolved soon, it will be a long standing issue.
Assignee: nobody → hiikezoe
Assignee | ||
Comment 4•9 years ago
|
||
(In reply to Hiroyuki Ikezoe (:hiro) from comment #3)
> 2. I am not sure that mProgressOnLastCompose should be nullified when
> mProperties is empty.
It turns out we need to nullify the mProgressOnLastCompose in the case. I am writing a reftest.
Assignee | ||
Comment 5•9 years ago
|
||
This is a reftest which fails if we forget nullifying mProgressOnLastCompose in case of mProperties.IsEmpty() in NotifyAnimationTimingUpdated() on *non-E10S*.
Assignee | ||
Comment 6•9 years ago
|
||
The reason why attachment 8745189 [details] [diff] [review] does not work on E10S is that flushApzRepaints() causes style flush.
https://hg.mozilla.org/mozilla-central/annotate/fc15477ce628599519cb0055f52cc195d640dc94/layout/tools/reftest/reftest-content.js#l588
Assignee | ||
Comment 7•9 years ago
|
||
(In reply to Hiroyuki Ikezoe (:hiro) from comment #6)
> The reason why attachment 8745189 [details] [diff] [review] does not work on
> E10S is that flushApzRepaints() causes style flush.
>
> https://hg.mozilla.org/mozilla-central/annotate/
> fc15477ce628599519cb0055f52cc195d640dc94/layout/tools/reftest/reftest-
> content.js#l588
Filed bug 1267908.
Assignee | ||
Comment 8•9 years ago
|
||
The test case here does not check whether requesting restyles for empty
properties is skipped or not. It just checks that whether restyles happen or
not because there is no way to check each request for restyles yet.
Review commit: https://reviewboard.mozilla.org/r/49925/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/49925/
Assignee | ||
Comment 9•9 years ago
|
||
Nullifying mProgressOnLastCompose has been handled in bug 1267937.
Depends on: 1267937
Comment on attachment 8747555 [details]
MozReview Request: Bug 1235002 - Skip requesting a restyle when mProperties is empty. r?birtles
I'm guessing you meant to ask for review here but didn't because of the typo.
Attachment #8747555 -
Flags: review?(bbirtles)
Assignee | ||
Comment 11•9 years ago
|
||
Thank you, dbaron. I did not notice the typo at all.
Reporter | ||
Comment 12•9 years ago
|
||
Comment on attachment 8747555 [details]
MozReview Request: Bug 1235002 - Skip requesting a restyle when mProperties is empty. r?birtles
https://reviewboard.mozilla.org/r/49925/#review47955
Thanks!
::: dom/animation/test/chrome/test_restyles.html:453
(Diff revision 1)
> +
> + yield animation.ready;
> + var markers = yield observeStyling(5);
> +
> + is(markers.length, 0,
> + 'Animations which has no keyframes should never cause restyles');
Nit: Animation with no keyframes should not cause restyles
::: dom/animation/test/chrome/test_restyles.html:462
(Diff revision 1)
> +
> + // There are 5 eRestyle_CSSAnimations and 1 eRestyle_CSSTransitions.
> + // 1 eRestyle_CSSTransitions comes from
> + // EffectCompositor::UpdateCascadeResults.
> + ok(markers.length == 6,
> + 'Setting non-empty frame should cause restyles normally.');
Nit: Setting valid keyframes should cause regular animation restyles to occur.
::: dom/animation/test/chrome/test_restyles.html:468
(Diff revision 1)
> + 'Setting empty frame should cause a restyle to remove the previous ' +
> + 'animated style');
Nit: Setting an empty set of keyframes should trigger a single restyle to remove the previous animated style.
Attachment #8747555 -
Flags: review?(bbirtles) → review+
Reporter | ||
Updated•9 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 13•9 years ago
|
||
Comment on attachment 8747555 [details]
MozReview Request: Bug 1235002 - Skip requesting a restyle when mProperties is empty. r?birtles
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/49925/diff/1-2/
Attachment #8747555 -
Attachment description: MozReview Request: Bug 1235002 - Skip requesting a restyle when mProperties is empty. r?birltes → MozReview Request: Bug 1235002 - Skip requesting a restyle when mProperties is empty. r?birtles
Comment 14•9 years ago
|
||
Comment 15•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in
before you can comment on or make changes to this bug.
Description
•