Bug 1338087 - Part 1: Don't apply paced spacing on stylo. draft
authorBoris Chiou <boris.chiou@gmail.com>
Fri, 10 Feb 2017 16:37:45 +0800
changeset 482387 fb88ddcc001290afb6379a812a2b94db6e3fedf6
parent 482353 09ef6a4f41186ea6951830d1506f741005dcc46f
child 482388 049208942109927beb8f7555b99329d66101abf2
child 482525 2f2e98121a46fcd8a20e87cbfdb4f0476143049c
child 482540 8e90553c0320ec6135775b82c8223c4438867b1b
push id45064
push userbmo:boris.chiou@gmail.com
push dateSun, 12 Feb 2017 12:57:33 +0000
bugs1338087
milestone54.0a1
Bug 1338087 - Part 1: Don't apply paced spacing on stylo. To avoid using StyleAnimationValue on stylo, we should skip ApplySpacing, which means We always fall back to distribute spacing on stylo. MozReview-Commit-ID: 9DNwhOI8saf
dom/animation/KeyframeEffectReadOnly.cpp
--- a/dom/animation/KeyframeEffectReadOnly.cpp
+++ b/dom/animation/KeyframeEffectReadOnly.cpp
@@ -891,17 +891,20 @@ KeyframeEffectReadOnly::BuildProperties(
   // make a copy of |mKeyframes| first and iterate over that instead.
   auto keyframesCopy(mKeyframes);
 
   nsTArray<ComputedKeyframeValues> computedValues =
     KeyframeUtils::GetComputedKeyframeValues(keyframesCopy,
                                              mTarget->mElement,
                                              aStyleContext);
 
-  if (mEffectOptions.mSpacingMode == SpacingMode::paced) {
+  // FIXME: Bug 1332633: we have to implement ComputeDistance for
+  //        RawServoAnimationValue.
+  if (mEffectOptions.mSpacingMode == SpacingMode::paced &&
+      aStyleContext->PresContext()->StyleSet()->IsGecko()) {
     KeyframeUtils::ApplySpacing(keyframesCopy, SpacingMode::paced,
                                 mEffectOptions.mPacedProperty,
                                 computedValues, aStyleContext);
   }
 
   result =
     KeyframeUtils::GetAnimationPropertiesFromKeyframes(keyframesCopy,
                                                        computedValues,