diff --git a/dom/animation/KeyframeEffectReadOnly.cpp b/dom/animation/KeyframeEffectReadOnly.cpp index 19374abe94b4..bc520f812208 100644 --- a/dom/animation/KeyframeEffectReadOnly.cpp +++ b/dom/animation/KeyframeEffectReadOnly.cpp @@ -196,7 +196,7 @@ KeyframeEffectReadOnly::SetKeyframes(nsTArray&& aKeyframes, void KeyframeEffectReadOnly::SetKeyframes( nsTArray&& aKeyframes, - const ServoComputedStyleValues& aServoValues) + const ServoComputedValuesWithParent& aServoValues) { DoSetKeyframes(Move(aKeyframes), aServoValues); } @@ -207,9 +207,9 @@ KeyframeEffectReadOnly::DoSetKeyframes(nsTArray&& aKeyframes, StyleType&& aStyle) { static_assert(IsSame::value || - IsSame::value, + IsSame::value, "StyleType should be nsStyleContext* or " - "const ServoComputedStyleValues&"); + "const ServoComputedValuesWithParent&"); if (KeyframesEqualIgnoringComputedOffsets(aKeyframes, mKeyframes)) { return; @@ -227,8 +227,8 @@ KeyframeEffectReadOnly::DoSetKeyframes(nsTArray&& aKeyframes, } // We need to call UpdateProperties() if the StyleType is - // 'const ServoComputedStyleValues&' (i.e. not a pointer) or nsStyleContext* - // is not nullptr. + // 'const ServoComputedValuesWithParent&' (i.e. not a pointer) or + // nsStyleContext* is not nullptr. if (!IsPointer::value || aStyle) { UpdateProperties(aStyle); MaybeUpdateFrameForCompositor(); @@ -311,13 +311,13 @@ KeyframeEffectReadOnly::UpdateProperties(nsStyleContext* aStyleContext) ? aStyleContext->GetParent()->StyleSource().AsServoComputedValues() : nullptr; - const ServoComputedStyleValues servoValues = { currentStyle, parentStyle }; + const ServoComputedValuesWithParent servoValues = { currentStyle, parentStyle }; DoUpdateProperties(servoValues); } void KeyframeEffectReadOnly::UpdateProperties( - const ServoComputedStyleValues& aServoValues) + const ServoComputedValuesWithParent& aServoValues) { DoUpdateProperties(aServoValues); } @@ -922,9 +922,9 @@ nsTArray KeyframeEffectReadOnly::BuildProperties(StyleType&& aStyle) { static_assert(IsSame::value || - IsSame::value, + IsSame::value, "StyleType should be nsStyleContext* or " - "const ServoComputedStyleValues&"); + "const ServoComputedValuesWithParent&"); MOZ_ASSERT(aStyle); diff --git a/dom/animation/KeyframeEffectReadOnly.h b/dom/animation/KeyframeEffectReadOnly.h index 149668064e98..f0441eff6d9e 100644 --- a/dom/animation/KeyframeEffectReadOnly.h +++ b/dom/animation/KeyframeEffectReadOnly.h @@ -146,7 +146,7 @@ struct AnimationProperty } }; -struct ServoComputedStyleValues +struct ServoComputedValuesWithParent { const ServoComputedValues* mCurrentStyle; const ServoComputedValues* mParentStyle; @@ -218,7 +218,7 @@ public: void SetKeyframes(nsTArray&& aKeyframes, nsStyleContext* aStyleContext); void SetKeyframes(nsTArray&& aKeyframes, - const ServoComputedStyleValues& aServoValues); + const ServoComputedValuesWithParent& aServoValues); // Returns true if the effect includes |aProperty| regardless of whether the // property is overridden by !important rule. @@ -247,7 +247,7 @@ public: // |aStyleContext| to resolve specified values. void UpdateProperties(nsStyleContext* aStyleContext); // Servo version of the above function. - void UpdateProperties(const ServoComputedStyleValues& aServoValues); + void UpdateProperties(const ServoComputedValuesWithParent& aServoValues); // Update various bits of state related to running ComposeStyle(). // We need to update this outside ComposeStyle() because we should avoid @@ -309,7 +309,7 @@ public: // This is used for deciding the animation is paint-only. void CalculateCumulativeChangeHint(nsStyleContext* aStyleContext); void CalculateCumulativeChangeHint( - const ServoComputedStyleValues& aServoValues) + const ServoComputedValuesWithParent& aServoValues) { } @@ -411,7 +411,7 @@ protected: // Ensure the base styles is available for any properties in |aProperties|. void EnsureBaseStyles(nsStyleContext* aStyleContext, const nsTArray& aProperties); - void EnsureBaseStyles(const ServoComputedStyleValues& aServoValues, + void EnsureBaseStyles(const ServoComputedValuesWithParent& aServoValues, const nsTArray& aProperties) { // FIXME: Bug 1311257: Support missing keyframes. diff --git a/dom/animation/KeyframeUtils.cpp b/dom/animation/KeyframeUtils.cpp index c1c1c4059238..38e6d58c8288 100644 --- a/dom/animation/KeyframeUtils.cpp +++ b/dom/animation/KeyframeUtils.cpp @@ -595,7 +595,7 @@ KeyframeUtils::ApplyDistributeSpacing(nsTArray& aKeyframes) KeyframeUtils::GetComputedKeyframeValues( const nsTArray& aKeyframes, dom::Element* aElement, - const ServoComputedStyleValues& aServoValues) + const ServoComputedValuesWithParent& aServoValues) { MOZ_ASSERT(aElement); MOZ_ASSERT(aElement->IsStyledByServo()); diff --git a/dom/animation/KeyframeUtils.h b/dom/animation/KeyframeUtils.h index 526f880ae82f..24b22be19268 100644 --- a/dom/animation/KeyframeUtils.h +++ b/dom/animation/KeyframeUtils.h @@ -23,7 +23,7 @@ enum class CSSPseudoElementType : uint8_t; class ErrorResult; struct Keyframe; struct PropertyStyleAnimationValuePair; -struct ServoComputedStyleValues; +struct ServoComputedValuesWithParent; namespace dom { class Element; @@ -88,7 +88,7 @@ public: static nsTArray GetComputedKeyframeValues(const nsTArray& aKeyframes, dom::Element* aElement, - const ServoComputedStyleValues& aServoValues); + const ServoComputedValuesWithParent& aServoValues); /** * Fills in the mComputedOffset member of each keyframe in the given array @@ -117,7 +117,7 @@ public: SpacingMode aSpacingMode, nsCSSPropertyID aProperty, nsTArray& aComputedValues, - const ServoComputedStyleValues& aServoValues) + const ServoComputedValuesWithParent& aServoValues) { NS_WARNING("stylo: ApplySpacing not implemented yet"); } diff --git a/layout/style/ServoStyleSet.cpp b/layout/style/ServoStyleSet.cpp index 21a565281acf..fb1de404afe9 100644 --- a/layout/style/ServoStyleSet.cpp +++ b/layout/style/ServoStyleSet.cpp @@ -727,9 +727,10 @@ ServoStyleSet::FillKeyframesForName(const nsString& aName, } nsTArray -ServoStyleSet::GetComputedKeyframeValuesFor(const nsTArray& aKeyframes, - dom::Element* aElement, - const ServoComputedStyleValues& aServoValues) +ServoStyleSet::GetComputedKeyframeValuesFor( + const nsTArray& aKeyframes, + dom::Element* aElement, + const ServoComputedValuesWithParent& aServoValues) { nsTArray result(aKeyframes.Length()); diff --git a/layout/style/ServoStyleSet.h b/layout/style/ServoStyleSet.h index 509076915c4f..ad438720b877 100644 --- a/layout/style/ServoStyleSet.h +++ b/layout/style/ServoStyleSet.h @@ -28,7 +28,7 @@ class CSSStyleSheet; class ServoRestyleManager; class ServoStyleSheet; struct Keyframe; -struct ServoComputedStyleValues; +struct ServoComputedValuesWithParent; } // namespace mozilla class nsIDocument; class nsStyleContext; @@ -245,7 +245,8 @@ public: nsTArray GetComputedKeyframeValuesFor(const nsTArray& aKeyframes, dom::Element* aElement, - const ServoComputedStyleValues& aServoValues); + const ServoComputedValuesWithParent& + aServoValues); private: already_AddRefed GetContext(already_AddRefed,