From 371d30ed6a883983b33d6ecab6aa5692a927cbd3 Mon Sep 17 00:00:00 2001 From: Brian Birtles Date: Mon, 17 Nov 2014 13:45:57 +0900 Subject: [PATCH] Bug 1073336 part 5 - Add AnimationPlayerCollection::PlayerUpdated; r=dbaron --- layout/style/AnimationCommon.cpp | 10 ++++++++++ layout/style/AnimationCommon.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/layout/style/AnimationCommon.cpp b/layout/style/AnimationCommon.cpp index 666591ab93f5..6f75d8ca438a 100644 --- a/layout/style/AnimationCommon.cpp +++ b/layout/style/AnimationCommon.cpp @@ -483,6 +483,16 @@ AnimationPlayerCollection::GetElementToRestyle() const return pseudoFrame->GetContent()->AsElement(); } +void +AnimationPlayerCollection::NotifyPlayerUpdated() +{ + // On the next flush, force us to update the style rule + mNeedsRefreshes = true; + mStyleRuleRefreshTime = TimeStamp(); + + mManager->NotifyCollectionUpdated(*this); +} + /* static */ void AnimationPlayerCollection::LogAsyncAnimationFailure(nsCString& aMessage, const nsIContent* aContent) diff --git a/layout/style/AnimationCommon.h b/layout/style/AnimationCommon.h index a4d2890d61c1..a6c490b25cf4 100644 --- a/layout/style/AnimationCommon.h +++ b/layout/style/AnimationCommon.h @@ -278,6 +278,8 @@ struct AnimationPlayerCollection : public PRCList } } + void NotifyPlayerUpdated(); + static void LogAsyncAnimationFailure(nsCString& aMessage, const nsIContent* aContent = nullptr); -- 2.11.4.GIT