Backed out changeset f182a6c18d75 (bug 1279819)

This commit is contained in:
Brian Birtles 2016-07-06 09:09:55 +09:00
parent 454f9549c2
commit 3743434413
2 changed files with 3 additions and 25 deletions

View File

@ -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) {

View File

@ -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;