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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 | 382 |
383 AnimatableValueKeyframeEffectModel* oldEffect = toAnimatableValueKey
frameEffectModel(inertAnimation->effect()); | 383 AnimatableValueKeyframeEffectModel* oldEffect = toAnimatableValueKey
frameEffectModel(inertAnimation->effect()); |
384 const KeyframeVector& frames = oldEffect->getFrames(); | 384 const KeyframeVector& frames = oldEffect->getFrames(); |
385 | 385 |
386 AnimatableValueKeyframeVector newFrames; | 386 AnimatableValueKeyframeVector newFrames; |
387 newFrames.append(toAnimatableValueKeyframe(frames[0]->clone().get())
); | 387 newFrames.append(toAnimatableValueKeyframe(frames[0]->clone().get())
); |
388 newFrames.append(toAnimatableValueKeyframe(frames[1]->clone().get())
); | 388 newFrames.append(toAnimatableValueKeyframe(frames[1]->clone().get())
); |
389 | 389 |
390 newFrames[0]->clearPropertyValue(id); | 390 newFrames[0]->clearPropertyValue(id); |
391 RefPtrWillBeRawPtr<InertAnimation> inertAnimationForSampling = Inert
Animation::create(oldAnimation->effect(), oldAnimation->specifiedTiming(), false
); | 391 RefPtrWillBeRawPtr<InertAnimation> inertAnimationForSampling = Inert
Animation::create(oldAnimation->effect(), oldAnimation->specifiedTiming(), false
); |
392 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation
>>> sample = inertAnimationForSampling->sample(inheritedTime); | 392 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation
>>> sample = nullptr; |
393 ASSERT(sample->size() == 1); | 393 inertAnimationForSampling->sample(inheritedTime, sample); |
| 394 ASSERT(sample && sample->size() == 1); |
394 newFrames[0]->setPropertyValue(id, toLegacyStyleInterpolation(sample
->at(0).get())->currentValue()); | 395 newFrames[0]->setPropertyValue(id, toLegacyStyleInterpolation(sample
->at(0).get())->currentValue()); |
395 | 396 |
396 effect = AnimatableValueKeyframeEffectModel::create(newFrames); | 397 effect = AnimatableValueKeyframeEffectModel::create(newFrames); |
397 } | 398 } |
398 | 399 |
399 RefPtrWillBeRawPtr<Animation> transition = Animation::create(element, ef
fect, inertAnimation->specifiedTiming(), Animation::TransitionPriority, eventDel
egate.release()); | 400 RefPtrWillBeRawPtr<Animation> transition = Animation::create(element, ef
fect, inertAnimation->specifiedTiming(), Animation::TransitionPriority, eventDel
egate.release()); |
400 transition->setName(inertAnimation->name()); | 401 transition->setName(inertAnimation->name()); |
401 RefPtrWillBeRawPtr<AnimationPlayer> player = element->document().timelin
e().createAnimationPlayer(transition.get()); | 402 RefPtrWillBeRawPtr<AnimationPlayer> player = element->document().timelin
e().createAnimationPlayer(transition.get()); |
402 player->update(TimingUpdateOnDemand); | 403 player->update(TimingUpdateOnDemand); |
403 runningTransition.player = player; | 404 runningTransition.player = player; |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
736 #if ENABLE(OILPAN) | 737 #if ENABLE(OILPAN) |
737 visitor->trace(m_newTransitions); | 738 visitor->trace(m_newTransitions); |
738 visitor->trace(m_activeInterpolationsForAnimations); | 739 visitor->trace(m_activeInterpolationsForAnimations); |
739 visitor->trace(m_activeInterpolationsForTransitions); | 740 visitor->trace(m_activeInterpolationsForTransitions); |
740 visitor->trace(m_newAnimations); | 741 visitor->trace(m_newAnimations); |
741 visitor->trace(m_cancelledAnimationPlayers); | 742 visitor->trace(m_cancelledAnimationPlayers); |
742 #endif | 743 #endif |
743 } | 744 } |
744 | 745 |
745 } // namespace blink | 746 } // namespace blink |
OLD | NEW |