From 3ba13065126d57682ccc167388fee3c004230953 Mon Sep 17 00:00:00 2001 From: Brian Birtles Date: Mon, 17 Nov 2014 13:45:56 +0900 Subject: [PATCH] Bug 1073336 part 2 - Call CheckNeedsRefresh from within EnsureStyleRuleFor; r=dbaron Now that CheckNeedsRefresh is a member of the base class, CommonAnimationManager, we no longer need to rely on callers of AnimationPlayerCollection::EnsureStyleRuleFor to remember to call this method but can do it automatically. --- layout/style/AnimationCommon.cpp | 3 ++- layout/style/AnimationCommon.h | 3 --- layout/style/nsAnimationManager.cpp | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/layout/style/AnimationCommon.cpp b/layout/style/AnimationCommon.cpp index 1c6f056e6b05..67e0ff43b0c0 100644 --- a/layout/style/AnimationCommon.cpp +++ b/layout/style/AnimationCommon.cpp @@ -563,8 +563,9 @@ AnimationPlayerCollection::EnsureStyleRuleFor(TimeStamp aRefreshTime, mNeedsRefreshes); } } -} + mManager->CheckNeedsRefresh(); +} bool AnimationPlayerCollection::CanThrottleTransformChanges(TimeStamp aTime) diff --git a/layout/style/AnimationCommon.h b/layout/style/AnimationCommon.h index f6e7876cca36..040db76373da 100644 --- a/layout/style/AnimationCommon.h +++ b/layout/style/AnimationCommon.h @@ -188,9 +188,6 @@ struct AnimationPlayerCollection : public PRCList void Tick(); - // This updates mNeedsRefreshes so the caller may need to check - // for changes to values (for example, calling CheckNeedsRefresh to register - // or unregister from observing the refresh driver when this value changes). void EnsureStyleRuleFor(TimeStamp aRefreshTime, EnsureStyleRuleFlags aFlags); bool CanThrottleTransformChanges(mozilla::TimeStamp aTime); diff --git a/layout/style/nsAnimationManager.cpp b/layout/style/nsAnimationManager.cpp index f4ff43b8ea3e..7a6d94e99b7c 100644 --- a/layout/style/nsAnimationManager.cpp +++ b/layout/style/nsAnimationManager.cpp @@ -155,7 +155,6 @@ nsAnimationManager::UpdateStyleAndEvents(AnimationPlayerCollection* { aCollection->EnsureStyleRuleFor(aRefreshTime, aFlags); QueueEvents(aCollection, mPendingEvents); - CheckNeedsRefresh(); } void -- 2.11.4.GIT