mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Backed out changeset f182a6c18d75 (bug 1279819)
This commit is contained in:
parent
454f9549c2
commit
3743434413
@ -524,34 +524,20 @@ KeyframeEffectReadOnly::UpdateProperties(nsStyleContext* aStyleContext)
|
||||
|
||||
nsTArray<AnimationProperty> properties;
|
||||
if (mTarget) {
|
||||
// When GetComputedKeyframeValues or GetAnimationPropertiesFromKeyframes
|
||||
// calculate computed values from |mKeyframes|, they could possibly
|
||||
// trigger a subsequent restyle in which we rebuild animations. If that
|
||||
// happens case we could find that |mKeyframes| is overwritten while it is
|
||||
// being iterated over. Normally that shouldn't happen, (and we have an
|
||||
// assertion below to detect if it does) but just in case we make a copy of
|
||||
// |mKeyframes| first and iterate over that instead.
|
||||
auto keyframesCopy(mKeyframes);
|
||||
|
||||
nsTArray<ComputedKeyframeValues> computedValues =
|
||||
KeyframeUtils::GetComputedKeyframeValues(keyframesCopy,
|
||||
mTarget->mElement,
|
||||
KeyframeUtils::GetComputedKeyframeValues(mKeyframes, mTarget->mElement,
|
||||
aStyleContext);
|
||||
|
||||
if (mEffectOptions.mSpacingMode == SpacingMode::paced) {
|
||||
KeyframeUtils::ApplySpacing(keyframesCopy, SpacingMode::paced,
|
||||
KeyframeUtils::ApplySpacing(mKeyframes, SpacingMode::paced,
|
||||
mEffectOptions.mPacedProperty,
|
||||
computedValues);
|
||||
}
|
||||
|
||||
properties =
|
||||
KeyframeUtils::GetAnimationPropertiesFromKeyframes(keyframesCopy,
|
||||
KeyframeUtils::GetAnimationPropertiesFromKeyframes(mKeyframes,
|
||||
computedValues,
|
||||
aStyleContext);
|
||||
|
||||
MOZ_ASSERT(keyframesCopy == mKeyframes,
|
||||
"Keyframes should not be modified while we are iterating"
|
||||
" over them");
|
||||
}
|
||||
|
||||
if (mProperties == properties) {
|
||||
|
@ -106,14 +106,6 @@ struct Keyframe
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool operator==(const Keyframe& aOther) const
|
||||
{
|
||||
return mOffset == aOther.mOffset &&
|
||||
mComputedOffset == aOther.mComputedOffset &&
|
||||
mTimingFunction == aOther.mTimingFunction &&
|
||||
mPropertyValues == aOther.mPropertyValues;
|
||||
}
|
||||
|
||||
Maybe<double> mOffset;
|
||||
static MOZ_CONSTEXPR_VAR double kComputedOffsetNotSet = -1.0;
|
||||
double mComputedOffset = kComputedOffsetNotSet;
|
||||
|
Loading…
Reference in New Issue
Block a user