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

Side by Side Diff: Source/core/animation/ElementAnimations.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/AnimationEffect.cpp ('k') | Source/core/animation/KeyframeEffect.h » ('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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 ElementAnimations::~ElementAnimations() 43 ElementAnimations::~ElementAnimations()
44 { 44 {
45 } 45 }
46 46
47 void ElementAnimations::updateAnimationFlags(ComputedStyle& style) 47 void ElementAnimations::updateAnimationFlags(ComputedStyle& style)
48 { 48 {
49 for (const auto& entry : m_animations) { 49 for (const auto& entry : m_animations) {
50 const Animation& animation = *entry.key; 50 const Animation& animation = *entry.key;
51 ASSERT(animation.effect()); 51 ASSERT(animation.effect());
52 // FIXME: Needs to consider AnimationGroup once added. 52 // FIXME: Needs to consider AnimationGroup once added.
53 ASSERT(animation.effect()->isAnimation()); 53 ASSERT(animation.effect()->isKeyframeEffect());
54 const KeyframeEffect& effect = *toKeyframeEffect(animation.effect()); 54 const KeyframeEffect& effect = *toKeyframeEffect(animation.effect());
55 if (effect.isCurrent()) { 55 if (effect.isCurrent()) {
56 if (effect.affects(PropertyHandle(CSSPropertyOpacity))) 56 if (effect.affects(PropertyHandle(CSSPropertyOpacity)))
57 style.setHasCurrentOpacityAnimation(true); 57 style.setHasCurrentOpacityAnimation(true);
58 if (effect.affects(PropertyHandle(CSSPropertyTransform)) 58 if (effect.affects(PropertyHandle(CSSPropertyTransform))
59 || effect.affects(PropertyHandle(CSSPropertyRotate)) 59 || effect.affects(PropertyHandle(CSSPropertyRotate))
60 || effect.affects(PropertyHandle(CSSPropertyScale)) 60 || effect.affects(PropertyHandle(CSSPropertyScale))
61 || effect.affects(PropertyHandle(CSSPropertyTranslate))) 61 || effect.affects(PropertyHandle(CSSPropertyTranslate)))
62 style.setHasCurrentTransformAnimation(true); 62 style.setHasCurrentTransformAnimation(true);
63 if (effect.affects(PropertyHandle(CSSPropertyWebkitFilter))) 63 if (effect.affects(PropertyHandle(CSSPropertyWebkitFilter)))
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // TODO(rune@opera.com): The FontFaceCache version number may be increased w ithout forcing 122 // TODO(rune@opera.com): The FontFaceCache version number may be increased w ithout forcing
123 // a style recalc (see crbug.com/471079). ComputedStyle objects created with different cache 123 // a style recalc (see crbug.com/471079). ComputedStyle objects created with different cache
124 // versions will not be considered equal as Font::operator== will compare ve rsions, hence 124 // versions will not be considered equal as Font::operator== will compare ve rsions, hence
125 // ComputedStyle::operator== will return false. We avoid using baseComputedS tyle (the check for 125 // ComputedStyle::operator== will return false. We avoid using baseComputedS tyle (the check for
126 // isFallbackValid()) in that case to avoid triggering the ComputedStyle com parison ASSERT 126 // isFallbackValid()) in that case to avoid triggering the ComputedStyle com parison ASSERT
127 // in updateBaseComputedStyle. 127 // in updateBaseComputedStyle.
128 return m_animationStyleChange && (!m_baseComputedStyle || m_baseComputedStyl e->font().isFallbackValid()); 128 return m_animationStyleChange && (!m_baseComputedStyle || m_baseComputedStyl e->font().isFallbackValid());
129 } 129 }
130 130
131 } // namespace blink 131 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/animation/AnimationEffect.cpp ('k') | Source/core/animation/KeyframeEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698