Bug 1134163 - Remove unnecessary getting timestamp code. r?birtles." draft
authorMantaroh Yoshinaga <mantaroh@gmail.com>
Wed, 27 Apr 2016 09:08:32 +0900
changeset 356724 6d8edb36a5a13fe6d07f8e3dc54f8a64a45f6b1b
parent 356723 3c34632eb2368118411f4a07926b471d6eae409c
child 519464 966a253324a2221b5c73cff25de6df25800a9c8f
push id16580
push usermantaroh@gmail.com
push dateWed, 27 Apr 2016 00:09:44 +0000
reviewersbirtles
bugs1134163
milestone49.0a1
Bug 1134163 - Remove unnecessary getting timestamp code. r?birtles." MozReview-Commit-ID: 5wzV1YGdZmB
layout/style/nsAnimationManager.cpp
--- a/layout/style/nsAnimationManager.cpp
+++ b/layout/style/nsAnimationManager.cpp
@@ -291,35 +291,18 @@ CSSAnimation::UpdateTiming(SeekFlag aSee
 
   Animation::UpdateTiming(aSeekFlag, aSyncNotifyFlag);
 }
 
 TimeStamp
 CSSAnimation::ElapsedTimeToTimeStamp(const StickyTimeDuration&
                                        aElapsedTime) const
 {
-  // Initializes to null. We always return this object to benefit from
-  // return-value-optimization.
-  TimeStamp result;
-
-  // Currently we may dispatch animationstart events before resolving
-  // mStartTime if we have a delay <= 0. This will change in bug 1134163
-  // but until then we should just use the latest refresh driver time as
-  // the event timestamp in that case.
-  if (!mEffect || mStartTime.IsNull()) {
-    nsPresContext* presContext = GetPresContext();
-    if (presContext) {
-      result = presContext->RefreshDriver()->MostRecentRefresh();
-    }
-    return result;
-  }
-
-  result = AnimationTimeToTimeStamp(aElapsedTime +
-                                    mEffect->SpecifiedTiming().mDelay);
-  return result;
+  retrun AnimationTimeToTimeStamp(aElapsedTime +
+                                  mEffect->SpecifiedTiming().mDelay);
 }
 
 ////////////////////////// nsAnimationManager ////////////////////////////
 
 NS_IMPL_CYCLE_COLLECTION(nsAnimationManager, mEventDispatcher)
 
 NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(nsAnimationManager, AddRef)
 NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(nsAnimationManager, Release)