Bug 1354947 - Drop Gecko_AnimationAppendKeyframe. r?birtles draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Sat, 13 May 2017 16:34:38 +0900
changeset 577323 8d7e62ba7e10a11ec93e484718334d80b649bd78
parent 577322 9ab5850523c7d11da908411572b41fc3674d6f85
child 577324 7579fa97b1870332529b23274b1b8c6ec5ec64d5
push id58655
push userhikezoe@mozilla.com
push dateSat, 13 May 2017 07:47:48 +0000
reviewersbirtles
bugs1354947
milestone55.0a1
Bug 1354947 - Drop Gecko_AnimationAppendKeyframe. r?birtles MozReview-Commit-ID: 9B9TjkJ5CxO
js/src/devtools/rootAnalysis/analyzeHeapWrites.js
layout/style/ServoBindings.cpp
layout/style/ServoBindings.h
--- a/js/src/devtools/rootAnalysis/analyzeHeapWrites.js
+++ b/js/src/devtools/rootAnalysis/analyzeHeapWrites.js
@@ -187,17 +187,16 @@ function treatAsSafeArgument(entry, varN
         ["Gecko_CSSFontFaceRule_GetCssText", "aResult", null],
         ["Gecko_EnsureTArrayCapacity", "aArray", null],
         ["Gecko_ClearPODTArray", "aArray", null],
         ["Gecko_ClearAndResizeStyleContents", "aContent", null],
         [/Gecko_ClearAndResizeCounter/, "aContent", null],
         [/Gecko_CopyCounter.*?From/, "aContent", null],
         [/Gecko_SetContentData/, "aContent", null],
         [/Gecko_EnsureStyle.*?ArrayLength/, "aArray", null],
-        ["Gecko_AnimationAppendKeyframe", "aKeyframes", null],
         ["Gecko_GetOrCreateKeyframeAtStart", "aKeyframes", null],
         ["Gecko_GetOrCreateInitialKeyframe", "aKeyframes", null],
         ["Gecko_GetOrCreateFinalKeyframe", "aKeyframes", null],
         ["Gecko_SetStyleCoordCalcValue", null, null],
         ["Gecko_StyleClipPath_SetURLValue", "aClip", null],
         ["Gecko_nsStyleFilter_SetURLValue", "aEffects", null],
         ["Gecko_nsStyleSVGPaint_CopyFrom", "aDest", null],
         ["Gecko_nsStyleSVGPaint_SetURLValue", "aPaint", null],
@@ -371,17 +370,16 @@ function ignoreContents(entry)
         // to do but not understood by the analysis yet.
         / EmptyString\(\)/,
         /nsCSSProps::LookupPropertyValue/,
         /nsCSSProps::ValueToKeyword/,
         /nsCSSKeywords::GetStringValue/,
 
         // The analysis can't cope with the indirection used for the objects
         // being initialized here.
-        "Gecko_AnimationAppendKeyframe",
         "Gecko_GetOrCreateKeyframeAtStart",
         "Gecko_GetOrCreateInitialKeyframe",
         "Gecko_GetOrCreateFinalKeyframe",
         "Gecko_NewStyleQuoteValues",
         "Gecko_NewCSSValueSharedList",
         "Gecko_NewGridTemplateAreasValue",
         /nsCSSValue::SetCalcValue/,
         /CSSValueSerializeCalcOps::Append/,
--- a/layout/style/ServoBindings.cpp
+++ b/layout/style/ServoBindings.cpp
@@ -1447,32 +1447,16 @@ Gecko_AppendWillChange(nsStyleDisplay* a
 
 void
 Gecko_CopyWillChangeFrom(nsStyleDisplay* aDest, nsStyleDisplay* aSrc)
 {
   aDest->mWillChange.Clear();
   aDest->mWillChange.AppendElements(aSrc->mWillChange);
 }
 
-Keyframe*
-Gecko_AnimationAppendKeyframe(RawGeckoKeyframeListBorrowedMut aKeyframes,
-                              float aOffset,
-                              const nsTimingFunction* aTimingFunction)
-{
-  Keyframe* keyframe = aKeyframes->AppendElement();
-  keyframe->mOffset.emplace(aOffset);
-  if (aTimingFunction &&
-      aTimingFunction->mType != nsTimingFunction::Type::Linear) {
-    keyframe->mTimingFunction.emplace();
-    keyframe->mTimingFunction->Init(*aTimingFunction);
-  }
-
-  return keyframe;
-}
-
 enum class KeyframeSearchDirection {
   Forwards,
   Backwards,
 };
 
 enum class KeyframeInsertPosition {
   Prepend,
   LastForOffset,
--- a/layout/style/ServoBindings.h
+++ b/layout/style/ServoBindings.h
@@ -363,20 +363,16 @@ void Gecko_EnsureImageLayersLength(nsSty
 
 void Gecko_EnsureStyleAnimationArrayLength(void* array, size_t len);
 void Gecko_EnsureStyleTransitionArrayLength(void* array, size_t len);
 
 void Gecko_ClearWillChange(nsStyleDisplay* display, size_t length);
 void Gecko_AppendWillChange(nsStyleDisplay* display, nsIAtom* atom);
 void Gecko_CopyWillChangeFrom(nsStyleDisplay* dest, nsStyleDisplay* src);
 
-mozilla::Keyframe* Gecko_AnimationAppendKeyframe(RawGeckoKeyframeListBorrowedMut keyframes,
-                                                 float offset,
-                                                 const nsTimingFunction* timingFunction);
-
 // Searches from the beginning of |keyframes| for a Keyframe object with the
 // specified offset and timing function. If none is found, a new Keyframe object
 // with the specified |offset| and |timingFunction| will be prepended to
 // |keyframes|.
 //
 // @param keyframes  An array of Keyframe objects, sorted by offset.
 //                   The first Keyframe in the array, if any, MUST have an
 //                   offset greater than or equal to |offset|.