diff --git a/dom/animation/Animation.cpp b/dom/animation/Animation.cpp index bae2df4f2c23..3346ad1274d5 100644 --- a/dom/animation/Animation.cpp +++ b/dom/animation/Animation.cpp @@ -1525,8 +1525,8 @@ Animation::ComposeStyle&>( template void -Animation::ComposeStyle( - const RawServoAnimationValueMap& aAnimationValues, +Animation::ComposeStyle( + RawServoAnimationValueMap& aAnimationValues, const nsCSSPropertyIDSet& aPropertiesToSkip); } // namespace dom diff --git a/dom/animation/EffectCompositor.cpp b/dom/animation/EffectCompositor.cpp index fa33912f4692..d1448939c8df 100644 --- a/dom/animation/EffectCompositor.cpp +++ b/dom/animation/EffectCompositor.cpp @@ -476,7 +476,7 @@ EffectCompositor::GetServoAnimationRule( const dom::Element* aElement, CSSPseudoElementType aPseudoType, CascadeLevel aCascadeLevel, - RawServoAnimationValueMapBorrowed aAnimationValues) + RawServoAnimationValueMapBorrowedMut aAnimationValues) { MOZ_ASSERT(aAnimationValues); MOZ_ASSERT(mPresContext && mPresContext->IsDynamic(), diff --git a/dom/animation/EffectCompositor.h b/dom/animation/EffectCompositor.h index 4c2dc9385d98..12df1f2cc601 100644 --- a/dom/animation/EffectCompositor.h +++ b/dom/animation/EffectCompositor.h @@ -25,7 +25,7 @@ class nsIStyleRule; class nsPresContext; class nsStyleContext; struct RawServoAnimationValueMap; -typedef RawServoAnimationValueMap const* RawServoAnimationValueMapBorrowed; +typedef RawServoAnimationValueMap* RawServoAnimationValueMapBorrowedMut; namespace mozilla { @@ -163,7 +163,7 @@ public: const dom::Element* aElement, CSSPseudoElementType aPseudoType, CascadeLevel aCascadeLevel, - RawServoAnimationValueMapBorrowed aAnimationValues); + RawServoAnimationValueMapBorrowedMut aAnimationValues); bool HasPendingStyleUpdates() const; bool HasThrottledStyleUpdates() const; diff --git a/dom/animation/KeyframeEffectReadOnly.cpp b/dom/animation/KeyframeEffectReadOnly.cpp index 8895259c57f9..74ebd40565b7 100644 --- a/dom/animation/KeyframeEffectReadOnly.cpp +++ b/dom/animation/KeyframeEffectReadOnly.cpp @@ -661,7 +661,7 @@ KeyframeEffectReadOnly::ComposeStyleRule( // better to remove the duplicated code. void KeyframeEffectReadOnly::ComposeStyleRule( - const RawServoAnimationValueMap& aAnimationValues, + RawServoAnimationValueMap& aAnimationValues, const AnimationProperty& aProperty, const AnimationPropertySegment& aSegment, const ComputedTiming& aComputedTiming) @@ -1881,8 +1881,8 @@ KeyframeEffectReadOnly::ComposeStyle&>( template void -KeyframeEffectReadOnly::ComposeStyle( - const RawServoAnimationValueMap& aAnimationValues, +KeyframeEffectReadOnly::ComposeStyle( + RawServoAnimationValueMap& aAnimationValues, const nsCSSPropertyIDSet& aPropertiesToSkip); } // namespace dom diff --git a/dom/animation/KeyframeEffectReadOnly.h b/dom/animation/KeyframeEffectReadOnly.h index 26e10065c876..b225762c3f26 100644 --- a/dom/animation/KeyframeEffectReadOnly.h +++ b/dom/animation/KeyframeEffectReadOnly.h @@ -431,7 +431,7 @@ private: const AnimationPropertySegment& aSegment, const ComputedTiming& aComputedTiming); - void ComposeStyleRule(const RawServoAnimationValueMap& aAnimationValues, + void ComposeStyleRule(RawServoAnimationValueMap& aAnimationValues, const AnimationProperty& aProperty, const AnimationPropertySegment& aSegment, const ComputedTiming& aComputedTiming); diff --git a/layout/style/ServoArcTypeList.h b/layout/style/ServoArcTypeList.h index 2bf02e1bb190..8e54d0184d7f 100644 --- a/layout/style/ServoArcTypeList.h +++ b/layout/style/ServoArcTypeList.h @@ -13,7 +13,6 @@ SERVO_ARC_TYPE(DeclarationBlock, RawServoDeclarationBlock) SERVO_ARC_TYPE(StyleRule, RawServoStyleRule) SERVO_ARC_TYPE(ImportRule, RawServoImportRule) SERVO_ARC_TYPE(AnimationValue, RawServoAnimationValue) -SERVO_ARC_TYPE(AnimationValueMap, RawServoAnimationValueMap) SERVO_ARC_TYPE(MediaList, RawServoMediaList) SERVO_ARC_TYPE(MediaRule, RawServoMediaRule) SERVO_ARC_TYPE(NamespaceRule, RawServoNamespaceRule) diff --git a/layout/style/ServoBindingList.h b/layout/style/ServoBindingList.h index 39acb36c0fda..3799ffcba255 100644 --- a/layout/style/ServoBindingList.h +++ b/layout/style/ServoBindingList.h @@ -148,7 +148,7 @@ SERVO_BINDING_FUNC(Servo_GetComputedKeyframeValues, void, RawServoStyleSetBorrowed set, RawGeckoComputedKeyframeValuesListBorrowedMut result) SERVO_BINDING_FUNC(Servo_AnimationValueMap_Push, void, - RawServoAnimationValueMapBorrowed, + RawServoAnimationValueMapBorrowedMut, nsCSSPropertyID property, RawServoAnimationValueBorrowed value) SERVO_BINDING_FUNC(Servo_ComputedValues_ExtractAnimationValue, @@ -244,7 +244,7 @@ SERVO_BINDING_FUNC(Servo_DeclarationBlock_HasCSSWideKeyword, bool, // |base_values| is nsRefPtrHashtable. // We use void* to avoid exposing nsRefPtrHashtable in FFI. SERVO_BINDING_FUNC(Servo_AnimationCompose, void, - RawServoAnimationValueMapBorrowed animation_values, + RawServoAnimationValueMapBorrowedMut animation_values, void* base_values, nsCSSPropertyID property, RawGeckoAnimationPropertySegmentBorrowed animation_segment, diff --git a/layout/style/ServoBindingTypes.h b/layout/style/ServoBindingTypes.h index 16ed3c60e289..67a6d425c186 100644 --- a/layout/style/ServoBindingTypes.h +++ b/layout/style/ServoBindingTypes.h @@ -14,6 +14,7 @@ #include "nsTArray.h" struct RawServoStyleSet; +struct RawServoAnimationValueMap; #define SERVO_ARC_TYPE(name_, type_) struct type_; #include "mozilla/ServoArcTypeList.h" @@ -108,6 +109,7 @@ DECL_OWNED_REF_TYPE_FOR(RawServoStyleSet) DECL_NULLABLE_OWNED_REF_TYPE_FOR(StyleChildrenIterator) DECL_OWNED_REF_TYPE_FOR(StyleChildrenIterator) DECL_OWNED_REF_TYPE_FOR(ServoElementSnapshot) +DECL_OWNED_REF_TYPE_FOR(RawServoAnimationValueMap) // We don't use BorrowedMut because the nodes may alias // Servo itself doesn't directly read or mutate these; diff --git a/layout/style/ServoBindings.cpp b/layout/style/ServoBindings.cpp index 1cd53e46c4b9..b1c891ba7bed 100644 --- a/layout/style/ServoBindings.cpp +++ b/layout/style/ServoBindings.cpp @@ -461,7 +461,7 @@ PseudoTagAndCorrectElementForAnimation(const Element*& aElementOrPseudo) { bool Gecko_GetAnimationRule(RawGeckoElementBorrowed aElement, EffectCompositor::CascadeLevel aCascadeLevel, - RawServoAnimationValueMapBorrowed aAnimationValues) + RawServoAnimationValueMapBorrowedMut aAnimationValues) { MOZ_ASSERT(aElement); diff --git a/layout/style/ServoBindings.h b/layout/style/ServoBindings.h index 37e7df01acf3..e9cd0cb0d8bc 100644 --- a/layout/style/ServoBindings.h +++ b/layout/style/ServoBindings.h @@ -193,7 +193,7 @@ Gecko_GetExtraContentStyleDeclarations(RawGeckoElementBorrowed element); bool Gecko_GetAnimationRule(RawGeckoElementBorrowed aElementOrPseudo, mozilla::EffectCompositor::CascadeLevel aCascadeLevel, - RawServoAnimationValueMapBorrowed aAnimationValues); + RawServoAnimationValueMapBorrowedMut aAnimationValues); RawServoDeclarationBlockStrongBorrowedOrNull Gecko_GetSMILOverrideDeclarationBlock(RawGeckoElementBorrowed element); bool Gecko_StyleAnimationsEquals(RawGeckoStyleAnimationListBorrowed,