Bug 1432104 - KeyframeUtils::GetAnimationPropertiesFromKeyframes needs specializations both for GeckoStyleContext* and const ServoStyleContext*. r?birtles draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Mon, 22 Jan 2018 19:19:41 +0900
changeset 723041 c0d8219c2d6a59d399bab5dc76d1b91c0f04b605
parent 723009 5faab9e619901b1513fd4ca137747231be550def
child 746750 cf291fc166ba4d82637dfb1c38d0b79f63a01814
push id96305
push userhikezoe@mozilla.com
push dateMon, 22 Jan 2018 10:20:24 +0000
reviewersbirtles
bugs1432104
milestone59.0a1
Bug 1432104 - KeyframeUtils::GetAnimationPropertiesFromKeyframes needs specializations both for GeckoStyleContext* and const ServoStyleContext*. r?birtles The implementation of the template function is defined in KeyframeUtils.cpp, whereas the caller is inside KeyframeEffectReadOnly.cpp. I guess it's been compiled accidentally because of unified builds. MozReview-Commit-ID: 9GeIT7nDpLG
dom/animation/KeyframeUtils.cpp
--- a/dom/animation/KeyframeUtils.cpp
+++ b/dom/animation/KeyframeUtils.cpp
@@ -1673,9 +1673,25 @@ DistributeRange(const Range<Keyframe>& a
   const double startOffset = aRange[0].mComputedOffset;
   const double diffOffset = aRange[n].mComputedOffset - startOffset;
   for (auto iter = rangeToAdjust.begin(); iter != rangeToAdjust.end(); ++iter) {
     size_t index = iter - aRange.begin();
     iter->mComputedOffset = startOffset + double(index) / n * diffOffset;
   }
 }
 
+template
+nsTArray<AnimationProperty>
+KeyframeUtils::GetAnimationPropertiesFromKeyframes(
+  const nsTArray<Keyframe>& aKeyframes,
+  dom::Element* aElement,
+  GeckoStyleContext* aStyle,
+  dom::CompositeOperation aEffectComposite);
+
+template
+nsTArray<AnimationProperty>
+KeyframeUtils::GetAnimationPropertiesFromKeyframes(
+  const nsTArray<Keyframe>& aKeyframes,
+  dom::Element* aElement,
+  const ServoStyleContext* aStyle,
+  dom::CompositeOperation aEffectComposite);
+
 } // namespace mozilla