OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013, Google Inc. All rights reserved. | 2 * Copyright (c) 2013, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 68 |
69 class AnimationCompositorAnimationsTest : public AnimationCompositorAnimationsTe
stBase { | 69 class AnimationCompositorAnimationsTest : public AnimationCompositorAnimationsTe
stBase { |
70 protected: | 70 protected: |
71 RefPtr<TimingFunction> m_linearTimingFunction; | 71 RefPtr<TimingFunction> m_linearTimingFunction; |
72 RefPtr<TimingFunction> m_cubicEaseTimingFunction; | 72 RefPtr<TimingFunction> m_cubicEaseTimingFunction; |
73 RefPtr<TimingFunction> m_cubicCustomTimingFunction; | 73 RefPtr<TimingFunction> m_cubicCustomTimingFunction; |
74 RefPtr<TimingFunction> m_stepTimingFunction; | 74 RefPtr<TimingFunction> m_stepTimingFunction; |
75 | 75 |
76 Timing m_timing; | 76 Timing m_timing; |
77 CompositorAnimationsImpl::CompositorTiming m_compositorTiming; | 77 CompositorAnimationsImpl::CompositorTiming m_compositorTiming; |
78 OwnPtrWillBePersistent<AnimatableValueKeyframeVector> m_keyframeVector2; | 78 OwnPtr<AnimatableValueKeyframeVector> m_keyframeVector2; |
79 Persistent<AnimatableValueKeyframeEffectModel> m_keyframeAnimationEffect2; | 79 Persistent<AnimatableValueKeyframeEffectModel> m_keyframeAnimationEffect2; |
80 OwnPtrWillBePersistent<AnimatableValueKeyframeVector> m_keyframeVector5; | 80 OwnPtr<AnimatableValueKeyframeVector> m_keyframeVector5; |
81 Persistent<AnimatableValueKeyframeEffectModel> m_keyframeAnimationEffect5; | 81 Persistent<AnimatableValueKeyframeEffectModel> m_keyframeAnimationEffect5; |
82 | 82 |
83 RefPtrWillBePersistent<Document> m_document; | 83 RefPtrWillBePersistent<Document> m_document; |
84 RefPtrWillBePersistent<Element> m_element; | 84 RefPtrWillBePersistent<Element> m_element; |
85 Persistent<AnimationTimeline> m_timeline; | 85 Persistent<AnimationTimeline> m_timeline; |
86 | 86 |
87 virtual void SetUp() | 87 virtual void SetUp() |
88 { | 88 { |
89 AnimationCompositorAnimationsTestBase::SetUp(); | 89 AnimationCompositorAnimationsTestBase::SetUp(); |
90 | 90 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 } | 131 } |
132 bool getAnimationBounds(FloatBox& boundingBox, const EffectModel& effect, do
uble minValue, double maxValue) | 132 bool getAnimationBounds(FloatBox& boundingBox, const EffectModel& effect, do
uble minValue, double maxValue) |
133 { | 133 { |
134 return CompositorAnimations::instance()->getAnimatedBoundingBox(bounding
Box, effect, minValue, maxValue); | 134 return CompositorAnimations::instance()->getAnimatedBoundingBox(bounding
Box, effect, minValue, maxValue); |
135 } | 135 } |
136 | 136 |
137 bool duplicateSingleKeyframeAndTestIsCandidateOnResult(AnimatableValueKeyfra
me* frame) | 137 bool duplicateSingleKeyframeAndTestIsCandidateOnResult(AnimatableValueKeyfra
me* frame) |
138 { | 138 { |
139 EXPECT_EQ(frame->offset(), 0); | 139 EXPECT_EQ(frame->offset(), 0); |
140 AnimatableValueKeyframeVector frames; | 140 AnimatableValueKeyframeVector frames; |
141 RefPtrWillBeRawPtr<Keyframe> second = frame->cloneWithOffset(1); | 141 RefPtr<Keyframe> second = frame->cloneWithOffset(1); |
142 | 142 |
143 frames.append(frame); | 143 frames.append(frame); |
144 frames.append(toAnimatableValueKeyframe(second.get())); | 144 frames.append(toAnimatableValueKeyframe(second.get())); |
145 return isCandidateForAnimationOnCompositor(m_timing, *AnimatableValueKey
frameEffectModel::create(frames)); | 145 return isCandidateForAnimationOnCompositor(m_timing, *AnimatableValueKey
frameEffectModel::create(frames)); |
146 } | 146 } |
147 | 147 |
148 // ------------------------------------------------------------------- | 148 // ------------------------------------------------------------------- |
149 | 149 |
150 Timing createCompositableTiming() | 150 Timing createCompositableTiming() |
151 { | 151 { |
152 Timing timing; | 152 Timing timing; |
153 timing.startDelay = 0; | 153 timing.startDelay = 0; |
154 timing.fillMode = Timing::FillModeNone; | 154 timing.fillMode = Timing::FillModeNone; |
155 timing.iterationStart = 0; | 155 timing.iterationStart = 0; |
156 timing.iterationCount = 1; | 156 timing.iterationCount = 1; |
157 timing.iterationDuration = 1.0; | 157 timing.iterationDuration = 1.0; |
158 timing.playbackRate = 1.0; | 158 timing.playbackRate = 1.0; |
159 timing.direction = Timing::PlaybackDirectionNormal; | 159 timing.direction = Timing::PlaybackDirectionNormal; |
160 ASSERT(m_linearTimingFunction); | 160 ASSERT(m_linearTimingFunction); |
161 timing.timingFunction = m_linearTimingFunction; | 161 timing.timingFunction = m_linearTimingFunction; |
162 return timing; | 162 return timing; |
163 } | 163 } |
164 | 164 |
165 PassRefPtrWillBeRawPtr<AnimatableValueKeyframe> createReplaceOpKeyframe(CSSP
ropertyID id, AnimatableValue* value, double offset = 0) | 165 PassRefPtr<AnimatableValueKeyframe> createReplaceOpKeyframe(CSSPropertyID id
, AnimatableValue* value, double offset = 0) |
166 { | 166 { |
167 RefPtrWillBeRawPtr<AnimatableValueKeyframe> keyframe = AnimatableValueKe
yframe::create(); | 167 RefPtr<AnimatableValueKeyframe> keyframe = AnimatableValueKeyframe::crea
te(); |
168 keyframe->setPropertyValue(id, value); | 168 keyframe->setPropertyValue(id, value); |
169 keyframe->setComposite(EffectModel::CompositeReplace); | 169 keyframe->setComposite(EffectModel::CompositeReplace); |
170 keyframe->setOffset(offset); | 170 keyframe->setOffset(offset); |
171 keyframe->setEasing(LinearTimingFunction::shared()); | 171 keyframe->setEasing(LinearTimingFunction::shared()); |
172 return keyframe; | 172 return keyframe; |
173 } | 173 } |
174 | 174 |
175 PassRefPtrWillBeRawPtr<AnimatableValueKeyframe> createDefaultKeyframe(CSSPro
pertyID id, EffectModel::CompositeOperation op, double offset = 0) | 175 PassRefPtr<AnimatableValueKeyframe> createDefaultKeyframe(CSSPropertyID id,
EffectModel::CompositeOperation op, double offset = 0) |
176 { | 176 { |
177 RefPtrWillBeRawPtr<AnimatableValue> value = nullptr; | 177 RefPtr<AnimatableValue> value = nullptr; |
178 if (id == CSSPropertyTransform) | 178 if (id == CSSPropertyTransform) |
179 value = AnimatableTransform::create(TransformOperations()); | 179 value = AnimatableTransform::create(TransformOperations()); |
180 else | 180 else |
181 value = AnimatableDouble::create(10.0); | 181 value = AnimatableDouble::create(10.0); |
182 | 182 |
183 RefPtrWillBeRawPtr<AnimatableValueKeyframe> keyframe = createReplaceOpKe
yframe(id, value.get(), offset); | 183 RefPtr<AnimatableValueKeyframe> keyframe = createReplaceOpKeyframe(id, v
alue.get(), offset); |
184 keyframe->setComposite(op); | 184 keyframe->setComposite(op); |
185 return keyframe; | 185 return keyframe; |
186 } | 186 } |
187 | 187 |
188 PassOwnPtrWillBeRawPtr<AnimatableValueKeyframeVector> createCompositableFloa
tKeyframeVector(size_t n) | 188 PassOwnPtr<AnimatableValueKeyframeVector> createCompositableFloatKeyframeVec
tor(size_t n) |
189 { | 189 { |
190 Vector<double> values; | 190 Vector<double> values; |
191 for (size_t i = 0; i < n; i++) { | 191 for (size_t i = 0; i < n; i++) { |
192 values.append(static_cast<double>(i)); | 192 values.append(static_cast<double>(i)); |
193 } | 193 } |
194 return createCompositableFloatKeyframeVector(values); | 194 return createCompositableFloatKeyframeVector(values); |
195 } | 195 } |
196 | 196 |
197 PassOwnPtrWillBeRawPtr<AnimatableValueKeyframeVector> createCompositableFloa
tKeyframeVector(Vector<double>& values) | 197 PassOwnPtr<AnimatableValueKeyframeVector> createCompositableFloatKeyframeVec
tor(Vector<double>& values) |
198 { | 198 { |
199 OwnPtrWillBeRawPtr<AnimatableValueKeyframeVector> frames = adoptPtrWillB
eNoop(new AnimatableValueKeyframeVector); | 199 OwnPtr<AnimatableValueKeyframeVector> frames = adoptPtr(new AnimatableVa
lueKeyframeVector); |
200 for (size_t i = 0; i < values.size(); i++) { | 200 for (size_t i = 0; i < values.size(); i++) { |
201 double offset = 1.0 / (values.size() - 1) * i; | 201 double offset = 1.0 / (values.size() - 1) * i; |
202 RefPtrWillBeRawPtr<AnimatableDouble> value = AnimatableDouble::creat
e(values[i]); | 202 RefPtr<AnimatableDouble> value = AnimatableDouble::create(values[i])
; |
203 frames->append(createReplaceOpKeyframe(CSSPropertyOpacity, value.get
(), offset).get()); | 203 frames->append(createReplaceOpKeyframe(CSSPropertyOpacity, value.get
(), offset).get()); |
204 } | 204 } |
205 return frames.release(); | 205 return frames.release(); |
206 } | 206 } |
207 | 207 |
208 PassOwnPtrWillBeRawPtr<AnimatableValueKeyframeVector> createCompositableTran
sformKeyframeVector(const Vector<TransformOperations>& values) | 208 PassOwnPtr<AnimatableValueKeyframeVector> createCompositableTransformKeyfram
eVector(const Vector<TransformOperations>& values) |
209 { | 209 { |
210 OwnPtrWillBeRawPtr<AnimatableValueKeyframeVector> frames = adoptPtrWillB
eNoop(new AnimatableValueKeyframeVector); | 210 OwnPtr<AnimatableValueKeyframeVector> frames = adoptPtr(new AnimatableVa
lueKeyframeVector); |
211 for (size_t i = 0; i < values.size(); ++i) { | 211 for (size_t i = 0; i < values.size(); ++i) { |
212 double offset = 1.0f / (values.size() - 1) * i; | 212 double offset = 1.0f / (values.size() - 1) * i; |
213 RefPtrWillBeRawPtr<AnimatableTransform> value = AnimatableTransform:
:create(values[i]); | 213 RefPtr<AnimatableTransform> value = AnimatableTransform::create(valu
es[i]); |
214 frames->append(createReplaceOpKeyframe(CSSPropertyTransform, value.g
et(), offset).get()); | 214 frames->append(createReplaceOpKeyframe(CSSPropertyTransform, value.g
et(), offset).get()); |
215 } | 215 } |
216 return frames.release(); | 216 return frames.release(); |
217 } | 217 } |
218 | 218 |
219 AnimatableValueKeyframeEffectModel* createKeyframeEffectModel(PassRefPtrWill
BeRawPtr<AnimatableValueKeyframe> prpFrom, PassRefPtrWillBeRawPtr<AnimatableValu
eKeyframe> prpTo, PassRefPtrWillBeRawPtr<AnimatableValueKeyframe> prpC = nullptr
, PassRefPtrWillBeRawPtr<AnimatableValueKeyframe> prpD = nullptr) | 219 AnimatableValueKeyframeEffectModel* createKeyframeEffectModel(PassRefPtr<Ani
matableValueKeyframe> prpFrom, PassRefPtr<AnimatableValueKeyframe> prpTo, PassRe
fPtr<AnimatableValueKeyframe> prpC = nullptr, PassRefPtr<AnimatableValueKeyframe
> prpD = nullptr) |
220 { | 220 { |
221 RefPtrWillBeRawPtr<AnimatableValueKeyframe> from = prpFrom; | 221 RefPtr<AnimatableValueKeyframe> from = prpFrom; |
222 RefPtrWillBeRawPtr<AnimatableValueKeyframe> to = prpTo; | 222 RefPtr<AnimatableValueKeyframe> to = prpTo; |
223 RefPtrWillBeRawPtr<AnimatableValueKeyframe> c = prpC; | 223 RefPtr<AnimatableValueKeyframe> c = prpC; |
224 RefPtrWillBeRawPtr<AnimatableValueKeyframe> d = prpD; | 224 RefPtr<AnimatableValueKeyframe> d = prpD; |
225 | 225 |
226 EXPECT_EQ(from->offset(), 0); | 226 EXPECT_EQ(from->offset(), 0); |
227 AnimatableValueKeyframeVector frames; | 227 AnimatableValueKeyframeVector frames; |
228 frames.append(from); | 228 frames.append(from); |
229 EXPECT_LE(from->offset(), to->offset()); | 229 EXPECT_LE(from->offset(), to->offset()); |
230 frames.append(to); | 230 frames.append(to); |
231 if (c) { | 231 if (c) { |
232 EXPECT_LE(to->offset(), c->offset()); | 232 EXPECT_LE(to->offset(), c->offset()); |
233 frames.append(c); | 233 frames.append(c); |
234 } | 234 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 : LayoutObject(node) | 273 : LayoutObject(node) |
274 { | 274 { |
275 } | 275 } |
276 }; | 276 }; |
277 | 277 |
278 // ----------------------------------------------------------------------- | 278 // ----------------------------------------------------------------------- |
279 // ----------------------------------------------------------------------- | 279 // ----------------------------------------------------------------------- |
280 | 280 |
281 TEST_F(AnimationCompositorAnimationsTest, isCandidateForAnimationOnCompositorKey
frameMultipleCSSProperties) | 281 TEST_F(AnimationCompositorAnimationsTest, isCandidateForAnimationOnCompositorKey
frameMultipleCSSProperties) |
282 { | 282 { |
283 RefPtrWillBeRawPtr<AnimatableValueKeyframe> keyframeGoodMultiple = createDef
aultKeyframe(CSSPropertyOpacity, EffectModel::CompositeReplace); | 283 RefPtr<AnimatableValueKeyframe> keyframeGoodMultiple = createDefaultKeyframe
(CSSPropertyOpacity, EffectModel::CompositeReplace); |
284 keyframeGoodMultiple->setPropertyValue(CSSPropertyTransform, AnimatableTrans
form::create(TransformOperations()).get()); | 284 keyframeGoodMultiple->setPropertyValue(CSSPropertyTransform, AnimatableTrans
form::create(TransformOperations()).get()); |
285 EXPECT_TRUE(duplicateSingleKeyframeAndTestIsCandidateOnResult(keyframeGoodMu
ltiple.get())); | 285 EXPECT_TRUE(duplicateSingleKeyframeAndTestIsCandidateOnResult(keyframeGoodMu
ltiple.get())); |
286 | 286 |
287 RefPtrWillBeRawPtr<AnimatableValueKeyframe> keyframeBadMultipleID = createDe
faultKeyframe(CSSPropertyColor, EffectModel::CompositeReplace); | 287 RefPtr<AnimatableValueKeyframe> keyframeBadMultipleID = createDefaultKeyfram
e(CSSPropertyColor, EffectModel::CompositeReplace); |
288 keyframeBadMultipleID->setPropertyValue(CSSPropertyOpacity, AnimatableDouble
::create(10.0).get()); | 288 keyframeBadMultipleID->setPropertyValue(CSSPropertyOpacity, AnimatableDouble
::create(10.0).get()); |
289 EXPECT_FALSE(duplicateSingleKeyframeAndTestIsCandidateOnResult(keyframeBadMu
ltipleID.get())); | 289 EXPECT_FALSE(duplicateSingleKeyframeAndTestIsCandidateOnResult(keyframeBadMu
ltipleID.get())); |
290 } | 290 } |
291 | 291 |
292 TEST_F(AnimationCompositorAnimationsTest, isNotCandidateForCompositorAnimationTr
ansformDependsOnBoxSize) | 292 TEST_F(AnimationCompositorAnimationsTest, isNotCandidateForCompositorAnimationTr
ansformDependsOnBoxSize) |
293 { | 293 { |
294 TransformOperations ops; | 294 TransformOperations ops; |
295 ops.operations().append(TranslateTransformOperation::create(Length(2, Fixed)
, Length(2, Fixed), TransformOperation::TranslateX)); | 295 ops.operations().append(TranslateTransformOperation::create(Length(2, Fixed)
, Length(2, Fixed), TransformOperation::TranslateX)); |
296 RefPtrWillBeRawPtr<AnimatableValueKeyframe> goodKeyframe = createReplaceOpKe
yframe(CSSPropertyTransform, AnimatableTransform::create(ops).get()); | 296 RefPtr<AnimatableValueKeyframe> goodKeyframe = createReplaceOpKeyframe(CSSPr
opertyTransform, AnimatableTransform::create(ops).get()); |
297 EXPECT_TRUE(duplicateSingleKeyframeAndTestIsCandidateOnResult(goodKeyframe.g
et())); | 297 EXPECT_TRUE(duplicateSingleKeyframeAndTestIsCandidateOnResult(goodKeyframe.g
et())); |
298 | 298 |
299 ops.operations().append(TranslateTransformOperation::create(Length(50, Perce
nt), Length(2, Fixed), TransformOperation::TranslateX)); | 299 ops.operations().append(TranslateTransformOperation::create(Length(50, Perce
nt), Length(2, Fixed), TransformOperation::TranslateX)); |
300 RefPtrWillBeRawPtr<AnimatableValueKeyframe> badKeyframe = createReplaceOpKey
frame(CSSPropertyTransform, AnimatableTransform::create(ops).get()); | 300 RefPtr<AnimatableValueKeyframe> badKeyframe = createReplaceOpKeyframe(CSSPro
pertyTransform, AnimatableTransform::create(ops).get()); |
301 EXPECT_FALSE(duplicateSingleKeyframeAndTestIsCandidateOnResult(badKeyframe.g
et())); | 301 EXPECT_FALSE(duplicateSingleKeyframeAndTestIsCandidateOnResult(badKeyframe.g
et())); |
302 | 302 |
303 TransformOperations ops2; | 303 TransformOperations ops2; |
304 Length calcLength = Length(100, Percent).blend(Length(100, Fixed), 0.5, Valu
eRangeAll); | 304 Length calcLength = Length(100, Percent).blend(Length(100, Fixed), 0.5, Valu
eRangeAll); |
305 ops2.operations().append(TranslateTransformOperation::create(calcLength, Len
gth(0, Fixed), TransformOperation::TranslateX)); | 305 ops2.operations().append(TranslateTransformOperation::create(calcLength, Len
gth(0, Fixed), TransformOperation::TranslateX)); |
306 RefPtrWillBeRawPtr<AnimatableValueKeyframe> badKeyframe2 = createReplaceOpKe
yframe(CSSPropertyTransform, AnimatableTransform::create(ops2).get()); | 306 RefPtr<AnimatableValueKeyframe> badKeyframe2 = createReplaceOpKeyframe(CSSPr
opertyTransform, AnimatableTransform::create(ops2).get()); |
307 EXPECT_FALSE(duplicateSingleKeyframeAndTestIsCandidateOnResult(badKeyframe2.
get())); | 307 EXPECT_FALSE(duplicateSingleKeyframeAndTestIsCandidateOnResult(badKeyframe2.
get())); |
308 } | 308 } |
309 | 309 |
310 TEST_F(AnimationCompositorAnimationsTest, isCandidateForAnimationOnCompositorKey
frameEffectModelMultipleFramesOkay) | 310 TEST_F(AnimationCompositorAnimationsTest, isCandidateForAnimationOnCompositorKey
frameEffectModelMultipleFramesOkay) |
311 { | 311 { |
312 AnimatableValueKeyframeVector framesSame; | 312 AnimatableValueKeyframeVector framesSame; |
313 framesSame.append(createDefaultKeyframe(CSSPropertyOpacity, EffectModel::Com
positeReplace, 0.0).get()); | 313 framesSame.append(createDefaultKeyframe(CSSPropertyOpacity, EffectModel::Com
positeReplace, 0.0).get()); |
314 framesSame.append(createDefaultKeyframe(CSSPropertyOpacity, EffectModel::Com
positeReplace, 1.0).get()); | 314 framesSame.append(createDefaultKeyframe(CSSPropertyOpacity, EffectModel::Com
positeReplace, 1.0).get()); |
315 EXPECT_TRUE(isCandidateForAnimationOnCompositor(m_timing, *AnimatableValueKe
yframeEffectModel::create(framesSame))); | 315 EXPECT_TRUE(isCandidateForAnimationOnCompositor(m_timing, *AnimatableValueKe
yframeEffectModel::create(framesSame))); |
316 | 316 |
(...skipping 16 matching lines...) Expand all Loading... |
333 EXPECT_FALSE(isCandidateForAnimationOnCompositor(m_timing, *AnimatableValueK
eyframeEffectModel::create(framesMixedProperties))); | 333 EXPECT_FALSE(isCandidateForAnimationOnCompositor(m_timing, *AnimatableValueK
eyframeEffectModel::create(framesMixedProperties))); |
334 } | 334 } |
335 | 335 |
336 TEST_F(AnimationCompositorAnimationsTest, AnimatedBoundingBox) | 336 TEST_F(AnimationCompositorAnimationsTest, AnimatedBoundingBox) |
337 { | 337 { |
338 Vector<TransformOperations> transformVector; | 338 Vector<TransformOperations> transformVector; |
339 transformVector.append(TransformOperations()); | 339 transformVector.append(TransformOperations()); |
340 transformVector.last().operations().append(TranslateTransformOperation::crea
te(Length(0, Fixed), Length(0, Fixed), 0.0, TransformOperation::Translate3D)); | 340 transformVector.last().operations().append(TranslateTransformOperation::crea
te(Length(0, Fixed), Length(0, Fixed), 0.0, TransformOperation::Translate3D)); |
341 transformVector.append(TransformOperations()); | 341 transformVector.append(TransformOperations()); |
342 transformVector.last().operations().append(TranslateTransformOperation::crea
te(Length(200, Fixed), Length(200, Fixed), 0.0, TransformOperation::Translate3D)
); | 342 transformVector.last().operations().append(TranslateTransformOperation::crea
te(Length(200, Fixed), Length(200, Fixed), 0.0, TransformOperation::Translate3D)
); |
343 OwnPtrWillBePersistent<AnimatableValueKeyframeVector> frames = createComposi
tableTransformKeyframeVector(transformVector); | 343 OwnPtr<AnimatableValueKeyframeVector> frames = createCompositableTransformKe
yframeVector(transformVector); |
344 FloatBox bounds; | 344 FloatBox bounds; |
345 EXPECT_TRUE(getAnimationBounds(bounds, *AnimatableValueKeyframeEffectModel::
create(*frames), 0, 1)); | 345 EXPECT_TRUE(getAnimationBounds(bounds, *AnimatableValueKeyframeEffectModel::
create(*frames), 0, 1)); |
346 EXPECT_EQ(FloatBox(0.0f, 0.f, 0.0f, 200.0f, 200.0f, 0.0f), bounds); | 346 EXPECT_EQ(FloatBox(0.0f, 0.f, 0.0f, 200.0f, 200.0f, 0.0f), bounds); |
347 bounds = FloatBox(); | 347 bounds = FloatBox(); |
348 EXPECT_TRUE(getAnimationBounds(bounds, *AnimatableValueKeyframeEffectModel::
create(*frames), -1, 1)); | 348 EXPECT_TRUE(getAnimationBounds(bounds, *AnimatableValueKeyframeEffectModel::
create(*frames), -1, 1)); |
349 EXPECT_EQ(FloatBox(-200.0f, -200.0, 0.0, 400.0f, 400.0f, 0.0f), bounds); | 349 EXPECT_EQ(FloatBox(-200.0f, -200.0, 0.0, 400.0f, 400.0f, 0.0f), bounds); |
350 transformVector.append(TransformOperations()); | 350 transformVector.append(TransformOperations()); |
351 transformVector.last().operations().append(TranslateTransformOperation::crea
te(Length(-300, Fixed), Length(-400, Fixed), 1.0f, TransformOperation::Translate
3D)); | 351 transformVector.last().operations().append(TranslateTransformOperation::crea
te(Length(-300, Fixed), Length(-400, Fixed), 1.0f, TransformOperation::Translate
3D)); |
352 bounds = FloatBox(); | 352 bounds = FloatBox(); |
353 frames = createCompositableTransformKeyframeVector(transformVector); | 353 frames = createCompositableTransformKeyframeVector(transformVector); |
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1242 simulateFrame(1.); | 1242 simulateFrame(1.); |
1243 | 1243 |
1244 element->setLayoutObject(nullptr); | 1244 element->setLayoutObject(nullptr); |
1245 LayoutObjectProxy::dispose(layoutObject); | 1245 LayoutObjectProxy::dispose(layoutObject); |
1246 | 1246 |
1247 Heap::collectAllGarbage(); | 1247 Heap::collectAllGarbage(); |
1248 EXPECT_TRUE(element->elementAnimations()->animations().isEmpty()); | 1248 EXPECT_TRUE(element->elementAnimations()->animations().isEmpty()); |
1249 } | 1249 } |
1250 | 1250 |
1251 } // namespace blink | 1251 } // namespace blink |
OLD | NEW |