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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 const ComputedStyle&, | 71 const ComputedStyle&, |
72 ComputedStyle* parentStyle, | 72 ComputedStyle* parentStyle, |
73 StyleResolver*); | 73 StyleResolver*); |
74 static void calculateCompositorAnimationUpdate( | 74 static void calculateCompositorAnimationUpdate( |
75 CSSAnimationUpdate&, | 75 CSSAnimationUpdate&, |
76 const Element* animatingElement, | 76 const Element* animatingElement, |
77 Element&, | 77 Element&, |
78 const ComputedStyle&, | 78 const ComputedStyle&, |
79 const ComputedStyle* parentStyle, | 79 const ComputedStyle* parentStyle, |
80 bool wasViewportChanged); | 80 bool wasViewportChanged); |
| 81 enum class PropertyPass { Custom, Standard }; |
81 static void calculateTransitionUpdate(CSSAnimationUpdate&, | 82 static void calculateTransitionUpdate(CSSAnimationUpdate&, |
| 83 PropertyPass, |
82 const Element* animatingElement, | 84 const Element* animatingElement, |
83 const ComputedStyle&); | 85 const ComputedStyle&); |
84 static void snapshotCompositorKeyframes(Element&, | 86 static void snapshotCompositorKeyframes(Element&, |
85 CSSAnimationUpdate&, | 87 CSSAnimationUpdate&, |
86 const ComputedStyle&, | 88 const ComputedStyle&, |
87 const ComputedStyle* parentStyle); | 89 const ComputedStyle* parentStyle); |
88 | 90 |
89 void setPendingUpdate(const CSSAnimationUpdate& update) { | 91 void setPendingUpdate(const CSSAnimationUpdate& update) { |
90 clearPendingUpdate(); | 92 clearPendingUpdate(); |
91 m_pendingUpdate.copy(update); | 93 m_pendingUpdate.copy(update); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 | 156 |
155 ActiveInterpolationsMap m_previousActiveInterpolationsForAnimations; | 157 ActiveInterpolationsMap m_previousActiveInterpolationsForAnimations; |
156 | 158 |
157 struct TransitionUpdateState { | 159 struct TransitionUpdateState { |
158 STACK_ALLOCATED(); | 160 STACK_ALLOCATED(); |
159 CSSAnimationUpdate& update; | 161 CSSAnimationUpdate& update; |
160 Member<const Element> animatingElement; | 162 Member<const Element> animatingElement; |
161 const ComputedStyle& oldStyle; | 163 const ComputedStyle& oldStyle; |
162 const ComputedStyle& style; | 164 const ComputedStyle& style; |
163 const TransitionMap* activeTransitions; | 165 const TransitionMap* activeTransitions; |
164 std::bitset<numCSSProperties> listedProperties; | 166 HashSet<PropertyHandle>& listedProperties; |
165 const CSSTransitionData& transitionData; | 167 const CSSTransitionData& transitionData; |
166 }; | 168 }; |
167 | 169 |
| 170 static void calculateTransitionUpdateForCustomProperty( |
| 171 TransitionUpdateState&, |
| 172 const CSSTransitionData::TransitionProperty&, |
| 173 size_t transitionIndex); |
| 174 |
168 static void calculateTransitionUpdateForStandardProperty( | 175 static void calculateTransitionUpdateForStandardProperty( |
169 TransitionUpdateState&, | 176 TransitionUpdateState&, |
170 const CSSTransitionData::TransitionProperty&, | 177 const CSSTransitionData::TransitionProperty&, |
171 size_t transitionIndex); | 178 size_t transitionIndex); |
172 | 179 |
173 static void calculateTransitionUpdateForProperty(TransitionUpdateState&, | 180 static void calculateTransitionUpdateForProperty(TransitionUpdateState&, |
174 const PropertyHandle&, | 181 const PropertyHandle&, |
175 size_t transitionIndex); | 182 size_t transitionIndex); |
176 | 183 |
177 static void calculateAnimationActiveInterpolations( | 184 static void calculateAnimationActiveInterpolations( |
178 CSSAnimationUpdate&, | 185 CSSAnimationUpdate&, |
179 const Element* animatingElement); | 186 const Element* animatingElement); |
180 static void calculateTransitionActiveInterpolations( | 187 static void calculateTransitionActiveInterpolations( |
181 CSSAnimationUpdate&, | 188 CSSAnimationUpdate&, |
| 189 PropertyPass, |
182 const Element* animatingElement); | 190 const Element* animatingElement); |
183 | 191 |
184 class AnimationEventDelegate final | 192 class AnimationEventDelegate final |
185 : public AnimationEffectReadOnly::EventDelegate { | 193 : public AnimationEffectReadOnly::EventDelegate { |
186 public: | 194 public: |
187 AnimationEventDelegate(Element* animationTarget, const AtomicString& name) | 195 AnimationEventDelegate(Element* animationTarget, const AtomicString& name) |
188 : m_animationTarget(animationTarget), | 196 : m_animationTarget(animationTarget), |
189 m_name(name), | 197 m_name(name), |
190 m_previousPhase(AnimationEffectReadOnly::PhaseNone), | 198 m_previousPhase(AnimationEffectReadOnly::PhaseNone), |
191 m_previousIteration(nullValue()) {} | 199 m_previousIteration(nullValue()) {} |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 | 237 |
230 Member<Element> m_transitionTarget; | 238 Member<Element> m_transitionTarget; |
231 PropertyHandle m_property; | 239 PropertyHandle m_property; |
232 AnimationEffectReadOnly::Phase m_previousPhase; | 240 AnimationEffectReadOnly::Phase m_previousPhase; |
233 }; | 241 }; |
234 }; | 242 }; |
235 | 243 |
236 } // namespace blink | 244 } // namespace blink |
237 | 245 |
238 #endif | 246 #endif |
OLD | NEW |