Chromium Code Reviews| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 { | 53 { |
| 54 for (const auto& entry : m_animations) { | 54 for (const auto& entry : m_animations) { |
| 55 const Animation& animation = *entry.key; | 55 const Animation& animation = *entry.key; |
| 56 ASSERT(animation.source()); | 56 ASSERT(animation.source()); |
| 57 // FIXME: Needs to consider AnimationGroup once added. | 57 // FIXME: Needs to consider AnimationGroup once added. |
| 58 ASSERT(animation.source()->isAnimation()); | 58 ASSERT(animation.source()->isAnimation()); |
| 59 const KeyframeEffect& effect = *toKeyframeEffect(animation.source()); | 59 const KeyframeEffect& effect = *toKeyframeEffect(animation.source()); |
| 60 if (effect.isCurrent()) { | 60 if (effect.isCurrent()) { |
| 61 if (effect.affects(PropertyHandle(CSSPropertyOpacity))) | 61 if (effect.affects(PropertyHandle(CSSPropertyOpacity))) |
| 62 style.setHasCurrentOpacityAnimation(true); | 62 style.setHasCurrentOpacityAnimation(true); |
| 63 if (effect.affects(PropertyHandle(CSSPropertyTransform))) | 63 if (effect.affects(PropertyHandle(CSSPropertyRotate)) |
| 64 || effect.affects(PropertyHandle(CSSPropertyScale)) | |
| 65 || effect.affects(PropertyHandle(CSSPropertyTransform)) | |
|
dstockwell
2015/07/03 01:58:40
transform first
soonm
2015/07/03 06:34:29
Done.
| |
| 66 || effect.affects(PropertyHandle(CSSPropertyTranslate))) | |
| 64 style.setHasCurrentTransformAnimation(true); | 67 style.setHasCurrentTransformAnimation(true); |
| 65 if (effect.affects(PropertyHandle(CSSPropertyWebkitFilter))) | 68 if (effect.affects(PropertyHandle(CSSPropertyWebkitFilter))) |
| 66 style.setHasCurrentFilterAnimation(true); | 69 style.setHasCurrentFilterAnimation(true); |
| 67 } | 70 } |
| 68 } | 71 } |
| 69 | 72 |
| 70 if (style.hasCurrentOpacityAnimation()) | 73 if (style.hasCurrentOpacityAnimation()) |
| 71 style.setIsRunningOpacityAnimationOnCompositor(m_defaultStack.hasActiveA nimationsOnCompositor(CSSPropertyOpacity)); | 74 style.setIsRunningOpacityAnimationOnCompositor(m_defaultStack.hasActiveA nimationsOnCompositor(CSSPropertyOpacity)); |
| 72 if (style.hasCurrentTransformAnimation()) | 75 if (style.hasCurrentTransformAnimation()) |
| 73 style.setIsRunningTransformAnimationOnCompositor(m_defaultStack.hasActiv eAnimationsOnCompositor(CSSPropertyTransform)); | 76 style.setIsRunningTransformAnimationOnCompositor(m_defaultStack.hasActiv eAnimationsOnCompositor(CSSPropertyTransform)); |
| (...skipping 48 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 | 125 // 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 | 126 // 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 | 127 // 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 | 128 // 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 | 129 // isFallbackValid()) in that case to avoid triggering the ComputedStyle com parison ASSERT |
| 127 // in updateBaseComputedStyle. | 130 // in updateBaseComputedStyle. |
| 128 return m_animationStyleChange && (!m_baseComputedStyle || m_baseComputedStyl e->font().isFallbackValid()); | 131 return m_animationStyleChange && (!m_baseComputedStyle || m_baseComputedStyl e->font().isFallbackValid()); |
| 129 } | 132 } |
| 130 | 133 |
| 131 } // namespace blink | 134 } // namespace blink |
| OLD | NEW |