Bug 1418867 - Drop pseudo type argument from KeyframeEffectReadOnly::EnsureBaseStyle(). r?birtles
We have the pseudo type in mTarget.
MozReview-Commit-ID: GoXzoavnwpL
--- a/dom/animation/KeyframeEffectReadOnly.cpp
+++ b/dom/animation/KeyframeEffectReadOnly.cpp
@@ -528,27 +528,25 @@ KeyframeEffectReadOnly::EnsureBaseStyles
MOZ_ASSERT(presContext,
"nsPresContext should not be nullptr since this EnsureBaseStyles "
"supposed to be called right after getting computed values with "
"a valid nsPresContext");
RefPtr<ServoStyleContext> baseStyleContext;
for (const AnimationProperty& property : aProperties) {
EnsureBaseStyle(property,
- mTarget->mPseudoType,
presContext,
aComputedValues,
baseStyleContext);
}
}
void
KeyframeEffectReadOnly::EnsureBaseStyle(
const AnimationProperty& aProperty,
- CSSPseudoElementType aPseudoType,
nsPresContext* aPresContext,
const ServoStyleContext* aComputedStyle,
RefPtr<ServoStyleContext>& aBaseStyleContext)
{
bool hasAdditiveValues = false;
for (const AnimationPropertySegment& segment : aProperty.mSegments) {
if (!segment.HasReplaceableValues()) {
@@ -561,17 +559,17 @@ KeyframeEffectReadOnly::EnsureBaseStyle(
return;
}
if (!aBaseStyleContext) {
aBaseStyleContext =
aPresContext->StyleSet()->AsServo()->GetBaseContextForElement(
mTarget->mElement,
aPresContext,
- aPseudoType,
+ mTarget->mPseudoType,
aComputedStyle);
}
RefPtr<RawServoAnimationValue> baseValue =
Servo_ComputedValues_ExtractAnimationValue(aBaseStyleContext,
aProperty.mProperty).Consume();
mBaseStyleValuesForServo.Put(aProperty.mProperty, baseValue);
}
--- a/dom/animation/KeyframeEffectReadOnly.h
+++ b/dom/animation/KeyframeEffectReadOnly.h
@@ -377,17 +377,16 @@ protected:
// base style context will be resolved and stored in
// |aCachedBaseStyleContext|.
void EnsureBaseStyle(nsCSSPropertyID aProperty,
GeckoStyleContext* aStyleContext,
RefPtr<GeckoStyleContext>& aCachedBaseStyleContext);
// Stylo version of the above function that also first checks for an additive
// value in |aProperty|'s list of segments.
void EnsureBaseStyle(const AnimationProperty& aProperty,
- CSSPseudoElementType aPseudoType,
nsPresContext* aPresContext,
const ServoStyleContext* aComputedValues,
RefPtr<mozilla::ServoStyleContext>& aBaseComputedValues);
Maybe<OwningAnimationTarget> mTarget;
KeyframeEffectParams mEffectOptions;