| Index: Source/core/animation/KeyframeEffectModelTest.cpp
|
| diff --git a/Source/core/animation/KeyframeEffectModelTest.cpp b/Source/core/animation/KeyframeEffectModelTest.cpp
|
| index c0ebfa9890cbf7ef0be0657b472182d7bc9c69d0..e6e170c32f54fa15ebc3b2d86f283f9262119ee7 100644
|
| --- a/Source/core/animation/KeyframeEffectModelTest.cpp
|
| +++ b/Source/core/animation/KeyframeEffectModelTest.cpp
|
| @@ -87,7 +87,7 @@ void expectDoubleValue(double expectedValue, PassRefPtrWillBeRawPtr<Interpolatio
|
| EXPECT_FLOAT_EQ(static_cast<float>(expectedValue), actualValue);
|
| }
|
|
|
| -Interpolation* findValue(WillBeHeapVector<RefPtrWillBeMember<Interpolation> >& values, CSSPropertyID id)
|
| +Interpolation* findValue(WillBeHeapVector<RefPtrWillBeMember<Interpolation>>& values, CSSPropertyID id)
|
| {
|
| for (auto& value : values) {
|
| if (toLegacyStyleInterpolation(value.get())->id() == id)
|
| @@ -101,7 +101,7 @@ TEST(AnimationKeyframeEffectModel, BasicOperation)
|
| {
|
| AnimatableValueKeyframeVector keyframes = keyframesAtZeroAndOne(unknownAnimatableValue(3.0), unknownAnimatableValue(5.0));
|
| RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableValueKeyframeEffectModel::create(keyframes);
|
| - OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > values = nullptr;
|
| + OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> values = nullptr;
|
| effect->sample(0, 0.6, duration, values);
|
| ASSERT_EQ(1UL, values->size());
|
| expectProperty(CSSPropertyLeft, values->at(0));
|
| @@ -114,7 +114,7 @@ TEST(AnimationKeyframeEffectModel, CompositeReplaceNonInterpolable)
|
| keyframes[0]->setComposite(AnimationEffect::CompositeReplace);
|
| keyframes[1]->setComposite(AnimationEffect::CompositeReplace);
|
| RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableValueKeyframeEffectModel::create(keyframes);
|
| - OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > values = nullptr;
|
| + OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> values = nullptr;
|
| effect->sample(0, 0.6, duration, values);
|
| expectDoubleValue(5.0, values->at(0));
|
| }
|
| @@ -125,7 +125,7 @@ TEST(AnimationKeyframeEffectModel, CompositeReplace)
|
| keyframes[0]->setComposite(AnimationEffect::CompositeReplace);
|
| keyframes[1]->setComposite(AnimationEffect::CompositeReplace);
|
| RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableValueKeyframeEffectModel::create(keyframes);
|
| - OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > values = nullptr;
|
| + OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> values = nullptr;
|
| effect->sample(0, 0.6, duration, values);
|
| expectDoubleValue(3.0 * 0.4 + 5.0 * 0.6, values->at(0));
|
| }
|
| @@ -137,7 +137,7 @@ TEST(AnimationKeyframeEffectModel, DISABLED_CompositeAdd)
|
| keyframes[0]->setComposite(AnimationEffect::CompositeAdd);
|
| keyframes[1]->setComposite(AnimationEffect::CompositeAdd);
|
| RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableValueKeyframeEffectModel::create(keyframes);
|
| - OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > values = nullptr;
|
| + OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> values = nullptr;
|
| effect->sample(0, 0.6, duration, values);
|
| expectDoubleValue((7.0 + 3.0) * 0.4 + (7.0 + 5.0) * 0.6, values->at(0));
|
| }
|
| @@ -149,7 +149,7 @@ TEST(AnimationKeyframeEffectModel, CompositeEaseIn)
|
| keyframes[0]->setEasing(CubicBezierTimingFunction::preset(CubicBezierTimingFunction::EaseIn));
|
| keyframes[1]->setComposite(AnimationEffect::CompositeReplace);
|
| RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableValueKeyframeEffectModel::create(keyframes);
|
| - OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > values = nullptr;
|
| + OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> values = nullptr;
|
| effect->sample(0, 0.6, duration, values);
|
| expectDoubleValue(3.8579516, values->at(0));
|
| effect->sample(0, 0.6, duration * 100, values);
|
| @@ -163,7 +163,7 @@ TEST(AnimationKeyframeEffectModel, CompositeCubicBezier)
|
| keyframes[0]->setEasing(CubicBezierTimingFunction::create(0.42, 0, 0.58, 1));
|
| keyframes[1]->setComposite(AnimationEffect::CompositeReplace);
|
| RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableValueKeyframeEffectModel::create(keyframes);
|
| - OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > values = nullptr;
|
| + OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> values = nullptr;
|
| effect->sample(0, 0.6, duration, values);
|
| expectDoubleValue(4.3363357, values->at(0));
|
| effect->sample(0, 0.6, duration * 1000, values);
|
| @@ -176,7 +176,7 @@ TEST(AnimationKeyframeEffectModel, ExtrapolateReplaceNonInterpolable)
|
| keyframes[0]->setComposite(AnimationEffect::CompositeReplace);
|
| keyframes[1]->setComposite(AnimationEffect::CompositeReplace);
|
| RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableValueKeyframeEffectModel::create(keyframes);
|
| - OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > values = nullptr;
|
| + OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> values = nullptr;
|
| effect->sample(0, 1.6, duration, values);
|
| expectDoubleValue(5.0, values->at(0));
|
| }
|
| @@ -187,7 +187,7 @@ TEST(AnimationKeyframeEffectModel, ExtrapolateReplace)
|
| RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableValueKeyframeEffectModel::create(keyframes);
|
| keyframes[0]->setComposite(AnimationEffect::CompositeReplace);
|
| keyframes[1]->setComposite(AnimationEffect::CompositeReplace);
|
| - OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > values = nullptr;
|
| + OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> values = nullptr;
|
| effect->sample(0, 1.6, duration, values);
|
| expectDoubleValue(3.0 * -0.6 + 5.0 * 1.6, values->at(0));
|
| }
|
| @@ -199,7 +199,7 @@ TEST(AnimationKeyframeEffectModel, DISABLED_ExtrapolateAdd)
|
| keyframes[0]->setComposite(AnimationEffect::CompositeAdd);
|
| keyframes[1]->setComposite(AnimationEffect::CompositeAdd);
|
| RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableValueKeyframeEffectModel::create(keyframes);
|
| - OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > values = nullptr;
|
| + OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> values = nullptr;
|
| effect->sample(0, 1.6, duration, values);
|
| expectDoubleValue((7.0 + 3.0) * -0.6 + (7.0 + 5.0) * 1.6, values->at(0));
|
| }
|
| @@ -207,7 +207,7 @@ TEST(AnimationKeyframeEffectModel, DISABLED_ExtrapolateAdd)
|
| TEST(AnimationKeyframeEffectModel, ZeroKeyframes)
|
| {
|
| RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableValueKeyframeEffectModel::create(AnimatableValueKeyframeVector());
|
| - OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > values = nullptr;
|
| + OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> values = nullptr;
|
| effect->sample(0, 0.5, duration, values);
|
| EXPECT_TRUE(values->isEmpty());
|
| }
|
| @@ -221,7 +221,7 @@ TEST(AnimationKeyframeEffectModel, DISABLED_SingleKeyframeAtOffsetZero)
|
| keyframes[0]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(3.0).get());
|
|
|
| RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableValueKeyframeEffectModel::create(keyframes);
|
| - OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > values = nullptr;
|
| + OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> values = nullptr;
|
| effect->sample(0, 0.6, duration, values);
|
| expectDoubleValue(3.0, values->at(0));
|
| }
|
| @@ -235,7 +235,7 @@ TEST(AnimationKeyframeEffectModel, DISABLED_SingleKeyframeAtOffsetOne)
|
| keyframes[0]->setPropertyValue(CSSPropertyLeft, pixelAnimatableValue(5.0).get());
|
|
|
| RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableValueKeyframeEffectModel::create(keyframes);
|
| - OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > values = nullptr;
|
| + OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> values = nullptr;
|
| effect->sample(0, 0.6, duration, values);
|
| expectDoubleValue(7.0 * 0.4 + 5.0 * 0.6, values->at(0));
|
| }
|
| @@ -254,7 +254,7 @@ TEST(AnimationKeyframeEffectModel, MoreThanTwoKeyframes)
|
| keyframes[2]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(5.0).get());
|
|
|
| RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableValueKeyframeEffectModel::create(keyframes);
|
| - OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > values = nullptr;
|
| + OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> values = nullptr;
|
| effect->sample(0, 0.3, duration, values);
|
| expectDoubleValue(4.0, values->at(0));
|
| effect->sample(0, 0.8, duration, values);
|
| @@ -273,7 +273,7 @@ TEST(AnimationKeyframeEffectModel, EndKeyframeOffsetsUnspecified)
|
| keyframes[2]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(5.0).get());
|
|
|
| RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableValueKeyframeEffectModel::create(keyframes);
|
| - OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > values = nullptr;
|
| + OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> values = nullptr;
|
| effect->sample(0, 0.1, duration, values);
|
| expectDoubleValue(3.0, values->at(0));
|
| effect->sample(0, 0.6, duration, values);
|
| @@ -296,7 +296,7 @@ TEST(AnimationKeyframeEffectModel, SampleOnKeyframe)
|
| keyframes[2]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(5.0).get());
|
|
|
| RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableValueKeyframeEffectModel::create(keyframes);
|
| - OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > values = nullptr;
|
| + OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> values = nullptr;
|
| effect->sample(0, 0.0, duration, values);
|
| expectDoubleValue(3.0, values->at(0));
|
| effect->sample(0, 0.5, duration, values);
|
| @@ -337,7 +337,7 @@ TEST(AnimationKeyframeEffectModel, MultipleKeyframesWithSameOffset)
|
| keyframes[8]->setPropertyValue(CSSPropertyLeft, unknownAnimatableValue(7.0).get());
|
|
|
| RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableValueKeyframeEffectModel::create(keyframes);
|
| - OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > values = nullptr;
|
| + OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> values = nullptr;
|
| effect->sample(0, 0.0, duration, values);
|
| expectDoubleValue(0.0, values->at(0));
|
| effect->sample(0, 0.2, duration, values);
|
| @@ -367,7 +367,7 @@ TEST(AnimationKeyframeEffectModel, DISABLED_PerKeyframeComposite)
|
| keyframes[1]->setComposite(AnimationEffect::CompositeAdd);
|
|
|
| RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableValueKeyframeEffectModel::create(keyframes);
|
| - OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > values = nullptr;
|
| + OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> values = nullptr;
|
| effect->sample(0, 0.6, duration, values);
|
| expectDoubleValue(3.0 * 0.4 + (7.0 + 5.0) * 0.6, values->at(0));
|
| }
|
| @@ -385,7 +385,7 @@ TEST(AnimationKeyframeEffectModel, MultipleProperties)
|
| keyframes[1]->setPropertyValue(CSSPropertyRight, unknownAnimatableValue(6.0).get());
|
|
|
| RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableValueKeyframeEffectModel::create(keyframes);
|
| - OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > values = nullptr;
|
| + OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> values = nullptr;
|
| effect->sample(0, 0.6, duration, values);
|
| EXPECT_EQ(2UL, values->size());
|
| Interpolation* leftValue = findValue(*values.get(), CSSPropertyLeft);
|
| @@ -403,7 +403,7 @@ TEST(AnimationKeyframeEffectModel, DISABLED_RecompositeCompositableValue)
|
| keyframes[0]->setComposite(AnimationEffect::CompositeAdd);
|
| keyframes[1]->setComposite(AnimationEffect::CompositeAdd);
|
| RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableValueKeyframeEffectModel::create(keyframes);
|
| - OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > values = nullptr;
|
| + OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> values = nullptr;
|
| effect->sample(0, 0.6, duration, values);
|
| expectDoubleValue((7.0 + 3.0) * 0.4 + (7.0 + 5.0) * 0.6, values->at(0));
|
| expectDoubleValue((9.0 + 3.0) * 0.4 + (9.0 + 5.0) * 0.6, values->at(0));
|
| @@ -413,7 +413,7 @@ TEST(AnimationKeyframeEffectModel, MultipleIterations)
|
| {
|
| AnimatableValueKeyframeVector keyframes = keyframesAtZeroAndOne(pixelAnimatableValue(1.0), pixelAnimatableValue(3.0));
|
| RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableValueKeyframeEffectModel::create(keyframes);
|
| - OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > values = nullptr;
|
| + OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> values = nullptr;
|
| effect->sample(0, 0.5, duration, values);
|
| expectDoubleValue(2.0, values->at(0));
|
| effect->sample(1, 0.5, duration, values);
|
| @@ -438,7 +438,7 @@ TEST(AnimationKeyframeEffectModel, DISABLED_DependsOnUnderlyingValue)
|
| keyframes[2]->setPropertyValue(CSSPropertyLeft, pixelAnimatableValue(1.0).get());
|
|
|
| RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableValueKeyframeEffectModel::create(keyframes);
|
| - OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > values = nullptr;
|
| + OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> values = nullptr;
|
| effect->sample(0, 0, duration, values);
|
| EXPECT_TRUE(values->at(0));
|
| effect->sample(0, 0.1, duration, values);
|
|
|