diff --git a/dom/animation/EffectCompositor.cpp b/dom/animation/EffectCompositor.cpp index 5d13f05af0e4..99bf1e706b9d 100644 --- a/dom/animation/EffectCompositor.cpp +++ b/dom/animation/EffectCompositor.cpp @@ -355,7 +355,7 @@ EffectCompositor::PostRestyleForThrottledAnimations() template void -EffectCompositor::UpdateEffectProperties(StyleType&& aStyleType, +EffectCompositor::UpdateEffectProperties(StyleType* aStyleType, Element* aElement, CSSPseudoElementType aPseudoType) { @@ -370,7 +370,7 @@ EffectCompositor::UpdateEffectProperties(StyleType&& aStyleType, effectSet->MarkCascadeNeedsUpdate(); for (KeyframeEffectReadOnly* effect : *effectSet) { - effect->UpdateProperties(Forward(aStyleType)); + effect->UpdateProperties(aStyleType); } } @@ -1239,15 +1239,15 @@ EffectCompositor::AnimationStyleRuleProcessor::SizeOfIncludingThis( template void -EffectCompositor::UpdateEffectProperties&>( - RefPtr& aStyleContext, +EffectCompositor::UpdateEffectProperties( + nsStyleContext* aStyleContext, Element* aElement, CSSPseudoElementType aPseudoType); template void -EffectCompositor::UpdateEffectProperties( - const ServoComputedValuesWithParent& aServoValues, +EffectCompositor::UpdateEffectProperties( + const ServoComputedValues* aServoValues, Element* aElement, CSSPseudoElementType aPseudoType); diff --git a/dom/animation/EffectCompositor.h b/dom/animation/EffectCompositor.h index 816b7c2fcb68..ff35a79b2b88 100644 --- a/dom/animation/EffectCompositor.h +++ b/dom/animation/EffectCompositor.h @@ -121,7 +121,7 @@ public: // animation effects (e.g. em-based endpoints used in keyframe effects) // can be re-resolved to computed values. template - void UpdateEffectProperties(StyleType&& aStyleType, + void UpdateEffectProperties(StyleType* aStyleType, dom::Element* aElement, CSSPseudoElementType aPseudoType); diff --git a/dom/animation/KeyframeEffectReadOnly.cpp b/dom/animation/KeyframeEffectReadOnly.cpp index 9b368d3cdb56..8115c84711f9 100644 --- a/dom/animation/KeyframeEffectReadOnly.cpp +++ b/dom/animation/KeyframeEffectReadOnly.cpp @@ -19,7 +19,6 @@ #include "mozilla/LookAndFeel.h" // For LookAndFeel::GetInt #include "mozilla/KeyframeUtils.h" #include "mozilla/ServoBindings.h" -#include "mozilla/ServoComputedValuesWithParent.h" #include "mozilla/Telemetry.h" #include "mozilla/TypeTraits.h" #include "Layers.h" // For Layer @@ -199,20 +198,20 @@ KeyframeEffectReadOnly::SetKeyframes(nsTArray&& aKeyframes, void KeyframeEffectReadOnly::SetKeyframes( nsTArray&& aKeyframes, - const ServoComputedValuesWithParent& aServoValues) + const ServoComputedValues* aComputedValues) { - DoSetKeyframes(Move(aKeyframes), aServoValues); + DoSetKeyframes(Move(aKeyframes), aComputedValues); } template void KeyframeEffectReadOnly::DoSetKeyframes(nsTArray&& aKeyframes, - StyleType&& aStyle) + StyleType* aStyle) { - static_assert(IsSame::value || - IsSame::value, + static_assert(IsSame::value || + IsSame::value, "StyleType should be nsStyleContext* or " - "const ServoComputedValuesWithParent&"); + "const ServoComputedValues*"); if (KeyframesEqualIgnoringComputedOffsets(aKeyframes, mKeyframes)) { return; @@ -229,10 +228,8 @@ KeyframeEffectReadOnly::DoSetKeyframes(nsTArray&& aKeyframes, nsNodeUtils::AnimationChanged(mAnimation); } - // We need to call UpdateProperties() if the StyleType is - // 'const ServoComputedValuesWithParent&' (i.e. not a pointer) or - // nsStyleContext* is not nullptr. - if (!IsPointer::value || aStyle) { + // We need to call UpdateProperties() if the StyleType is not nullptr. + if (aStyle) { UpdateProperties(aStyle); MaybeUpdateFrameForCompositor(); } @@ -309,28 +306,22 @@ KeyframeEffectReadOnly::UpdateProperties(nsStyleContext* aStyleContext) const ServoComputedValues* currentStyle = aStyleContext->StyleSource().AsServoComputedValues(); - // FIXME: Remove GetParentAllowServo() in Bug 1349004. - const ServoComputedValues* parentStyle = - aStyleContext->GetParentAllowServo() - ? aStyleContext->GetParentAllowServo()->StyleSource().AsServoComputedValues() - : nullptr; - const ServoComputedValuesWithParent servoValues = { currentStyle, parentStyle }; - DoUpdateProperties(servoValues); + DoUpdateProperties(currentStyle); } void KeyframeEffectReadOnly::UpdateProperties( - const ServoComputedValuesWithParent& aServoValues) + const ServoComputedValues* aComputedValues) { - DoUpdateProperties(aServoValues); + DoUpdateProperties(aComputedValues); } template void -KeyframeEffectReadOnly::DoUpdateProperties(StyleType&& aStyle) +KeyframeEffectReadOnly::DoUpdateProperties(StyleType* aStyle) { - MOZ_ASSERT_IF(IsPointer::value, aStyle); + MOZ_ASSERT(aStyle); // Skip updating properties when we are composing style. // FIXME: Bug 1324966. Drop this check once we have a function to get @@ -341,8 +332,7 @@ KeyframeEffectReadOnly::DoUpdateProperties(StyleType&& aStyle) return; } - nsTArray properties = - BuildProperties(Forward(aStyle)); + nsTArray properties = BuildProperties(aStyle); // We need to update base styles even if any properties are not changed at all // since base styles might have been changed due to parent style changes, etc. @@ -511,7 +501,7 @@ KeyframeEffectReadOnly::EnsureBaseStyle( void KeyframeEffectReadOnly::EnsureBaseStyles( - const ServoComputedValuesWithParent& aServoValues, + const ServoComputedValues* aComputedValues, const nsTArray& aProperties) { if (!mTarget) { @@ -936,12 +926,12 @@ KeyframeEffectReadOnly::ConstructKeyframeEffect(const GlobalObject& aGlobal, template nsTArray -KeyframeEffectReadOnly::BuildProperties(StyleType&& aStyle) +KeyframeEffectReadOnly::BuildProperties(StyleType* aStyle) { - static_assert(IsSame::value || - IsSame::value, + static_assert(IsSame::value || + IsSame::value, "StyleType should be nsStyleContext* or " - "const ServoComputedValuesWithParent&"); + "const ServoComputedValues*"); MOZ_ASSERT(aStyle); diff --git a/dom/animation/KeyframeEffectReadOnly.h b/dom/animation/KeyframeEffectReadOnly.h index edf21c862f04..3c04c0ef8fc4 100644 --- a/dom/animation/KeyframeEffectReadOnly.h +++ b/dom/animation/KeyframeEffectReadOnly.h @@ -43,7 +43,6 @@ class AnimValuesStyleRule; enum class CSSPseudoElementType : uint8_t; class ErrorResult; struct AnimationRule; -struct ServoComputedValuesWithParent; struct TimingParams; class EffectSet; @@ -171,7 +170,7 @@ public: void SetKeyframes(nsTArray&& aKeyframes, nsStyleContext* aStyleContext); void SetKeyframes(nsTArray&& aKeyframes, - const ServoComputedValuesWithParent& aServoValues); + const ServoComputedValues* aComputedValues); // Returns true if the effect includes |aProperty| regardless of whether the // property is overridden by !important rule. @@ -200,7 +199,7 @@ public: // |aStyleContext| to resolve specified values. void UpdateProperties(nsStyleContext* aStyleContext); // Servo version of the above function. - void UpdateProperties(const ServoComputedValuesWithParent& aServoValues); + void UpdateProperties(const ServoComputedValues* aComputedValues); // Update various bits of state related to running ComposeStyle(). // We need to update this outside ComposeStyle() because we should avoid @@ -239,8 +238,7 @@ public: // When returning true, |aPerformanceWarning| stores the reason why // we shouldn't run the transform animations. bool ShouldBlockAsyncTransformAnimations( - const nsIFrame* aFrame, - AnimationPerformanceWarning::Type& aPerformanceWarning) const; + const nsIFrame* aFrame, AnimationPerformanceWarning::Type& aPerformanceWarning) const; bool HasGeometricProperties() const; bool AffectsGeometry() const override { @@ -264,8 +262,7 @@ public: // Cumulative change hint on each segment for each property. // This is used for deciding the animation is paint-only. void CalculateCumulativeChangeHint(nsStyleContext* aStyleContext); - void CalculateCumulativeChangeHint( - const ServoComputedValuesWithParent& aServoValues) + void CalculateCumulativeChangeHint(const ServoComputedValues* aComputedValues) { } @@ -324,7 +321,7 @@ protected: // to resolve specified values. This function also applies paced spacing if // needed. template - nsTArray BuildProperties(StyleType&& aStyle); + nsTArray BuildProperties(StyleType* aStyle); // This effect is registered with its target element so long as: // @@ -375,7 +372,7 @@ protected: // Ensure the base styles is available for any properties in |aProperties|. void EnsureBaseStyles(nsStyleContext* aStyleContext, const nsTArray& aProperties); - void EnsureBaseStyles(const ServoComputedValuesWithParent& aServoValues, + void EnsureBaseStyles(const ServoComputedValues* aComputedValues, const nsTArray& aProperties); // If no base style is already stored for |aProperty|, resolves the base style @@ -437,10 +434,10 @@ private: nsChangeHint mCumulativeChangeHint; template - void DoSetKeyframes(nsTArray&& aKeyframes, StyleType&& aStyle); + void DoSetKeyframes(nsTArray&& aKeyframes, StyleType* aStyle); template - void DoUpdateProperties(StyleType&& aStyle); + void DoUpdateProperties(StyleType* aStyle); void ComposeStyleRule(RefPtr& aStyleRule, const AnimationProperty& aProperty, diff --git a/dom/animation/KeyframeUtils.cpp b/dom/animation/KeyframeUtils.cpp index 1833e059ef2d..cb584419319e 100644 --- a/dom/animation/KeyframeUtils.cpp +++ b/dom/animation/KeyframeUtils.cpp @@ -11,7 +11,6 @@ #include "mozilla/RangedArray.h" #include "mozilla/ServoBindings.h" #include "mozilla/ServoBindingTypes.h" -#include "mozilla/ServoComputedValuesWithParent.h" #include "mozilla/StyleAnimationValue.h" #include "mozilla/TimingParams.h" #include "mozilla/dom/BaseKeyframeTypesBinding.h" // For FastBaseKeyframe etc. @@ -597,7 +596,7 @@ KeyframeUtils::ApplyDistributeSpacing(nsTArray& aKeyframes) KeyframeUtils::GetComputedKeyframeValues( const nsTArray& aKeyframes, dom::Element* aElement, - const ServoComputedValuesWithParent& aServoValues) + const ServoComputedValues* aComputedValues) { MOZ_ASSERT(aElement); MOZ_ASSERT(aElement->IsStyledByServo()); @@ -606,7 +605,7 @@ KeyframeUtils::GetComputedKeyframeValues( MOZ_ASSERT(presContext); return presContext->StyleSet()->AsServo() - ->GetComputedKeyframeValuesFor(aKeyframes, aElement, aServoValues); + ->GetComputedKeyframeValuesFor(aKeyframes, aElement, aComputedValues); } /* static */ nsTArray diff --git a/dom/animation/KeyframeUtils.h b/dom/animation/KeyframeUtils.h index b899a34cb058..11f90bb68d95 100644 --- a/dom/animation/KeyframeUtils.h +++ b/dom/animation/KeyframeUtils.h @@ -24,7 +24,6 @@ enum class CSSPseudoElementType : uint8_t; class ErrorResult; struct Keyframe; struct PropertyStyleAnimationValuePair; -struct ServoComputedValuesWithParent; namespace dom { class Element; @@ -89,7 +88,7 @@ public: static nsTArray GetComputedKeyframeValues(const nsTArray& aKeyframes, dom::Element* aElement, - const ServoComputedValuesWithParent& aServoValues); + const ServoComputedValues* aComputedValues); /** * Fills in the mComputedOffset member of each keyframe in the given array @@ -118,7 +117,7 @@ public: SpacingMode aSpacingMode, nsCSSPropertyID aProperty, nsTArray& aComputedValues, - const ServoComputedValuesWithParent& aServoValues) + const ServoComputedValues* aServoValues) { NS_WARNING("stylo: ApplySpacing not implemented yet"); } diff --git a/dom/smil/nsSMILCSSValueType.cpp b/dom/smil/nsSMILCSSValueType.cpp index d3e1380f92b0..d82e8f1795a8 100644 --- a/dom/smil/nsSMILCSSValueType.cpp +++ b/dom/smil/nsSMILCSSValueType.cpp @@ -18,7 +18,6 @@ #include "nsPresContext.h" #include "mozilla/Keyframe.h" // For PropertyValuePair #include "mozilla/ServoBindings.h" -#include "mozilla/ServoComputedValuesWithParent.h" #include "mozilla/StyleAnimationValue.h" // For AnimationValue #include "mozilla/StyleSetHandleInlines.h" #include "mozilla/dom/Element.h" @@ -491,14 +490,6 @@ ValueFromStringHelper(nsCSSPropertyID aPropID, // Get a suitable style context for Servo const ServoComputedValues* currentStyle = aStyleContext->StyleSource().AsServoComputedValues(); - // Bug 1349004: Remove GetParentAllowServo - const ServoComputedValues* parentStyle = - aStyleContext->GetParentAllowServo() - ? aStyleContext->GetParentAllowServo()->StyleSource() - .AsServoComputedValues() - : nullptr; - const ServoComputedValuesWithParent servoStyles = - { currentStyle, parentStyle }; // Compute value PropertyValuePair propValuePair; @@ -508,7 +499,7 @@ ValueFromStringHelper(nsCSSPropertyID aPropID, keyframes.AppendElement()->mPropertyValues.AppendElement(Move(propValuePair)); nsTArray computedValues = aPresContext->StyleSet()->AsServo() - ->GetComputedKeyframeValuesFor(keyframes, aTargetElement, servoStyles); + ->GetComputedKeyframeValuesFor(keyframes, aTargetElement, currentStyle); // Pull out the appropriate value if (computedValues.IsEmpty() || computedValues[0].IsEmpty()) { diff --git a/layout/style/ServoBindings.cpp b/layout/style/ServoBindings.cpp index b6d3cf587309..a61a1372bc69 100644 --- a/layout/style/ServoBindings.cpp +++ b/layout/style/ServoBindings.cpp @@ -56,7 +56,6 @@ #include "mozilla/StyleAnimationValue.h" #include "mozilla/SystemGroup.h" #include "mozilla/ServoMediaList.h" -#include "mozilla/ServoComputedValuesWithParent.h" #include "mozilla/RWLock.h" #include "mozilla/dom/Element.h" #include "mozilla/dom/ElementInlines.h" @@ -557,8 +556,6 @@ Gecko_UpdateAnimations(RawGeckoElementBorrowed aElement, nsIAtom* pseudoTag = PseudoTagAndCorrectElementForAnimation(aElement); if (presContext->IsDynamic() && aElement->IsInComposedDoc()) { - const ServoComputedValuesWithParent servoValues = - { aComputedValues, aParentComputedValues }; CSSPseudoElementType pseudoType = nsCSSPseudoElements::GetPseudoType(pseudoTag, CSSEnabledState::eForAllContent); @@ -566,7 +563,7 @@ Gecko_UpdateAnimations(RawGeckoElementBorrowed aElement, if (aTasks & UpdateAnimationsTasks::CSSAnimations) { presContext->AnimationManager()-> UpdateAnimations(const_cast(aElement), pseudoType, - servoValues); + aComputedValues); } // aComputedValues might be nullptr if the target element is now in a @@ -581,16 +578,14 @@ Gecko_UpdateAnimations(RawGeckoElementBorrowed aElement, if (aTasks & UpdateAnimationsTasks::CSSTransitions) { MOZ_ASSERT(aOldComputedValues); - const ServoComputedValuesWithParent oldServoValues = - { aOldComputedValues, nullptr }; presContext->TransitionManager()-> UpdateTransitions(const_cast(aElement), pseudoType, - oldServoValues, servoValues); + aOldComputedValues, aComputedValues); } if (aTasks & UpdateAnimationsTasks::EffectProperties) { presContext->EffectCompositor()->UpdateEffectProperties( - servoValues, const_cast(aElement), pseudoType); + aComputedValues, const_cast(aElement), pseudoType); } if (aTasks & UpdateAnimationsTasks::CascadeResults) { diff --git a/layout/style/ServoStyleSet.cpp b/layout/style/ServoStyleSet.cpp index 2b30eb98bfbe..b771c078b788 100644 --- a/layout/style/ServoStyleSet.cpp +++ b/layout/style/ServoStyleSet.cpp @@ -14,7 +14,6 @@ #include "mozilla/dom/Element.h" #include "mozilla/dom/ElementInlines.h" #include "mozilla/RestyleManagerInlines.h" -#include "mozilla/ServoComputedValuesWithParent.h" #include "nsCSSAnonBoxes.h" #include "nsCSSPseudoElements.h" #include "nsCSSRuleProcessor.h" @@ -1021,7 +1020,7 @@ nsTArray ServoStyleSet::GetComputedKeyframeValuesFor( const nsTArray& aKeyframes, Element* aElement, - const ServoComputedValuesWithParent& aServoValues) + ServoComputedValuesBorrowed aComputedValues) { nsTArray result(aKeyframes.Length()); @@ -1030,7 +1029,7 @@ ServoStyleSet::GetComputedKeyframeValuesFor( Servo_GetComputedKeyframeValues(&aKeyframes, aElement, - aServoValues.mCurrentStyle, + aComputedValues, mRawSet.get(), &result); return result; diff --git a/layout/style/ServoStyleSet.h b/layout/style/ServoStyleSet.h index b986ebb3e22c..bfe019c92401 100644 --- a/layout/style/ServoStyleSet.h +++ b/layout/style/ServoStyleSet.h @@ -32,7 +32,6 @@ class CSSStyleSheet; class ServoRestyleManager; class ServoStyleSheet; struct Keyframe; -struct ServoComputedValuesWithParent; class ServoElementSnapshotTable; } // namespace mozilla class nsCSSCounterStyleRule; @@ -357,8 +356,7 @@ public: nsTArray GetComputedKeyframeValuesFor(const nsTArray& aKeyframes, dom::Element* aElement, - const ServoComputedValuesWithParent& - aServoValues); + ServoComputedValuesBorrowed aComputedValues); bool AppendFontFaceRules(nsTArray& aArray); diff --git a/layout/style/nsAnimationManager.cpp b/layout/style/nsAnimationManager.cpp index 995ce265c763..d31e99a8e58e 100644 --- a/layout/style/nsAnimationManager.cpp +++ b/layout/style/nsAnimationManager.cpp @@ -11,7 +11,6 @@ #include "mozilla/EffectCompositor.h" #include "mozilla/EffectSet.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/ServoComputedValuesWithParent.h" #include "mozilla/ServoStyleSet.h" #include "mozilla/StyleAnimationValue.h" #include "mozilla/dom/DocumentTimeline.h" @@ -405,11 +404,8 @@ ResolvedStyleCache::Get(nsPresContext *aPresContext, class MOZ_STACK_CLASS ServoCSSAnimationBuilder final { public: - ServoCSSAnimationBuilder( - const ServoComputedValues* aComputedValues, - const ServoComputedValues* aParentComputedValues) + explicit ServoCSSAnimationBuilder(const ServoComputedValues* aComputedValues) : mComputedValues(aComputedValues) - , mParentComputedValues(aParentComputedValues) { MOZ_ASSERT(aComputedValues); } @@ -429,13 +425,11 @@ public: void SetKeyframes(KeyframeEffectReadOnly& aEffect, nsTArray&& aKeyframes) { - aEffect.SetKeyframes(Move(aKeyframes), - { mComputedValues, mParentComputedValues }); + aEffect.SetKeyframes(Move(aKeyframes), mComputedValues); } private: const ServoComputedValues* mComputedValues; - const ServoComputedValues* mParentComputedValues; }; class MOZ_STACK_CLASS GeckoCSSAnimationBuilder final { @@ -1023,7 +1017,7 @@ void nsAnimationManager::UpdateAnimations( dom::Element* aElement, CSSPseudoElementType aPseudoType, - const ServoComputedValuesWithParent& aServoValues) + const ServoComputedValues* aComputedValues) { MOZ_ASSERT(mPresContext->IsDynamic(), "Should not update animations for print or print preview"); @@ -1031,7 +1025,7 @@ nsAnimationManager::UpdateAnimations( "Should not update animations that are not attached to the " "document tree"); - if (!aServoValues.mCurrentStyle) { + if (!aComputedValues) { // If we are in a display:none subtree we will have no computed values. // Since CSS animations should not run in display:none subtrees we should // stop (actually, destroy) any animations on this element here. @@ -1040,11 +1034,10 @@ nsAnimationManager::UpdateAnimations( } NonOwningAnimationTarget target(aElement, aPseudoType); - ServoCSSAnimationBuilder builder(aServoValues.mCurrentStyle, - aServoValues.mParentStyle); + ServoCSSAnimationBuilder builder(aComputedValues); const nsStyleDisplay *disp = - Servo_GetStyleDisplay(aServoValues.mCurrentStyle); + Servo_GetStyleDisplay(aComputedValues); DoUpdateAnimations(target, *disp, builder); } diff --git a/layout/style/nsAnimationManager.h b/layout/style/nsAnimationManager.h index 7439df6755c2..a215d706dde2 100644 --- a/layout/style/nsAnimationManager.h +++ b/layout/style/nsAnimationManager.h @@ -20,7 +20,6 @@ struct nsStyleDisplay; struct ServoComputedValues; namespace mozilla { -struct ServoComputedValuesWithParent; namespace css { class Declaration; } /* namespace css */ @@ -332,7 +331,7 @@ public: void UpdateAnimations( mozilla::dom::Element* aElement, mozilla::CSSPseudoElementType aPseudoType, - const mozilla::ServoComputedValuesWithParent& aServoValues); + const ServoComputedValues* aComputedValues); /** * Add a pending event. diff --git a/layout/style/nsStyleSet.cpp b/layout/style/nsStyleSet.cpp index 05b2eb13f8b7..ee01b20019fd 100644 --- a/layout/style/nsStyleSet.cpp +++ b/layout/style/nsStyleSet.cpp @@ -972,7 +972,7 @@ nsStyleSet::GetContext(nsStyleContext* aParentContext, PresContext()->AnimationManager()->UpdateAnimations(result, aElementForAnimation); PresContext()->EffectCompositor()->UpdateEffectProperties( - result, aElementForAnimation, result->GetPseudoType()); + result.get(), aElementForAnimation, result->GetPseudoType()); animRule = PresContext()->EffectCompositor()-> GetAnimationRule(aElementForAnimation, diff --git a/layout/style/nsTransitionManager.cpp b/layout/style/nsTransitionManager.cpp index 8c6af4b658e1..751755106414 100644 --- a/layout/style/nsTransitionManager.cpp +++ b/layout/style/nsTransitionManager.cpp @@ -23,7 +23,6 @@ #include "mozilla/EffectSet.h" #include "mozilla/EventDispatcher.h" #include "mozilla/ServoBindings.h" -#include "mozilla/ServoComputedValuesWithParent.h" #include "mozilla/StyleAnimationValue.h" #include "mozilla/dom/DocumentTimeline.h" #include "mozilla/dom/Element.h" @@ -446,8 +445,7 @@ ExtractNonDiscreteComputedValue(nsCSSPropertyID aProperty, static inline bool ExtractNonDiscreteComputedValue(nsCSSPropertyID aProperty, - const ServoComputedValuesWithParent& - aComputedStyle, + const ServoComputedValues* aComputedStyle, AnimationValue& aAnimationValue) { if (Servo_Property_IsDiscreteAnimatable(aProperty) && @@ -456,7 +454,7 @@ ExtractNonDiscreteComputedValue(nsCSSPropertyID aProperty, } aAnimationValue.mServo = - Servo_ComputedValues_ExtractAnimationValue(aComputedStyle.mCurrentStyle, + Servo_ComputedValues_ExtractAnimationValue(aComputedStyle, aProperty).Consume(); return !!aAnimationValue.mServo; } @@ -626,8 +624,8 @@ bool nsTransitionManager::UpdateTransitions( dom::Element *aElement, CSSPseudoElementType aPseudoType, - const ServoComputedValuesWithParent& aOldStyle, - const ServoComputedValuesWithParent& aNewStyle) + const ServoComputedValues* aOldStyle, + const ServoComputedValues* aNewStyle) { if (!mPresContext->IsDynamic()) { // For print or print preview, ignore transitions. @@ -636,7 +634,7 @@ nsTransitionManager::UpdateTransitions( CSSTransitionCollection* collection = CSSTransitionCollection::GetAnimationCollection(aElement, aPseudoType); - const nsStyleDisplay *disp = Servo_GetStyleDisplay(aNewStyle.mCurrentStyle); + const nsStyleDisplay *disp = Servo_GetStyleDisplay(aNewStyle); return DoUpdateTransitions(disp, aElement, aPseudoType, collection, diff --git a/layout/style/nsTransitionManager.h b/layout/style/nsTransitionManager.h index 72a4ab0876f4..737de768ae76 100644 --- a/layout/style/nsTransitionManager.h +++ b/layout/style/nsTransitionManager.h @@ -25,7 +25,6 @@ class nsCSSPropertyIDSet; namespace mozilla { enum class CSSPseudoElementType : uint8_t; struct Keyframe; -struct ServoComputedValuesWithParent; struct StyleTransition; } // namespace mozilla @@ -378,8 +377,8 @@ public: bool UpdateTransitions( mozilla::dom::Element *aElement, mozilla::CSSPseudoElementType aPseudoType, - const mozilla::ServoComputedValuesWithParent& aOldStyle, - const mozilla::ServoComputedValuesWithParent& aNewStyle); + const ServoComputedValues* aOldStyle, + const ServoComputedValues* aNewStyle); /** * When we're resolving style for an element that previously didn't have