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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |