X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2FWebKit%2FSource%2Fcore%2Fanimation%2FCompositorAnimationsTest.cpp;h=ad88c3522612d61c71ca306f76632c916a113eff;hb=004985e17e624662a4c85c76a7654039dc83f028;hp=824b187ab0a4594385290869c2808939491cbd51;hpb=2f108dbacb161091e42a3479f4e171339b7e7623;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/WebKit/Source/core/animation/CompositorAnimationsTest.cpp b/src/third_party/WebKit/Source/core/animation/CompositorAnimationsTest.cpp index 824b187..ad88c35 100644 --- a/src/third_party/WebKit/Source/core/animation/CompositorAnimationsTest.cpp +++ b/src/third_party/WebKit/Source/core/animation/CompositorAnimationsTest.cpp @@ -69,16 +69,16 @@ protected: Timing m_timing; CompositorAnimationsImpl::CompositorTiming m_compositorTiming; - OwnPtrWillBePersistent m_keyframeVector2; - RefPtrWillBePersistent m_keyframeAnimationEffect2; - OwnPtrWillBePersistent m_keyframeVector5; - RefPtrWillBePersistent m_keyframeAnimationEffect5; + OwnPtrWillBePersistent m_keyframeVector2; + RefPtrWillBePersistent m_keyframeAnimationEffect2; + OwnPtrWillBePersistent m_keyframeVector5; + RefPtrWillBePersistent m_keyframeAnimationEffect5; virtual void SetUp() { AnimationCompositorAnimationsTestBase::SetUp(); - m_linearTimingFunction = LinearTimingFunction::preset(); + m_linearTimingFunction = LinearTimingFunction::shared(); m_cubicEaseTimingFunction = CubicBezierTimingFunction::preset(CubicBezierTimingFunction::Ease); m_cubicCustomTimingFunction = CubicBezierTimingFunction::create(1, 2, 3, 4); m_stepTimingFunction = StepsTimingFunction::create(1, StepsTimingFunction::StepAtEnd); @@ -90,10 +90,10 @@ protected: ASSERT(convertTimingForCompositor(m_timing, m_compositorTiming)); m_keyframeVector2 = createCompositableFloatKeyframeVector(2); - m_keyframeAnimationEffect2 = KeyframeEffectModel::create(*m_keyframeVector2.get()); + m_keyframeAnimationEffect2 = AnimatableValueKeyframeEffectModel::create(*m_keyframeVector2); m_keyframeVector5 = createCompositableFloatKeyframeVector(5); - m_keyframeAnimationEffect5 = KeyframeEffectModel::create(*m_keyframeVector5.get()); + m_keyframeAnimationEffect5 = AnimatableValueKeyframeEffectModel::create(*m_keyframeVector5); } public: @@ -106,19 +106,20 @@ public: { return CompositorAnimations::instance()->isCandidateForAnimationOnCompositor(timing, effect); } - void getAnimationOnCompositor(Timing& timing, KeyframeEffectModel& effect, Vector >& animations) + void getAnimationOnCompositor(Timing& timing, AnimatableValueKeyframeEffectModel& effect, Vector >& animations) { - return CompositorAnimationsImpl::getAnimationOnCompositor(timing, effect, animations); + return CompositorAnimationsImpl::getAnimationOnCompositor(timing, std::numeric_limits::quiet_NaN(), effect, animations); } - bool isCandidateHelperForSingleKeyframe(Keyframe* frame) + bool duplicateSingleKeyframeAndTestIsCandidateOnResult(AnimatableValueKeyframe* frame) { EXPECT_EQ(frame->offset(), 0); - KeyframeEffectModel::KeyframeVector frames; + AnimatableValueKeyframeVector frames; + RefPtrWillBeRawPtr second = frame->cloneWithOffset(1); + frames.append(frame); - EXPECT_EQ((*m_keyframeVector2)[1]->offset(), 1.0); - frames.append((*m_keyframeVector2)[1]); - return isCandidateForAnimationOnCompositor(m_timing, *KeyframeEffectModel::create(frames).get()); + frames.append(toAnimatableValueKeyframe(second.get())); + return isCandidateForAnimationOnCompositor(m_timing, *AnimatableValueKeyframeEffectModel::create(frames).get()); } // ------------------------------------------------------------------- @@ -138,30 +139,30 @@ public: return timing; } - PassRefPtrWillBeRawPtr createReplaceOpKeyframe(CSSPropertyID id, AnimatableValue* value, double offset = 0) + PassRefPtrWillBeRawPtr createReplaceOpKeyframe(CSSPropertyID id, AnimatableValue* value, double offset = 0) { - RefPtrWillBeRawPtr keyframe = Keyframe::create(); + RefPtrWillBeRawPtr keyframe = AnimatableValueKeyframe::create(); keyframe->setPropertyValue(id, value); keyframe->setComposite(AnimationEffect::CompositeReplace); keyframe->setOffset(offset); - keyframe->setEasing(LinearTimingFunction::preset()); + keyframe->setEasing(LinearTimingFunction::shared()); return keyframe; } - PassRefPtrWillBeRawPtr createDefaultKeyframe(CSSPropertyID id, AnimationEffect::CompositeOperation op, double offset = 0) + PassRefPtrWillBeRawPtr createDefaultKeyframe(CSSPropertyID id, AnimationEffect::CompositeOperation op, double offset = 0) { RefPtrWillBeRawPtr value = nullptr; - if (id == CSSPropertyWebkitTransform) + if (id == CSSPropertyTransform) value = AnimatableTransform::create(TransformOperations()); else value = AnimatableDouble::create(10.0); - RefPtrWillBeRawPtr keyframe = createReplaceOpKeyframe(id, value.get(), offset); + RefPtrWillBeRawPtr keyframe = createReplaceOpKeyframe(id, value.get(), offset); keyframe->setComposite(op); return keyframe; } - PassOwnPtrWillBeRawPtr createCompositableFloatKeyframeVector(size_t n) + PassOwnPtrWillBeRawPtr createCompositableFloatKeyframeVector(size_t n) { Vector values; for (size_t i = 0; i < n; i++) { @@ -170,9 +171,9 @@ public: return createCompositableFloatKeyframeVector(values); } - PassOwnPtrWillBeRawPtr createCompositableFloatKeyframeVector(Vector& values) + PassOwnPtrWillBeRawPtr createCompositableFloatKeyframeVector(Vector& values) { - OwnPtrWillBeRawPtr frames = adoptPtrWillBeNoop(new KeyframeEffectModel::KeyframeVector); + OwnPtrWillBeRawPtr frames = adoptPtrWillBeNoop(new AnimatableValueKeyframeVector); for (size_t i = 0; i < values.size(); i++) { double offset = 1.0 / (values.size() - 1) * i; RefPtrWillBeRawPtr value = AnimatableDouble::create(values[i]); @@ -181,15 +182,15 @@ public: return frames.release(); } - PassRefPtrWillBeRawPtr createKeyframeEffectModel(PassRefPtrWillBeRawPtr prpFrom, PassRefPtrWillBeRawPtr prpTo, PassRefPtrWillBeRawPtr prpC = nullptr, PassRefPtrWillBeRawPtr prpD = nullptr) + PassRefPtrWillBeRawPtr createKeyframeEffectModel(PassRefPtrWillBeRawPtr prpFrom, PassRefPtrWillBeRawPtr prpTo, PassRefPtrWillBeRawPtr prpC = nullptr, PassRefPtrWillBeRawPtr prpD = nullptr) { - RefPtrWillBeRawPtr from = prpFrom; - RefPtrWillBeRawPtr to = prpTo; - RefPtrWillBeRawPtr c = prpC; - RefPtrWillBeRawPtr d = prpD; + RefPtrWillBeRawPtr from = prpFrom; + RefPtrWillBeRawPtr to = prpTo; + RefPtrWillBeRawPtr c = prpC; + RefPtrWillBeRawPtr d = prpD; EXPECT_EQ(from->offset(), 0); - KeyframeEffectModel::KeyframeVector frames; + AnimatableValueKeyframeVector frames; frames.append(from); EXPECT_LE(from->offset(), to->offset()); frames.append(to); @@ -205,7 +206,7 @@ public: EXPECT_EQ(to->offset(), 1.0); } if (!HasFatalFailure()) { - return KeyframeEffectModel::create(frames); + return AnimatableValueKeyframeEffectModel::create(frames); } return nullptr; } @@ -217,66 +218,57 @@ public: TEST_F(AnimationCompositorAnimationsTest, isCandidateForAnimationOnCompositorKeyframeMultipleCSSProperties) { - RefPtrWillBeRawPtr keyframeGoodMultiple = createDefaultKeyframe(CSSPropertyOpacity, AnimationEffect::CompositeReplace); - keyframeGoodMultiple->setPropertyValue(CSSPropertyWebkitTransform, AnimatableTransform::create(TransformOperations()).get()); - EXPECT_TRUE(isCandidateHelperForSingleKeyframe(keyframeGoodMultiple.get())); - - RefPtrWillBeRawPtr keyframeBadMultipleOp = createDefaultKeyframe(CSSPropertyOpacity, AnimationEffect::CompositeAdd); - keyframeBadMultipleOp->setPropertyValue(CSSPropertyWebkitTransform, AnimatableDouble::create(10.0).get()); - EXPECT_FALSE(isCandidateHelperForSingleKeyframe(keyframeBadMultipleOp.get())); + RefPtrWillBeRawPtr keyframeGoodMultiple = createDefaultKeyframe(CSSPropertyOpacity, AnimationEffect::CompositeReplace); + keyframeGoodMultiple->setPropertyValue(CSSPropertyTransform, AnimatableTransform::create(TransformOperations()).get()); + EXPECT_TRUE(duplicateSingleKeyframeAndTestIsCandidateOnResult(keyframeGoodMultiple.get())); - RefPtrWillBeRawPtr keyframeBadMultipleID = createDefaultKeyframe(CSSPropertyColor, AnimationEffect::CompositeReplace); + RefPtrWillBeRawPtr keyframeBadMultipleID = createDefaultKeyframe(CSSPropertyColor, AnimationEffect::CompositeReplace); keyframeBadMultipleID->setPropertyValue(CSSPropertyOpacity, AnimatableDouble::create(10.0).get()); - EXPECT_FALSE(isCandidateHelperForSingleKeyframe(keyframeBadMultipleID.get())); + EXPECT_FALSE(duplicateSingleKeyframeAndTestIsCandidateOnResult(keyframeBadMultipleID.get())); } TEST_F(AnimationCompositorAnimationsTest, isNotCandidateForCompositorAnimationTransformDependsOnBoxSize) { TransformOperations ops; ops.operations().append(TranslateTransformOperation::create(Length(2, WebCore::Fixed), Length(2, WebCore::Fixed), TransformOperation::TranslateX)); - RefPtrWillBeRawPtr goodKeyframe = createReplaceOpKeyframe(CSSPropertyWebkitTransform, AnimatableTransform::create(ops).get()); - EXPECT_TRUE(isCandidateHelperForSingleKeyframe(goodKeyframe.get())); + RefPtrWillBeRawPtr goodKeyframe = createReplaceOpKeyframe(CSSPropertyTransform, AnimatableTransform::create(ops).get()); + EXPECT_TRUE(duplicateSingleKeyframeAndTestIsCandidateOnResult(goodKeyframe.get())); ops.operations().append(TranslateTransformOperation::create(Length(50, WebCore::Percent), Length(2, WebCore::Fixed), TransformOperation::TranslateX)); - RefPtrWillBeRawPtr badKeyframe = createReplaceOpKeyframe(CSSPropertyWebkitTransform, AnimatableTransform::create(ops).get()); - EXPECT_FALSE(isCandidateHelperForSingleKeyframe(badKeyframe.get())); + RefPtrWillBeRawPtr badKeyframe = createReplaceOpKeyframe(CSSPropertyTransform, AnimatableTransform::create(ops).get()); + EXPECT_FALSE(duplicateSingleKeyframeAndTestIsCandidateOnResult(badKeyframe.get())); TransformOperations ops2; Length calcLength = Length(100, WebCore::Percent).blend(Length(100, WebCore::Fixed), 0.5, WebCore::ValueRangeAll); ops2.operations().append(TranslateTransformOperation::create(calcLength, Length(0, WebCore::Fixed), TransformOperation::TranslateX)); - RefPtrWillBeRawPtr badKeyframe2 = createReplaceOpKeyframe(CSSPropertyWebkitTransform, AnimatableTransform::create(ops2).get()); - EXPECT_FALSE(isCandidateHelperForSingleKeyframe(badKeyframe2.get())); + RefPtrWillBeRawPtr badKeyframe2 = createReplaceOpKeyframe(CSSPropertyTransform, AnimatableTransform::create(ops2).get()); + EXPECT_FALSE(duplicateSingleKeyframeAndTestIsCandidateOnResult(badKeyframe2.get())); } TEST_F(AnimationCompositorAnimationsTest, isCandidateForAnimationOnCompositorKeyframeEffectModelMultipleFramesOkay) { - KeyframeEffectModel::KeyframeVector framesSame; + AnimatableValueKeyframeVector framesSame; framesSame.append(createDefaultKeyframe(CSSPropertyOpacity, AnimationEffect::CompositeReplace, 0.0).get()); framesSame.append(createDefaultKeyframe(CSSPropertyOpacity, AnimationEffect::CompositeReplace, 1.0).get()); - EXPECT_TRUE(isCandidateForAnimationOnCompositor(m_timing, *KeyframeEffectModel::create(framesSame).get())); + EXPECT_TRUE(isCandidateForAnimationOnCompositor(m_timing, *AnimatableValueKeyframeEffectModel::create(framesSame).get())); - KeyframeEffectModel::KeyframeVector framesMixed; + AnimatableValueKeyframeVector framesMixed; framesMixed.append(createDefaultKeyframe(CSSPropertyOpacity, AnimationEffect::CompositeReplace, 0.0).get()); - framesMixed.append(createDefaultKeyframe(CSSPropertyWebkitTransform, AnimationEffect::CompositeReplace, 1.0).get()); - EXPECT_TRUE(isCandidateForAnimationOnCompositor(m_timing, *KeyframeEffectModel::create(framesMixed).get())); + framesMixed.append(createDefaultKeyframe(CSSPropertyTransform, AnimationEffect::CompositeReplace, 1.0).get()); + EXPECT_FALSE(isCandidateForAnimationOnCompositor(m_timing, *AnimatableValueKeyframeEffectModel::create(framesMixed).get())); } TEST_F(AnimationCompositorAnimationsTest, isCandidateForAnimationOnCompositorKeyframeEffectModel) { - KeyframeEffectModel::KeyframeVector framesSame; + AnimatableValueKeyframeVector framesSame; framesSame.append(createDefaultKeyframe(CSSPropertyColor, AnimationEffect::CompositeReplace, 0.0).get()); framesSame.append(createDefaultKeyframe(CSSPropertyColor, AnimationEffect::CompositeReplace, 1.0).get()); - EXPECT_FALSE(isCandidateForAnimationOnCompositor(m_timing, *KeyframeEffectModel::create(framesSame).get())); + EXPECT_FALSE(isCandidateForAnimationOnCompositor(m_timing, *AnimatableValueKeyframeEffectModel::create(framesSame).get())); - KeyframeEffectModel::KeyframeVector framesMixedProperties; + AnimatableValueKeyframeVector framesMixedProperties; framesMixedProperties.append(createDefaultKeyframe(CSSPropertyOpacity, AnimationEffect::CompositeReplace, 0.0).get()); framesMixedProperties.append(createDefaultKeyframe(CSSPropertyColor, AnimationEffect::CompositeReplace, 1.0).get()); - EXPECT_FALSE(isCandidateForAnimationOnCompositor(m_timing, *KeyframeEffectModel::create(framesMixedProperties).get())); - - KeyframeEffectModel::KeyframeVector framesMixedOps; - framesMixedOps.append(createDefaultKeyframe(CSSPropertyOpacity, AnimationEffect::CompositeReplace, 0.0).get()); - framesMixedOps.append(createDefaultKeyframe(CSSPropertyOpacity, AnimationEffect::CompositeAdd, 1.0).get()); - EXPECT_FALSE(isCandidateForAnimationOnCompositor(m_timing, *KeyframeEffectModel::create(framesMixedOps).get())); + EXPECT_FALSE(isCandidateForAnimationOnCompositor(m_timing, *AnimatableValueKeyframeEffectModel::create(framesMixedProperties).get())); } TEST_F(AnimationCompositorAnimationsTest, ConvertTimingForCompositorStartDelay) @@ -433,13 +425,12 @@ TEST_F(AnimationCompositorAnimationsTest, isCandidateForAnimationOnCompositorTim TEST_F(AnimationCompositorAnimationsTest, isCandidateForAnimationOnCompositorTimingFunctionCubic) { - // Cubic bezier are okay if we only have two keyframes m_timing.timingFunction = m_cubicEaseTimingFunction; - EXPECT_TRUE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect2.get())); + EXPECT_FALSE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect2.get())); EXPECT_FALSE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect5.get())); m_timing.timingFunction = m_cubicCustomTimingFunction; - EXPECT_TRUE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect2.get())); + EXPECT_FALSE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect2.get())); EXPECT_FALSE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect5.get())); } @@ -459,18 +450,18 @@ TEST_F(AnimationCompositorAnimationsTest, isCandidateForAnimationOnCompositorTim TEST_F(AnimationCompositorAnimationsTest, isCandidateForAnimationOnCompositorTimingFunctionChainedCubicMatchingOffsets) { (*m_keyframeVector2)[0]->setEasing(m_cubicEaseTimingFunction.get()); - m_keyframeAnimationEffect2 = KeyframeEffectModel::create(*m_keyframeVector2); + m_keyframeAnimationEffect2 = AnimatableValueKeyframeEffectModel::create(*m_keyframeVector2); EXPECT_TRUE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect2.get())); (*m_keyframeVector2)[0]->setEasing(m_cubicCustomTimingFunction.get()); - m_keyframeAnimationEffect2 = KeyframeEffectModel::create(*m_keyframeVector2); + m_keyframeAnimationEffect2 = AnimatableValueKeyframeEffectModel::create(*m_keyframeVector2); EXPECT_TRUE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect2.get())); (*m_keyframeVector5)[0]->setEasing(m_cubicEaseTimingFunction.get()); (*m_keyframeVector5)[1]->setEasing(m_cubicCustomTimingFunction.get()); (*m_keyframeVector5)[2]->setEasing(m_cubicCustomTimingFunction.get()); (*m_keyframeVector5)[3]->setEasing(m_cubicCustomTimingFunction.get()); - m_keyframeAnimationEffect5 = KeyframeEffectModel::create(*m_keyframeVector5); + m_keyframeAnimationEffect5 = AnimatableValueKeyframeEffectModel::create(*m_keyframeVector5); EXPECT_TRUE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect5.get())); } @@ -480,35 +471,35 @@ TEST_F(AnimationCompositorAnimationsTest, isCandidateForAnimationOnCompositorTim (*m_keyframeVector5)[1]->setEasing(m_cubicEaseTimingFunction.get()); (*m_keyframeVector5)[2]->setEasing(m_cubicEaseTimingFunction.get()); (*m_keyframeVector5)[3]->setEasing(m_linearTimingFunction.get()); - m_keyframeAnimationEffect5 = KeyframeEffectModel::create(*m_keyframeVector5); + m_keyframeAnimationEffect5 = AnimatableValueKeyframeEffectModel::create(*m_keyframeVector5); EXPECT_TRUE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect5.get())); } TEST_F(AnimationCompositorAnimationsTest, isCandidateForAnimationOnCompositorTimingFunctionWithStepNotOkay) { (*m_keyframeVector2)[0]->setEasing(m_stepTimingFunction.get()); - m_keyframeAnimationEffect2 = KeyframeEffectModel::create(*m_keyframeVector2); + m_keyframeAnimationEffect2 = AnimatableValueKeyframeEffectModel::create(*m_keyframeVector2); EXPECT_FALSE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect2.get())); (*m_keyframeVector5)[0]->setEasing(m_stepTimingFunction.get()); (*m_keyframeVector5)[1]->setEasing(m_linearTimingFunction.get()); (*m_keyframeVector5)[2]->setEasing(m_cubicEaseTimingFunction.get()); (*m_keyframeVector5)[3]->setEasing(m_linearTimingFunction.get()); - m_keyframeAnimationEffect5 = KeyframeEffectModel::create(*m_keyframeVector5); + m_keyframeAnimationEffect5 = AnimatableValueKeyframeEffectModel::create(*m_keyframeVector5); EXPECT_FALSE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect5.get())); (*m_keyframeVector5)[0]->setEasing(m_linearTimingFunction.get()); (*m_keyframeVector5)[1]->setEasing(m_stepTimingFunction.get()); (*m_keyframeVector5)[2]->setEasing(m_cubicEaseTimingFunction.get()); (*m_keyframeVector5)[3]->setEasing(m_linearTimingFunction.get()); - m_keyframeAnimationEffect5 = KeyframeEffectModel::create(*m_keyframeVector5); + m_keyframeAnimationEffect5 = AnimatableValueKeyframeEffectModel::create(*m_keyframeVector5); EXPECT_FALSE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect5.get())); (*m_keyframeVector5)[0]->setEasing(m_linearTimingFunction.get()); (*m_keyframeVector5)[1]->setEasing(m_cubicEaseTimingFunction.get()); (*m_keyframeVector5)[2]->setEasing(m_cubicEaseTimingFunction.get()); (*m_keyframeVector5)[3]->setEasing(m_stepTimingFunction.get()); - m_keyframeAnimationEffect5 = KeyframeEffectModel::create(*m_keyframeVector5); + m_keyframeAnimationEffect5 = AnimatableValueKeyframeEffectModel::create(*m_keyframeVector5); EXPECT_FALSE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect5.get())); } @@ -516,26 +507,26 @@ TEST_F(AnimationCompositorAnimationsTest, isCandidateForAnimationOnCompositor) { Timing linearTiming(createCompositableTiming()); - KeyframeEffectModel::KeyframeVector basicFramesVector; + AnimatableValueKeyframeVector basicFramesVector; basicFramesVector.append(createDefaultKeyframe(CSSPropertyOpacity, AnimationEffect::CompositeReplace, 0.0).get()); basicFramesVector.append(createDefaultKeyframe(CSSPropertyOpacity, AnimationEffect::CompositeReplace, 1.0).get()); - KeyframeEffectModel::KeyframeVector nonBasicFramesVector; + AnimatableValueKeyframeVector nonBasicFramesVector; nonBasicFramesVector.append(createDefaultKeyframe(CSSPropertyOpacity, AnimationEffect::CompositeReplace, 0.0).get()); nonBasicFramesVector.append(createDefaultKeyframe(CSSPropertyOpacity, AnimationEffect::CompositeReplace, 0.5).get()); nonBasicFramesVector.append(createDefaultKeyframe(CSSPropertyOpacity, AnimationEffect::CompositeReplace, 1.0).get()); basicFramesVector[0]->setEasing(m_linearTimingFunction.get()); - RefPtrWillBeRawPtr basicFrames = KeyframeEffectModel::create(basicFramesVector).get(); + RefPtrWillBeRawPtr basicFrames = AnimatableValueKeyframeEffectModel::create(basicFramesVector).get(); EXPECT_TRUE(isCandidateForAnimationOnCompositor(linearTiming, *basicFrames.get())); basicFramesVector[0]->setEasing(CubicBezierTimingFunction::preset(CubicBezierTimingFunction::EaseIn)); - basicFrames = KeyframeEffectModel::create(basicFramesVector).get(); + basicFrames = AnimatableValueKeyframeEffectModel::create(basicFramesVector).get(); EXPECT_TRUE(isCandidateForAnimationOnCompositor(linearTiming, *basicFrames.get())); nonBasicFramesVector[0]->setEasing(m_linearTimingFunction.get()); nonBasicFramesVector[1]->setEasing(CubicBezierTimingFunction::preset(CubicBezierTimingFunction::EaseIn)); - RefPtrWillBeRawPtr nonBasicFrames = KeyframeEffectModel::create(nonBasicFramesVector).get(); + RefPtrWillBeRawPtr nonBasicFrames = AnimatableValueKeyframeEffectModel::create(nonBasicFramesVector).get(); EXPECT_TRUE(CompositorAnimations::instance()->isCandidateForAnimationOnCompositor(linearTiming, *nonBasicFrames.get())); } @@ -545,7 +536,7 @@ TEST_F(AnimationCompositorAnimationsTest, isCandidateForAnimationOnCompositor) TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimation) { // Animation to convert - RefPtrWillBeRawPtr effect = createKeyframeEffectModel( + RefPtrWillBeRawPtr effect = createKeyframeEffectModel( createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0).get(), 0), createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(5.0).get(), 1.0)); // -- @@ -590,7 +581,7 @@ TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimation) TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationDuration) { // Animation to convert - RefPtrWillBeRawPtr effect = createKeyframeEffectModel( + RefPtrWillBeRawPtr effect = createKeyframeEffectModel( createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0).get(), 0), createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(5.0).get(), 1.0)); @@ -637,7 +628,7 @@ TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationDuration) TEST_F(AnimationCompositorAnimationsTest, createMultipleKeyframeOpacityAnimationLinear) { // Animation to convert - RefPtrWillBeRawPtr effect = createKeyframeEffectModel( + RefPtrWillBeRawPtr effect = createKeyframeEffectModel( createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0).get(), 0), createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(-1.0).get(), 0.25), createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(20.0).get(), 0.5), @@ -690,7 +681,7 @@ TEST_F(AnimationCompositorAnimationsTest, createMultipleKeyframeOpacityAnimation TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationStartDelay) { // Animation to convert - RefPtrWillBeRawPtr effect = createKeyframeEffectModel( + RefPtrWillBeRawPtr effect = createKeyframeEffectModel( createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0).get(), 0), createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(5.0).get(), 1.0)); @@ -739,7 +730,7 @@ TEST_F(AnimationCompositorAnimationsTest, createSimpleOpacityAnimationStartDelay TEST_F(AnimationCompositorAnimationsTest, createMultipleKeyframeOpacityAnimationChained) { // Animation to convert - KeyframeEffectModel::KeyframeVector frames; + AnimatableValueKeyframeVector frames; frames.append(createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0).get(), 0)); frames.append(createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(-1.0).get(), 0.25)); frames.append(createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(20.0).get(), 0.5)); @@ -747,7 +738,7 @@ TEST_F(AnimationCompositorAnimationsTest, createMultipleKeyframeOpacityAnimation frames[0]->setEasing(m_cubicEaseTimingFunction.get()); frames[1]->setEasing(m_linearTimingFunction.get()); frames[2]->setEasing(m_cubicCustomTimingFunction.get()); - RefPtrWillBeRawPtr effect = KeyframeEffectModel::create(frames); + RefPtrWillBeRawPtr effect = AnimatableValueKeyframeEffectModel::create(frames); m_timing.timingFunction = m_linearTimingFunction.get(); m_timing.iterationDuration = 2.0; @@ -800,7 +791,7 @@ TEST_F(AnimationCompositorAnimationsTest, createReversedOpacityAnimation) RefPtr cubicEasyFlipTimingFunction = CubicBezierTimingFunction::create(0.0, 0.0, 0.0, 1.0); // Animation to convert - KeyframeEffectModel::KeyframeVector frames; + AnimatableValueKeyframeVector frames; frames.append(createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0).get(), 0)); frames.append(createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(-1.0).get(), 0.25)); frames.append(createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(20.0).get(), 0.5)); @@ -808,7 +799,7 @@ TEST_F(AnimationCompositorAnimationsTest, createReversedOpacityAnimation) frames[0]->setEasing(CubicBezierTimingFunction::preset(CubicBezierTimingFunction::EaseIn)); frames[1]->setEasing(m_linearTimingFunction.get()); frames[2]->setEasing(cubicEasyFlipTimingFunction.get()); - RefPtrWillBeRawPtr effect = KeyframeEffectModel::create(frames); + RefPtrWillBeRawPtr effect = AnimatableValueKeyframeEffectModel::create(frames); m_timing.timingFunction = m_linearTimingFunction.get(); m_timing.iterationCount = 10; @@ -858,7 +849,7 @@ TEST_F(AnimationCompositorAnimationsTest, createReversedOpacityAnimation) TEST_F(AnimationCompositorAnimationsTest, createReversedOpacityAnimationNegativeStartDelay) { // Animation to convert - RefPtrWillBeRawPtr effect = createKeyframeEffectModel( + RefPtrWillBeRawPtr effect = createKeyframeEffectModel( createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(2.0).get(), 0), createReplaceOpKeyframe(CSSPropertyOpacity, AnimatableDouble::create(5.0).get(), 1.0));