Bug 1338927 - Part 1: Drop nsStyleContext argument from KeyframeUtils::GetAnimationPropertiesFromKeyframes. r?birtles
It's not used at all.
MozReview-Commit-ID: 2vAmlDhp12G
--- a/dom/animation/KeyframeEffectReadOnly.cpp
+++ b/dom/animation/KeyframeEffectReadOnly.cpp
@@ -882,20 +882,20 @@ KeyframeEffectReadOnly::BuildProperties(
if (mEffectOptions.mSpacingMode == SpacingMode::paced &&
aStyleContext->PresContext()->StyleSet()->IsGecko()) {
KeyframeUtils::ApplySpacing(keyframesCopy, SpacingMode::paced,
mEffectOptions.mPacedProperty,
computedValues, aStyleContext);
}
result =
- KeyframeUtils::GetAnimationPropertiesFromKeyframes(keyframesCopy,
- computedValues,
- mEffectOptions.mComposite,
- aStyleContext);
+ KeyframeUtils::GetAnimationPropertiesFromKeyframes(
+ keyframesCopy,
+ computedValues,
+ mEffectOptions.mComposite);
#ifdef DEBUG
MOZ_ASSERT(SpecifiedKeyframeArraysAreEqual(mKeyframes, keyframesCopy),
"Apart from the computed offset members, the keyframes array"
" should not be modified");
#endif
mKeyframes.SwapElements(keyframesCopy);
--- a/dom/animation/KeyframeUtils.cpp
+++ b/dom/animation/KeyframeUtils.cpp
@@ -690,18 +690,17 @@ KeyframeUtils::GetComputedKeyframeValues
MOZ_ASSERT(result.Length() == aKeyframes.Length(), "Array length mismatch");
return result;
}
/* static */ nsTArray<AnimationProperty>
KeyframeUtils::GetAnimationPropertiesFromKeyframes(
const nsTArray<Keyframe>& aKeyframes,
const nsTArray<ComputedKeyframeValues>& aComputedValues,
- dom::CompositeOperation aEffectComposite,
- nsStyleContext* aStyleContext)
+ dom::CompositeOperation aEffectComposite)
{
MOZ_ASSERT(aKeyframes.Length() == aComputedValues.Length(),
"Array length mismatch");
nsTArray<KeyframeValueEntry> entries(aKeyframes.Length());
const size_t len = aKeyframes.Length();
for (size_t i = 0; i < len; ++i) {
--- a/dom/animation/KeyframeUtils.h
+++ b/dom/animation/KeyframeUtils.h
@@ -125,25 +125,23 @@ public:
* GetComputedKeyframeValues) used to fill in the individual
* AnimationPropertySegment objects. Although these values could be
* calculated from |aKeyframes|, passing them in as a separate parameter
* allows the result of GetComputedKeyframeValues to be re-used both
* here and in ApplySpacing.
* @param aEffectComposite The composite operation specified on the effect.
* For any keyframes in |aKeyframes| that do not specify a composite
* operation, this value will be used.
- * @param aStyleContext The style context to calculate the style difference.
* @return The set of animation properties. If an error occurs, the returned
* array will be empty.
*/
static nsTArray<AnimationProperty> GetAnimationPropertiesFromKeyframes(
const nsTArray<Keyframe>& aKeyframes,
const nsTArray<ComputedKeyframeValues>& aComputedValues,
- dom::CompositeOperation aEffectComposite,
- nsStyleContext* aStyleContext);
+ dom::CompositeOperation aEffectComposite);
/**
* Check if the property or, for shorthands, one or more of
* its subproperties, is animatable.
*
* @param aProperty The property to check.
* @return true if |aProperty| is animatable.
*/