Bug 1354947 - Rename FillKeyframesForName to GetKeyframesForName. r?birtles draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Tue, 02 May 2017 19:14:18 +0900
changeset 571305 addcc594c014c94e3ea55d066e0b25446cf76c56
parent 571304 3d353e54e00c12dbbea789206a7b233be5cfc1cc
child 571306 d09d273c9ef34cab63fe8031553b87ec6fdce0b9
push id56743
push userhikezoe@mozilla.com
push dateTue, 02 May 2017 10:26:16 +0000
reviewersbirtles
bugs1354947
milestone55.0a1
Bug 1354947 - Rename FillKeyframesForName to GetKeyframesForName. r?birtles MozReview-Commit-ID: 16yNoXpCQxN
layout/style/ServoBindingList.h
layout/style/ServoStyleSet.cpp
layout/style/ServoStyleSet.h
layout/style/nsAnimationManager.cpp
servo/ports/geckolib/glue.rs
--- a/layout/style/ServoBindingList.h
+++ b/layout/style/ServoBindingList.h
@@ -56,17 +56,17 @@ SERVO_BINDING_FUNC(Servo_StyleSet_Prepen
 SERVO_BINDING_FUNC(Servo_StyleSet_RemoveStyleSheet, void,
                    RawServoStyleSetBorrowed set, RawServoStyleSheetBorrowed sheet, bool flush)
 SERVO_BINDING_FUNC(Servo_StyleSet_InsertStyleSheetBefore, void,
                    RawServoStyleSetBorrowed set, RawServoStyleSheetBorrowed sheet,
                    RawServoStyleSheetBorrowed reference, bool flush)
 SERVO_BINDING_FUNC(Servo_StyleSet_FlushStyleSheets, void, RawServoStyleSetBorrowed set)
 SERVO_BINDING_FUNC(Servo_StyleSet_NoteStyleSheetsChanged, void,
                    RawServoStyleSetBorrowed set, bool author_style_disabled)
-SERVO_BINDING_FUNC(Servo_StyleSet_FillKeyframesForName, bool,
+SERVO_BINDING_FUNC(Servo_StyleSet_GetKeyframesForName, bool,
                    RawServoStyleSetBorrowed set,
                    const nsACString* property,
                    nsTimingFunctionBorrowed timing_function,
                    ServoComputedValuesBorrowed computed_values,
                    RawGeckoKeyframeListBorrowedMut keyframe_list)
 SERVO_BINDING_FUNC(Servo_StyleSet_GetFontFaceRules, void,
                    RawServoStyleSetBorrowed set,
                    RawGeckoFontFaceRuleListBorrowedMut list)
--- a/layout/style/ServoStyleSet.cpp
+++ b/layout/style/ServoStyleSet.cpp
@@ -851,27 +851,27 @@ ServoStyleSet::AssertTreeIsClean()
   DocumentStyleRootIterator iter(mPresContext->Document());
   while (Element* root = iter.GetNextStyleRoot()) {
     Servo_AssertTreeIsClean(root);
   }
 }
 #endif
 
 bool
-ServoStyleSet::FillKeyframesForName(const nsString& aName,
-                                    const nsTimingFunction& aTimingFunction,
-                                    const ServoComputedValues* aComputedValues,
-                                    nsTArray<Keyframe>& aKeyframes)
+ServoStyleSet::GetKeyframesForName(const nsString& aName,
+                                   const nsTimingFunction& aTimingFunction,
+                                   const ServoComputedValues* aComputedValues,
+                                   nsTArray<Keyframe>& aKeyframes)
 {
   NS_ConvertUTF16toUTF8 name(aName);
-  return Servo_StyleSet_FillKeyframesForName(mRawSet.get(),
-                                             &name,
-                                             &aTimingFunction,
-                                             aComputedValues,
-                                             &aKeyframes);
+  return Servo_StyleSet_GetKeyframesForName(mRawSet.get(),
+                                            &name,
+                                            &aTimingFunction,
+                                            aComputedValues,
+                                            &aKeyframes);
 }
 
 nsTArray<ComputedKeyframeValues>
 ServoStyleSet::GetComputedKeyframeValuesFor(
   const nsTArray<Keyframe>& aKeyframes,
   dom::Element* aElement,
   const ServoComputedValuesWithParent& aServoValues)
 {
--- a/layout/style/ServoStyleSet.h
+++ b/layout/style/ServoStyleSet.h
@@ -274,20 +274,20 @@ public:
   void RebuildData();
 
   /**
    * Resolve style for the given element, and return it as a
    * ServoComputedValues, not an nsStyleContext.
    */
   already_AddRefed<ServoComputedValues> ResolveServoStyle(dom::Element* aElement);
 
-  bool FillKeyframesForName(const nsString& aName,
-                            const nsTimingFunction& aTimingFunction,
-                            const ServoComputedValues* aComputedValues,
-                            nsTArray<Keyframe>& aKeyframes);
+  bool GetKeyframesForName(const nsString& aName,
+                           const nsTimingFunction& aTimingFunction,
+                           const ServoComputedValues* aComputedValues,
+                           nsTArray<Keyframe>& aKeyframes);
 
   nsTArray<ComputedKeyframeValues>
   GetComputedKeyframeValuesFor(const nsTArray<Keyframe>& aKeyframes,
                                dom::Element* aElement,
                                const ServoComputedValuesWithParent&
                                  aServoValues);
 
   bool AppendFontFaceRules(nsTArray<nsFontFaceRuleContainer>& aArray);
--- a/layout/style/nsAnimationManager.cpp
+++ b/layout/style/nsAnimationManager.cpp
@@ -416,20 +416,20 @@ public:
 
   bool BuildKeyframes(nsPresContext* aPresContext,
                       const StyleAnimation& aSrc,
                       nsTArray<Keyframe>& aKeyframes)
   {
     ServoStyleSet* styleSet = aPresContext->StyleSet()->AsServo();
     MOZ_ASSERT(styleSet);
     const nsTimingFunction& timingFunction = aSrc.GetTimingFunction();
-    return styleSet->FillKeyframesForName(aSrc.GetName(),
-                                          timingFunction,
-                                          mComputedValues,
-                                          aKeyframes);
+    return styleSet->GetKeyframesForName(aSrc.GetName(),
+                                         timingFunction,
+                                         mComputedValues,
+                                         aKeyframes);
   }
   void SetKeyframes(KeyframeEffectReadOnly& aEffect,
                     nsTArray<Keyframe>&& aKeyframes)
   {
     aEffect.SetKeyframes(Move(aKeyframes),
                          { mComputedValues, mParentComputedValues });
   }
 
--- a/servo/ports/geckolib/glue.rs
+++ b/servo/ports/geckolib/glue.rs
@@ -2140,21 +2140,21 @@ fn fill_in_missing_keyframe_values(all_p
                                         property,
                                         shared_lock);
             index += 1;
         }
     }
 }
 
 #[no_mangle]
-pub extern "C" fn Servo_StyleSet_FillKeyframesForName(raw_data: RawServoStyleSetBorrowed,
-                                                      name: *const nsACString,
-                                                      inherited_timing_function: nsTimingFunctionBorrowed,
-                                                      style: ServoComputedValuesBorrowed,
-                                                      keyframes: RawGeckoKeyframeListBorrowedMut) -> bool {
+pub extern "C" fn Servo_StyleSet_GetKeyframesForName(raw_data: RawServoStyleSetBorrowed,
+                                                     name: *const nsACString,
+                                                     inherited_timing_function: nsTimingFunctionBorrowed,
+                                                     style: ServoComputedValuesBorrowed,
+                                                     keyframes: RawGeckoKeyframeListBorrowedMut) -> bool {
     debug_assert!(keyframes.len() == 0,
                   "keyframes should be initially empty");
     let data = PerDocumentStyleData::from_ffi(raw_data).borrow();
     let name = unsafe { Atom::from(name.as_ref().unwrap().as_str_unchecked()) };
 
     let animation = match data.stylist.animations().get(&name) {
         Some(animation) => animation,
         None => return false,