Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(495)

Side by Side Diff: third_party/WebKit/Source/core/animation/ElementAnimations.cpp

Issue 2522823002: Blink Animation: Rename AnimationStack to EffectStack. (Closed)
Patch Set: Rename getter and data (and locals) Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 effect.affects(PropertyHandle(CSSPropertyScale)) || 52 effect.affects(PropertyHandle(CSSPropertyScale)) ||
53 effect.affects(PropertyHandle(CSSPropertyTranslate))) 53 effect.affects(PropertyHandle(CSSPropertyTranslate)))
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_animationStack.hasActiveAnimationsOnCompositor(CSSPropertyOpacity)); 64 m_effectStack.hasActiveAnimationsOnCompositor(CSSPropertyOpacity));
65 if (style.hasCurrentTransformAnimation()) 65 }
66 if (style.hasCurrentTransformAnimation()) {
66 style.setIsRunningTransformAnimationOnCompositor( 67 style.setIsRunningTransformAnimationOnCompositor(
67 m_animationStack.hasActiveAnimationsOnCompositor(CSSPropertyTransform)); 68 m_effectStack.hasActiveAnimationsOnCompositor(CSSPropertyTransform));
68 if (style.hasCurrentFilterAnimation()) 69 }
70 if (style.hasCurrentFilterAnimation()) {
69 style.setIsRunningFilterAnimationOnCompositor( 71 style.setIsRunningFilterAnimationOnCompositor(
70 m_animationStack.hasActiveAnimationsOnCompositor(CSSPropertyFilter)); 72 m_effectStack.hasActiveAnimationsOnCompositor(CSSPropertyFilter));
71 if (style.hasCurrentBackdropFilterAnimation()) 73 }
74 if (style.hasCurrentBackdropFilterAnimation()) {
72 style.setIsRunningBackdropFilterAnimationOnCompositor( 75 style.setIsRunningBackdropFilterAnimationOnCompositor(
73 m_animationStack.hasActiveAnimationsOnCompositor( 76 m_effectStack.hasActiveAnimationsOnCompositor(
74 CSSPropertyBackdropFilter)); 77 CSSPropertyBackdropFilter));
78 }
75 } 79 }
76 80
77 void ElementAnimations::restartAnimationOnCompositor() { 81 void ElementAnimations::restartAnimationOnCompositor() {
78 for (const auto& entry : m_animations) 82 for (const auto& entry : m_animations)
79 entry.key->restartAnimationOnCompositor(); 83 entry.key->restartAnimationOnCompositor();
80 } 84 }
81 85
82 DEFINE_TRACE(ElementAnimations) { 86 DEFINE_TRACE(ElementAnimations) {
83 visitor->trace(m_cssAnimations); 87 visitor->trace(m_cssAnimations);
84 visitor->trace(m_customCompositorAnimations); 88 visitor->trace(m_customCompositorAnimations);
85 visitor->trace(m_animationStack); 89 visitor->trace(m_effectStack);
86 visitor->trace(m_animations); 90 visitor->trace(m_animations);
87 } 91 }
88 92
89 const ComputedStyle* ElementAnimations::baseComputedStyle() const { 93 const ComputedStyle* ElementAnimations::baseComputedStyle() const {
90 #if !DCHECK_IS_ON() 94 #if !DCHECK_IS_ON()
91 if (isAnimationStyleChange()) 95 if (isAnimationStyleChange())
92 return m_baseComputedStyle.get(); 96 return m_baseComputedStyle.get();
93 #endif 97 #endif
94 return nullptr; 98 return nullptr;
95 } 99 }
(...skipping 22 matching lines...) Expand all
118 // as Font::operator== will compare versions, hence ComputedStyle::operator== 122 // as Font::operator== will compare versions, hence ComputedStyle::operator==
119 // will return false. We avoid using baseComputedStyle (the check for 123 // will return false. We avoid using baseComputedStyle (the check for
120 // isFallbackValid()) in that case to avoid triggering the ComputedStyle 124 // isFallbackValid()) in that case to avoid triggering the ComputedStyle
121 // comparison ASSERT in updateBaseComputedStyle. 125 // comparison ASSERT in updateBaseComputedStyle.
122 return m_animationStyleChange && 126 return m_animationStyleChange &&
123 (!m_baseComputedStyle || 127 (!m_baseComputedStyle ||
124 m_baseComputedStyle->font().isFallbackValid()); 128 m_baseComputedStyle->font().isFallbackValid());
125 } 129 }
126 130
127 } // namespace blink 131 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698