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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 ASSERT(animation.effect()->isKeyframeEffect()); | 50 ASSERT(animation.effect()->isKeyframeEffect()); |
51 const KeyframeEffect& effect = *toKeyframeEffect(animation.effect()); | 51 const KeyframeEffect& effect = *toKeyframeEffect(animation.effect()); |
52 if (effect.isCurrent()) { | 52 if (effect.isCurrent()) { |
53 if (effect.affects(PropertyHandle(CSSPropertyOpacity))) | 53 if (effect.affects(PropertyHandle(CSSPropertyOpacity))) |
54 style.setHasCurrentOpacityAnimation(true); | 54 style.setHasCurrentOpacityAnimation(true); |
55 if (effect.affects(PropertyHandle(CSSPropertyTransform)) | 55 if (effect.affects(PropertyHandle(CSSPropertyTransform)) |
56 || effect.affects(PropertyHandle(CSSPropertyRotate)) | 56 || effect.affects(PropertyHandle(CSSPropertyRotate)) |
57 || effect.affects(PropertyHandle(CSSPropertyScale)) | 57 || effect.affects(PropertyHandle(CSSPropertyScale)) |
58 || effect.affects(PropertyHandle(CSSPropertyTranslate))) | 58 || effect.affects(PropertyHandle(CSSPropertyTranslate))) |
59 style.setHasCurrentTransformAnimation(true); | 59 style.setHasCurrentTransformAnimation(true); |
60 if (effect.affects(PropertyHandle(CSSPropertyWebkitFilter))) | 60 if (effect.affects(PropertyHandle(CSSPropertyFilter))) |
61 style.setHasCurrentFilterAnimation(true); | 61 style.setHasCurrentFilterAnimation(true); |
62 if (effect.affects(PropertyHandle(CSSPropertyBackdropFilter))) | 62 if (effect.affects(PropertyHandle(CSSPropertyBackdropFilter))) |
63 style.setHasCurrentBackdropFilterAnimation(true); | 63 style.setHasCurrentBackdropFilterAnimation(true); |
64 } | 64 } |
65 } | 65 } |
66 | 66 |
67 if (style.hasCurrentOpacityAnimation()) | 67 if (style.hasCurrentOpacityAnimation()) |
68 style.setIsRunningOpacityAnimationOnCompositor(m_animationStack.hasActiv
eAnimationsOnCompositor(CSSPropertyOpacity)); | 68 style.setIsRunningOpacityAnimationOnCompositor(m_animationStack.hasActiv
eAnimationsOnCompositor(CSSPropertyOpacity)); |
69 if (style.hasCurrentTransformAnimation()) | 69 if (style.hasCurrentTransformAnimation()) |
70 style.setIsRunningTransformAnimationOnCompositor(m_animationStack.hasAct
iveAnimationsOnCompositor(CSSPropertyTransform)); | 70 style.setIsRunningTransformAnimationOnCompositor(m_animationStack.hasAct
iveAnimationsOnCompositor(CSSPropertyTransform)); |
71 if (style.hasCurrentFilterAnimation()) | 71 if (style.hasCurrentFilterAnimation()) |
72 style.setIsRunningFilterAnimationOnCompositor(m_animationStack.hasActive
AnimationsOnCompositor(CSSPropertyWebkitFilter)); | 72 style.setIsRunningFilterAnimationOnCompositor(m_animationStack.hasActive
AnimationsOnCompositor(CSSPropertyFilter)); |
73 if (style.hasCurrentBackdropFilterAnimation()) | 73 if (style.hasCurrentBackdropFilterAnimation()) |
74 style.setIsRunningBackdropFilterAnimationOnCompositor(m_animationStack.h
asActiveAnimationsOnCompositor(CSSPropertyBackdropFilter)); | 74 style.setIsRunningBackdropFilterAnimationOnCompositor(m_animationStack.h
asActiveAnimationsOnCompositor(CSSPropertyBackdropFilter)); |
75 } | 75 } |
76 | 76 |
77 void ElementAnimations::restartAnimationOnCompositor() | 77 void ElementAnimations::restartAnimationOnCompositor() |
78 { | 78 { |
79 for (const auto& entry : m_animations) | 79 for (const auto& entry : m_animations) |
80 entry.key->restartAnimationOnCompositor(); | 80 entry.key->restartAnimationOnCompositor(); |
81 } | 81 } |
82 | 82 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // TODO(rune@opera.com): The FontFaceCache version number may be increased w
ithout forcing | 120 // TODO(rune@opera.com): The FontFaceCache version number may be increased w
ithout forcing |
121 // a style recalc (see crbug.com/471079). ComputedStyle objects created with
different cache | 121 // a style recalc (see crbug.com/471079). ComputedStyle objects created with
different cache |
122 // versions will not be considered equal as Font::operator== will compare ve
rsions, hence | 122 // versions will not be considered equal as Font::operator== will compare ve
rsions, hence |
123 // ComputedStyle::operator== will return false. We avoid using baseComputedS
tyle (the check for | 123 // ComputedStyle::operator== will return false. We avoid using baseComputedS
tyle (the check for |
124 // isFallbackValid()) in that case to avoid triggering the ComputedStyle com
parison ASSERT | 124 // isFallbackValid()) in that case to avoid triggering the ComputedStyle com
parison ASSERT |
125 // in updateBaseComputedStyle. | 125 // in updateBaseComputedStyle. |
126 return m_animationStyleChange && (!m_baseComputedStyle || m_baseComputedStyl
e->font().isFallbackValid()); | 126 return m_animationStyleChange && (!m_baseComputedStyle || m_baseComputedStyl
e->font().isFallbackValid()); |
127 } | 127 } |
128 | 128 |
129 } // namespace blink | 129 } // namespace blink |
OLD | NEW |