Bug 1358966 - Add a new FFI to convert PropertyDeclarationBlock into nsTArray<RefPtr<RawServoAnimationValue>>. r=birtles
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Fri, 09 Jun 2017 06:19:37 +0900
changeset 363095 c54f6b4989cc20ef8958622f5f5ece501a062851
parent 363094 78fc301cf3b7a7acd02bc350db9bfabadaeca099
child 363096 4d87f2bf4b10369af0dd83a2ef962a23299ee8d9
push id31994
push usercbook@mozilla.com
push dateFri, 09 Jun 2017 10:56:24 +0000
treeherdermozilla-central@7c9d96bbc400 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbirtles
bugs1358966
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1358966 - Add a new FFI to convert PropertyDeclarationBlock into nsTArray<RefPtr<RawServoAnimationValue>>. r=birtles With this function we can get multiple RawServoAnimationValue(s) for shorthand properties. MozReview-Commit-ID: GPqmsOfVB0
layout/style/ServoBindingList.h
layout/style/ServoBindingTypes.h
layout/style/ServoBindings.toml
--- a/layout/style/ServoBindingList.h
+++ b/layout/style/ServoBindingList.h
@@ -235,16 +235,22 @@ SERVO_BINDING_FUNC(Servo_GetProperties_O
                    nsCSSPropertyIDSetBorrowedMut)
 SERVO_BINDING_FUNC(Servo_MatrixTransform_Operate, void,
                    nsStyleTransformMatrix::MatrixTransformOperator
                      matrix_operator,
                    const RawGeckoGfxMatrix4x4* from,
                    const RawGeckoGfxMatrix4x4* to,
                    double progress,
                    RawGeckoGfxMatrix4x4* result)
+SERVO_BINDING_FUNC(Servo_GetAnimationValues, void,
+                   RawServoDeclarationBlockBorrowed declarations,
+                   RawGeckoElementBorrowed element,
+                   ServoComputedValuesBorrowed style,
+                   RawServoStyleSetBorrowed style_set,
+                   RawGeckoServoAnimationValueListBorrowedMut animation_values)
 
 // AnimationValues handling
 SERVO_BINDING_FUNC(Servo_AnimationValues_Interpolate,
                    RawServoAnimationValueStrong,
                    RawServoAnimationValueBorrowed from,
                    RawServoAnimationValueBorrowed to,
                    double progress)
 SERVO_BINDING_FUNC(Servo_AnimationValues_IsInterpolable, bool,
--- a/layout/style/ServoBindingTypes.h
+++ b/layout/style/ServoBindingTypes.h
@@ -53,16 +53,17 @@ using mozilla::dom::StyleChildrenIterato
 using mozilla::ServoElementSnapshot;
 
 typedef nsINode RawGeckoNode;
 typedef mozilla::dom::Element RawGeckoElement;
 typedef nsIDocument RawGeckoDocument;
 typedef nsPresContext RawGeckoPresContext;
 typedef nsXBLBinding RawGeckoXBLBinding;
 typedef mozilla::URLExtraData RawGeckoURLExtraData;
+typedef nsTArray<RefPtr<RawServoAnimationValue>> RawGeckoServoAnimationValueList;
 typedef nsTArray<mozilla::Keyframe> RawGeckoKeyframeList;
 typedef nsTArray<mozilla::ComputedKeyframeValues> RawGeckoComputedKeyframeValuesList;
 typedef nsStyleAutoArray<mozilla::StyleAnimation> RawGeckoStyleAnimationList;
 typedef nsTArray<nsFontFaceRuleContainer> RawGeckoFontFaceRuleList;
 typedef mozilla::AnimationPropertySegment RawGeckoAnimationPropertySegment;
 typedef mozilla::ComputedTiming RawGeckoComputedTiming;
 typedef nsTArray<const RawServoStyleRule*> RawGeckoServoStyleRuleList;
 typedef nsTArray<nsCSSPropertyID> RawGeckoCSSPropertyIDList;
@@ -135,16 +136,17 @@ DECL_NULLABLE_BORROWED_REF_TYPE_FOR(RawG
 DECL_BORROWED_REF_TYPE_FOR(RawGeckoXBLBinding)
 DECL_NULLABLE_BORROWED_REF_TYPE_FOR(RawGeckoXBLBinding)
 DECL_BORROWED_MUT_REF_TYPE_FOR(StyleChildrenIterator)
 DECL_BORROWED_MUT_REF_TYPE_FOR(ServoElementSnapshot)
 DECL_BORROWED_REF_TYPE_FOR(nsCSSValue)
 DECL_BORROWED_MUT_REF_TYPE_FOR(nsCSSValue)
 DECL_OWNED_REF_TYPE_FOR(RawGeckoPresContext)
 DECL_BORROWED_REF_TYPE_FOR(RawGeckoPresContext)
+DECL_BORROWED_MUT_REF_TYPE_FOR(RawGeckoServoAnimationValueList)
 DECL_BORROWED_MUT_REF_TYPE_FOR(RawGeckoKeyframeList)
 DECL_BORROWED_REF_TYPE_FOR(RawGeckoKeyframeList)
 DECL_BORROWED_MUT_REF_TYPE_FOR(RawGeckoComputedKeyframeValuesList)
 DECL_BORROWED_REF_TYPE_FOR(RawGeckoStyleAnimationList)
 DECL_BORROWED_MUT_REF_TYPE_FOR(nsTimingFunction)
 DECL_BORROWED_REF_TYPE_FOR(nsTimingFunction)
 DECL_BORROWED_MUT_REF_TYPE_FOR(RawGeckoFontFaceRuleList)
 DECL_BORROWED_REF_TYPE_FOR(RawGeckoAnimationPropertySegment)
--- a/layout/style/ServoBindings.toml
+++ b/layout/style/ServoBindings.toml
@@ -334,16 +334,17 @@ structs-types = [
     "RawGeckoCSSPropertyIDList",
     "RawGeckoDocument",
     "RawGeckoElement",
     "RawGeckoKeyframeList",
     "RawGeckoComputedKeyframeValuesList",
     "RawGeckoFontFaceRuleList",
     "RawGeckoNode",
     "RawServoAnimationValue",
+    "RawGeckoServoAnimationValueList",
     "RawServoDeclarationBlock",
     "RawServoStyleRule",
     "RawGeckoPresContext",
     "RawGeckoPresContextOwned",
     "RawGeckoStyleAnimationList",
     "RawGeckoServoStyleRuleList",
     "RawGeckoURLExtraData",
     "RawGeckoXBLBinding",
@@ -468,13 +469,14 @@ servo-borrow-types = [
     "nsTimingFunction",
     "RawGeckoAnimationPropertySegment",
     "RawGeckoComputedTiming",
     "RawGeckoCSSPropertyIDList",
     "RawGeckoKeyframeList",
     "RawGeckoComputedKeyframeValuesList",
     "RawGeckoFontFaceRuleList",
     "RawGeckoServoStyleRuleList",
+    "RawGeckoServoAnimationValueList",
 ]
 fixups = [
     # hack for gecko-owned string
     { pat = "<nsString", rep = "<nsStringRepr" },
 ]