| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 style.setHasCurrentTransformAnimation(true); | 54 style.setHasCurrentTransformAnimation(true); |
| 55 if (effect.affects(PropertyHandle(CSSPropertyFilter))) | 55 if (effect.affects(PropertyHandle(CSSPropertyFilter))) |
| 56 style.setHasCurrentFilterAnimation(true); | 56 style.setHasCurrentFilterAnimation(true); |
| 57 if (effect.affects(PropertyHandle(CSSPropertyBackdropFilter))) | 57 if (effect.affects(PropertyHandle(CSSPropertyBackdropFilter))) |
| 58 style.setHasCurrentBackdropFilterAnimation(true); | 58 style.setHasCurrentBackdropFilterAnimation(true); |
| 59 } | 59 } |
| 60 } | 60 } |
| 61 | 61 |
| 62 if (style.hasCurrentOpacityAnimation()) { | 62 if (style.hasCurrentOpacityAnimation()) { |
| 63 style.setIsRunningOpacityAnimationOnCompositor( | 63 style.setIsRunningOpacityAnimationOnCompositor( |
| 64 m_effectStack.hasActiveAnimationsOnCompositor(CSSPropertyOpacity)); | 64 m_effectStack.hasActiveAnimationsOnCompositor( |
| 65 PropertyHandle(CSSPropertyOpacity))); |
| 65 } | 66 } |
| 66 if (style.hasCurrentTransformAnimation()) { | 67 if (style.hasCurrentTransformAnimation()) { |
| 67 style.setIsRunningTransformAnimationOnCompositor( | 68 style.setIsRunningTransformAnimationOnCompositor( |
| 68 m_effectStack.hasActiveAnimationsOnCompositor(CSSPropertyTransform)); | 69 m_effectStack.hasActiveAnimationsOnCompositor( |
| 70 PropertyHandle(CSSPropertyTransform))); |
| 69 } | 71 } |
| 70 if (style.hasCurrentFilterAnimation()) { | 72 if (style.hasCurrentFilterAnimation()) { |
| 71 style.setIsRunningFilterAnimationOnCompositor( | 73 style.setIsRunningFilterAnimationOnCompositor( |
| 72 m_effectStack.hasActiveAnimationsOnCompositor(CSSPropertyFilter)); | 74 m_effectStack.hasActiveAnimationsOnCompositor( |
| 75 PropertyHandle(CSSPropertyFilter))); |
| 73 } | 76 } |
| 74 if (style.hasCurrentBackdropFilterAnimation()) { | 77 if (style.hasCurrentBackdropFilterAnimation()) { |
| 75 style.setIsRunningBackdropFilterAnimationOnCompositor( | 78 style.setIsRunningBackdropFilterAnimationOnCompositor( |
| 76 m_effectStack.hasActiveAnimationsOnCompositor( | 79 m_effectStack.hasActiveAnimationsOnCompositor( |
| 77 CSSPropertyBackdropFilter)); | 80 PropertyHandle(CSSPropertyBackdropFilter))); |
| 78 } | 81 } |
| 79 } | 82 } |
| 80 | 83 |
| 81 void ElementAnimations::restartAnimationOnCompositor() { | 84 void ElementAnimations::restartAnimationOnCompositor() { |
| 82 for (const auto& entry : m_animations) | 85 for (const auto& entry : m_animations) |
| 83 entry.key->restartAnimationOnCompositor(); | 86 entry.key->restartAnimationOnCompositor(); |
| 84 } | 87 } |
| 85 | 88 |
| 86 DEFINE_TRACE(ElementAnimations) { | 89 DEFINE_TRACE(ElementAnimations) { |
| 87 visitor->trace(m_cssAnimations); | 90 visitor->trace(m_cssAnimations); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // as Font::operator== will compare versions, hence ComputedStyle::operator== | 125 // as Font::operator== will compare versions, hence ComputedStyle::operator== |
| 123 // will return false. We avoid using baseComputedStyle (the check for | 126 // will return false. We avoid using baseComputedStyle (the check for |
| 124 // isFallbackValid()) in that case to avoid triggering the ComputedStyle | 127 // isFallbackValid()) in that case to avoid triggering the ComputedStyle |
| 125 // comparison ASSERT in updateBaseComputedStyle. | 128 // comparison ASSERT in updateBaseComputedStyle. |
| 126 return m_animationStyleChange && | 129 return m_animationStyleChange && |
| 127 (!m_baseComputedStyle || | 130 (!m_baseComputedStyle || |
| 128 m_baseComputedStyle->font().isFallbackValid()); | 131 m_baseComputedStyle->font().isFallbackValid()); |
| 129 } | 132 } |
| 130 | 133 |
| 131 } // namespace blink | 134 } // namespace blink |
| OLD | NEW |