Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: Source/core/animation/css/CSSAnimations.cpp

Issue 1328723003: Rename KeyframeEffect::isAnimation to KeyframeEffect::isKeyframeEffect (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/animation/KeyframeEffect.h ('k') | Source/core/inspector/InspectorTraceEvents.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 inactive.remove(animationName); 261 inactive.remove(animationName);
262 262
263 const RunningAnimation* runningAnimation = existing->value.g et(); 263 const RunningAnimation* runningAnimation = existing->value.g et();
264 Animation* animation = runningAnimation->animation.get(); 264 Animation* animation = runningAnimation->animation.get();
265 265
266 if (keyframesRule != runningAnimation->styleRule || keyframe sRule->version() != runningAnimation->styleRuleVersion || runningAnimation->spec ifiedTiming != specifiedTiming) { 266 if (keyframesRule != runningAnimation->styleRule || keyframe sRule->version() != runningAnimation->styleRuleVersion || runningAnimation->spec ifiedTiming != specifiedTiming) {
267 ASSERT(!isAnimationStyleChange); 267 ASSERT(!isAnimationStyleChange);
268 update.updateAnimation(animationName, animation, InertEf fect::create( 268 update.updateAnimation(animationName, animation, InertEf fect::create(
269 createKeyframeEffectModel(resolver, animatingElement , element, &style, parentStyle, animationName, keyframeTimingFunction.get(), i), 269 createKeyframeEffectModel(resolver, animatingElement , element, &style, parentStyle, animationName, keyframeTimingFunction.get(), i),
270 timing, isPaused, animation->unlimitedCurrentTimeInt ernal()), specifiedTiming, keyframesRule); 270 timing, isPaused, animation->unlimitedCurrentTimeInt ernal()), specifiedTiming, keyframesRule);
271 } else if (!isAnimationStyleChange && animation->effect() && animation->effect()->isAnimation()) { 271 } else if (!isAnimationStyleChange && animation->effect() && animation->effect()->isKeyframeEffect()) {
272 EffectModel* model = toKeyframeEffect(animation->effect( ))->model(); 272 EffectModel* model = toKeyframeEffect(animation->effect( ))->model();
273 if (model && model->isKeyframeEffectModel()) { 273 if (model && model->isKeyframeEffectModel()) {
274 KeyframeEffectModelBase* keyframeEffect = toKeyframe EffectModelBase(model); 274 KeyframeEffectModelBase* keyframeEffect = toKeyframe EffectModelBase(model);
275 if (keyframeEffect->hasSyntheticKeyframes()) 275 if (keyframeEffect->hasSyntheticKeyframes())
276 update.updateAnimationStyle(animation, keyframeE ffect, animatingElement->layoutObject(), style); 276 update.updateAnimationStyle(animation, keyframeE ffect, animatingElement->layoutObject(), style);
277 } 277 }
278 } 278 }
279 279
280 if (isPaused != animation->paused()) { 280 if (isPaused != animation->paused()) {
281 ASSERT(!isAnimationStyleChange); 281 ASSERT(!isAnimationStyleChange);
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 ASSERT(m_transitions.contains(id)); 382 ASSERT(m_transitions.contains(id));
383 383
384 Animation* animation = m_transitions.take(id).animation; 384 Animation* animation = m_transitions.take(id).animation;
385 KeyframeEffect* effect = toKeyframeEffect(animation->effect()); 385 KeyframeEffect* effect = toKeyframeEffect(animation->effect());
386 if (effect->hasActiveAnimationsOnCompositor(id) && m_pendingUpdate.newTr ansitions().find(id) != m_pendingUpdate.newTransitions().end() && !animation->li mited()) 386 if (effect->hasActiveAnimationsOnCompositor(id) && m_pendingUpdate.newTr ansitions().find(id) != m_pendingUpdate.newTransitions().end() && !animation->li mited())
387 retargetedCompositorTransitions.add(id, std::pair<KeyframeEffect*, d ouble>(effect, animation->startTimeInternal())); 387 retargetedCompositorTransitions.add(id, std::pair<KeyframeEffect*, d ouble>(effect, animation->startTimeInternal()));
388 animation->cancel(); 388 animation->cancel();
389 // after cancelation, transitions must be downgraded or they'll fail 389 // after cancelation, transitions must be downgraded or they'll fail
390 // to be considered when retriggering themselves. This can happen if 390 // to be considered when retriggering themselves. This can happen if
391 // the transition is captured through getAnimations then played. 391 // the transition is captured through getAnimations then played.
392 if (animation->effect() && animation->effect()->isAnimation()) 392 if (animation->effect() && animation->effect()->isKeyframeEffect())
393 toKeyframeEffect(animation->effect())->downgradeToNormal(); 393 toKeyframeEffect(animation->effect())->downgradeToNormal();
394 animation->update(TimingUpdateOnDemand); 394 animation->update(TimingUpdateOnDemand);
395 } 395 }
396 396
397 for (CSSPropertyID id : m_pendingUpdate.finishedTransitions()) { 397 for (CSSPropertyID id : m_pendingUpdate.finishedTransitions()) {
398 // This transition can also be cancelled and finished at the same time 398 // This transition can also be cancelled and finished at the same time
399 if (m_transitions.contains(id)) { 399 if (m_transitions.contains(id)) {
400 Animation* animation = m_transitions.take(id).animation; 400 Animation* animation = m_transitions.take(id).animation;
401 // Transition must be downgraded 401 // Transition must be downgraded
402 if (animation->effect() && animation->effect()->isAnimation()) 402 if (animation->effect() && animation->effect()->isKeyframeEffect())
403 toKeyframeEffect(animation->effect())->downgradeToNormal(); 403 toKeyframeEffect(animation->effect())->downgradeToNormal();
404 } 404 }
405 } 405 }
406 406
407 for (const auto& entry : m_pendingUpdate.newTransitions()) { 407 for (const auto& entry : m_pendingUpdate.newTransitions()) {
408 const CSSAnimationUpdate::NewTransition& newTransition = entry.value; 408 const CSSAnimationUpdate::NewTransition& newTransition = entry.value;
409 409
410 RunningTransition runningTransition; 410 RunningTransition runningTransition;
411 runningTransition.from = newTransition.from; 411 runningTransition.from = newTransition.from;
412 runningTransition.to = newTransition.to; 412 runningTransition.to = newTransition.to;
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 { 796 {
797 visitor->trace(m_transitions); 797 visitor->trace(m_transitions);
798 visitor->trace(m_pendingUpdate); 798 visitor->trace(m_pendingUpdate);
799 visitor->trace(m_animations); 799 visitor->trace(m_animations);
800 #if ENABLE(OILPAN) 800 #if ENABLE(OILPAN)
801 visitor->trace(m_previousActiveInterpolationsForAnimations); 801 visitor->trace(m_previousActiveInterpolationsForAnimations);
802 #endif 802 #endif
803 } 803 }
804 804
805 } // namespace blink 805 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/animation/KeyframeEffect.h ('k') | Source/core/inspector/InspectorTraceEvents.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698