| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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(CSSPropertyTransform)) |
| 64 || effect.affects(PropertyHandle(CSSPropertyRotate)) | 64 || effect.affects(PropertyHandle(CSSPropertyRotate)) |
| 65 || effect.affects(PropertyHandle(CSSPropertyScale)) | 65 || effect.affects(PropertyHandle(CSSPropertyScale)) |
| 66 || effect.affects(PropertyHandle(CSSPropertyTranslate))) | 66 || effect.affects(PropertyHandle(CSSPropertyTranslate))) |
| 67 style.setHasCurrentTransformAnimation(true); | 67 style.setHasCurrentTransformAnimation(true); |
| 68 if (effect.affects(PropertyHandle(CSSPropertyWebkitFilter))) | 68 if (effect.affects(PropertyHandle(CSSPropertyWebkitFilter))) |
| 69 style.setHasCurrentFilterAnimation(true); | 69 style.setHasCurrentFilterAnimation(true); |
| 70 if (effect.affects(PropertyHandle(CSSPropertyBackdropFilter))) |
| 71 style.setHasCurrentBackdropFilterAnimation(true); |
| 70 } | 72 } |
| 71 } | 73 } |
| 72 | 74 |
| 73 if (style.hasCurrentOpacityAnimation()) | 75 if (style.hasCurrentOpacityAnimation()) |
| 74 style.setIsRunningOpacityAnimationOnCompositor(m_defaultStack.hasActiveA
nimationsOnCompositor(CSSPropertyOpacity)); | 76 style.setIsRunningOpacityAnimationOnCompositor(m_defaultStack.hasActiveA
nimationsOnCompositor(CSSPropertyOpacity)); |
| 75 if (style.hasCurrentTransformAnimation()) | 77 if (style.hasCurrentTransformAnimation()) |
| 76 style.setIsRunningTransformAnimationOnCompositor(m_defaultStack.hasActiv
eAnimationsOnCompositor(CSSPropertyTransform)); | 78 style.setIsRunningTransformAnimationOnCompositor(m_defaultStack.hasActiv
eAnimationsOnCompositor(CSSPropertyTransform)); |
| 77 if (style.hasCurrentFilterAnimation()) | 79 if (style.hasCurrentFilterAnimation()) |
| 78 style.setIsRunningFilterAnimationOnCompositor(m_defaultStack.hasActiveAn
imationsOnCompositor(CSSPropertyWebkitFilter)); | 80 style.setIsRunningFilterAnimationOnCompositor(m_defaultStack.hasActiveAn
imationsOnCompositor(CSSPropertyWebkitFilter)); |
| 81 if (style.hasCurrentBackdropFilterAnimation()) |
| 82 style.setIsRunningBackdropFilterAnimationOnCompositor(m_defaultStack.has
ActiveAnimationsOnCompositor(CSSPropertyBackdropFilter)); |
| 79 } | 83 } |
| 80 | 84 |
| 81 void ElementAnimations::restartAnimationOnCompositor() | 85 void ElementAnimations::restartAnimationOnCompositor() |
| 82 { | 86 { |
| 83 for (const auto& entry : m_animations) | 87 for (const auto& entry : m_animations) |
| 84 entry.key->restartAnimationOnCompositor(); | 88 entry.key->restartAnimationOnCompositor(); |
| 85 } | 89 } |
| 86 | 90 |
| 87 DEFINE_TRACE(ElementAnimations) | 91 DEFINE_TRACE(ElementAnimations) |
| 88 { | 92 { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 // TODO(rune@opera.com): The FontFaceCache version number may be increased w
ithout forcing | 129 // TODO(rune@opera.com): The FontFaceCache version number may be increased w
ithout forcing |
| 126 // a style recalc (see crbug.com/471079). ComputedStyle objects created with
different cache | 130 // a style recalc (see crbug.com/471079). ComputedStyle objects created with
different cache |
| 127 // versions will not be considered equal as Font::operator== will compare ve
rsions, hence | 131 // versions will not be considered equal as Font::operator== will compare ve
rsions, hence |
| 128 // ComputedStyle::operator== will return false. We avoid using baseComputedS
tyle (the check for | 132 // ComputedStyle::operator== will return false. We avoid using baseComputedS
tyle (the check for |
| 129 // isFallbackValid()) in that case to avoid triggering the ComputedStyle com
parison ASSERT | 133 // isFallbackValid()) in that case to avoid triggering the ComputedStyle com
parison ASSERT |
| 130 // in updateBaseComputedStyle. | 134 // in updateBaseComputedStyle. |
| 131 return m_animationStyleChange && (!m_baseComputedStyle || m_baseComputedStyl
e->font().isFallbackValid()); | 135 return m_animationStyleChange && (!m_baseComputedStyle || m_baseComputedStyl
e->font().isFallbackValid()); |
| 132 } | 136 } |
| 133 | 137 |
| 134 } // namespace blink | 138 } // namespace blink |
| OLD | NEW |