Bug 1190881 - Part 2. In VectorImage::RequestRefresh, update pending timing. draft
authorcku <cku@mozilla.com>
Wed, 24 Aug 2016 18:22:49 +0800
changeset 404917 38bd4e9ce6887d39b6755c445fe5404f63060fb2
parent 404916 ec3956afd34c8f7404c998a108fd5de2e367c4e0
child 404918 089b51a6ad654513126c65fa2e8bcb552172fab6
push id27355
push userbmo:cku@mozilla.com
push dateWed, 24 Aug 2016 14:43:39 +0000
bugs1190881
milestone51.0a1
Bug 1190881 - Part 2. In VectorImage::RequestRefresh, update pending timing. MozReview-Commit-ID: BT0yPEqXYue
image/VectorImage.cpp
--- a/image/VectorImage.cpp
+++ b/image/VectorImage.cpp
@@ -520,16 +520,24 @@ VectorImage::GetWidth(int32_t* aWidth)
 //******************************************************************************
 NS_IMETHODIMP_(void)
 VectorImage::RequestRefresh(const TimeStamp& aTime)
 {
   if (HadRecentRefresh(aTime)) {
     return;
   }
 
+  nsIDocument* doc = mSVGDocumentWrapper->GetDocument();
+  if (doc) {
+    PendingAnimationTracker* tracker = doc->GetPendingAnimationTracker();
+    if (tracker) {
+      tracker->TriggerPendingAnimationsOnNextTick(aTime);
+    }
+  }
+
   EvaluateAnimation();
 
   mSVGDocumentWrapper->TickRefreshDriver();
 
   if (mHasPendingInvalidation) {
     SendInvalidationNotifications();
     mHasPendingInvalidation = false;
   }