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

Side by Side Diff: Source/core/animation/css/CSSAnimations.cpp

Issue 814083003: Update animation when changes in animation keyframes are detected. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 11 months 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 break; 81 break;
82 } 82 }
83 return property; 83 return property;
84 } 84 }
85 85
86 static void resolveKeyframes(StyleResolver* resolver, const Element* animatingEl ement, Element& element, const RenderStyle& style, RenderStyle* parentStyle, con st AtomicString& name, TimingFunction* defaultTimingFunction, 86 static void resolveKeyframes(StyleResolver* resolver, const Element* animatingEl ement, Element& element, const RenderStyle& style, RenderStyle* parentStyle, con st AtomicString& name, TimingFunction* defaultTimingFunction,
87 AnimatableValueKeyframeVector& keyframes) 87 AnimatableValueKeyframeVector& keyframes)
88 { 88 {
89 // When the animating element is null, use its parent for scoping purposes. 89 // When the animating element is null, use its parent for scoping purposes.
90 const Element* elementForScoping = animatingElement ? animatingElement : &el ement; 90 const Element* elementForScoping = animatingElement ? animatingElement : &el ement;
91 const StyleRuleKeyframes* keyframesRule = resolver->findKeyframesRule(elemen tForScoping, name); 91 const StyleRuleKeyframes* keyframesRule = resolver->findKeyframesRule(elemen tForScoping, name).get();
92 if (!keyframesRule) 92 if (!keyframesRule)
93 return; 93 return;
94 94
95 const WillBeHeapVector<RefPtrWillBeMember<StyleRuleKeyframe>>& styleKeyframe s = keyframesRule->keyframes(); 95 const WillBeHeapVector<RefPtrWillBeMember<StyleRuleKeyframe>>& styleKeyframe s = keyframesRule->keyframes();
96 96
97 // Construct and populate the style for each keyframe 97 // Construct and populate the style for each keyframe
98 PropertySet specifiedPropertiesForUseCounter; 98 PropertySet specifiedPropertiesForUseCounter;
99 for (size_t i = 0; i < styleKeyframes.size(); ++i) { 99 for (size_t i = 0; i < styleKeyframes.size(); ++i) {
100 const StyleRuleKeyframe* styleKeyframe = styleKeyframes[i].get(); 100 const StyleRuleKeyframe* styleKeyframe = styleKeyframes[i].get();
101 RefPtr<RenderStyle> keyframeStyle = resolver->styleForKeyframe(element, style, parentStyle, styleKeyframe, name); 101 RefPtr<RenderStyle> keyframeStyle = resolver->styleForKeyframe(element, style, parentStyle, styleKeyframe, name);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 } // namespace 200 } // namespace
201 201
202 CSSAnimations::CSSAnimations() 202 CSSAnimations::CSSAnimations()
203 { 203 {
204 } 204 }
205 205
206 const AtomicString CSSAnimations::getAnimationNameForInspector(const AnimationPl ayer& player) 206 const AtomicString CSSAnimations::getAnimationNameForInspector(const AnimationPl ayer& player)
207 { 207 {
208 for (const auto& it : m_animations) { 208 for (const auto& it : m_animations) {
209 if (it.value->sequenceNumber() == player.sequenceNumber()) 209 if (it.value.player->sequenceNumber() == player.sequenceNumber())
210 return it.key; 210 return it.key;
211 } 211 }
212 return nullAtom; 212 return nullAtom;
213 } 213 }
214 214
215 PassOwnPtrWillBeRawPtr<CSSAnimationUpdate> CSSAnimations::calculateUpdate(const Element* animatingElement, Element& element, const RenderStyle& style, RenderSty le* parentStyle, StyleResolver* resolver) 215 PassOwnPtrWillBeRawPtr<CSSAnimationUpdate> CSSAnimations::calculateUpdate(const Element* animatingElement, Element& element, const RenderStyle& style, RenderSty le* parentStyle, StyleResolver* resolver)
216 { 216 {
217 OwnPtrWillBeRawPtr<CSSAnimationUpdate> update = adoptPtrWillBeNoop(new CSSAn imationUpdate()); 217 OwnPtrWillBeRawPtr<CSSAnimationUpdate> update = adoptPtrWillBeNoop(new CSSAn imationUpdate());
218 calculateAnimationUpdate(update.get(), animatingElement, element, style, par entStyle, resolver); 218 calculateAnimationUpdate(update.get(), animatingElement, element, style, par entStyle, resolver);
219 calculateAnimationActiveInterpolations(update.get(), animatingElement, eleme nt.document().timeline().currentTimeInternal()); 219 calculateAnimationActiveInterpolations(update.get(), animatingElement, eleme nt.document().timeline().currentTimeInternal());
220 calculateTransitionUpdate(update.get(), animatingElement, style); 220 calculateTransitionUpdate(update.get(), animatingElement, style);
221 calculateTransitionActiveInterpolations(update.get(), animatingElement, elem ent.document().timeline().currentTimeInternal()); 221 calculateTransitionActiveInterpolations(update.get(), animatingElement, elem ent.document().timeline().currentTimeInternal());
222 return update->isEmpty() ? nullptr : update.release(); 222 return update->isEmpty() ? nullptr : update.release();
223 } 223 }
224 224
225 void CSSAnimations::calculateAnimationUpdate(CSSAnimationUpdate* update, const E lement* animatingElement, Element& element, const RenderStyle& style, RenderStyl e* parentStyle, StyleResolver* resolver) 225 void CSSAnimations::calculateAnimationUpdate(CSSAnimationUpdate* update, const E lement* animatingElement, Element& element, const RenderStyle& style, RenderStyl e* parentStyle, StyleResolver* resolver)
226 { 226 {
227 const ActiveAnimations* activeAnimations = animatingElement ? animatingEleme nt->activeAnimations() : nullptr; 227 const ActiveAnimations* activeAnimations = animatingElement ? animatingEleme nt->activeAnimations() : nullptr;
228 228
229 #if !ENABLE(ASSERT) 229 #if !ENABLE(ASSERT)
230 // If we're in an animation style change, no animations can have started, be en cancelled or changed play state. 230 // If we're in an animation style change, no animations can have started, be en cancelled or changed play state.
231 // When ASSERT is enabled, we verify this optimization. 231 // When ASSERT is enabled, we verify this optimization.
232 if (activeAnimations && activeAnimations->isAnimationStyleChange()) 232 if (activeAnimations && activeAnimations->isAnimationStyleChange())
233 return; 233 return;
234 #endif 234 #endif
235 235
236 const CSSAnimationData* animationData = style.animations(); 236 const CSSAnimationData* animationData = style.animations();
237 const CSSAnimations* cssAnimations = activeAnimations ? &activeAnimations->c ssAnimations() : nullptr; 237 const CSSAnimations* cssAnimations = activeAnimations ? &activeAnimations->c ssAnimations() : nullptr;
238 const Element* elementForScoping = animatingElement ? animatingElement : &el ement;
238 239
239 HashSet<AtomicString> inactive; 240 HashSet<AtomicString> inactive;
240 if (cssAnimations) { 241 if (cssAnimations) {
241 for (const auto& entry : cssAnimations->m_animations) 242 for (const auto& entry : cssAnimations->m_animations)
242 inactive.add(entry.key); 243 inactive.add(entry.key);
243 } 244 }
244 245
245 if (style.display() != NONE) { 246 if (style.display() != NONE) {
246 for (size_t i = 0; animationData && i < animationData->nameList().size() ; ++i) { 247 for (size_t i = 0; animationData && i < animationData->nameList().size() ; ++i) {
247 AtomicString animationName(animationData->nameList()[i]); 248 AtomicString animationName(animationData->nameList()[i]);
248 if (animationName == CSSAnimationData::initialName()) 249 if (animationName == CSSAnimationData::initialName())
249 continue; 250 continue;
250 251
251 const bool isPaused = CSSTimingData::getRepeated(animationData->play StateList(), i) == AnimPlayStatePaused; 252 const bool isPaused = CSSTimingData::getRepeated(animationData->play StateList(), i) == AnimPlayStatePaused;
252 253
253 Timing timing = animationData->convertToTiming(i); 254 Timing timing = animationData->convertToTiming(i);
255 Timing specifiedTiming = timing;
254 RefPtr<TimingFunction> keyframeTimingFunction = timing.timingFunctio n; 256 RefPtr<TimingFunction> keyframeTimingFunction = timing.timingFunctio n;
255 timing.timingFunction = Timing::defaults().timingFunction; 257 timing.timingFunction = Timing::defaults().timingFunction;
256 258
259 RefPtrWillBeRawPtr<StyleRuleKeyframes> keyframesRule = resolver->fin dKeyframesRule(elementForScoping, animationName);
260 if (!keyframesRule)
261 continue; // Cancel the animation if there's no style rule for i t.
262
257 if (cssAnimations) { 263 if (cssAnimations) {
258 AnimationMap::const_iterator existing(cssAnimations->m_animation s.find(animationName)); 264 AnimationMap::const_iterator existing(cssAnimations->m_animation s.find(animationName));
259 if (existing != cssAnimations->m_animations.end()) { 265 if (existing != cssAnimations->m_animations.end()) {
260 inactive.remove(animationName); 266 inactive.remove(animationName);
261 267
262 AnimationPlayer* player = existing->value.get(); 268 const RunningAnimation& runningAnimation = existing->value;
269 AnimationPlayer* player = runningAnimation.player.get();
263 270
264 // FIXME: Should handle changes in the timing function. 271 ASSERT(keyframesRule);
265 if (timing != player->source()->specifiedTiming()) { 272 if (keyframesRule != runningAnimation.styleRule || keyframes Rule->styleChangeCounter() != runningAnimation.styleChangeCounter || runningAnim ation.specifiedTiming != specifiedTiming) {
266 ASSERT(!activeAnimations || !activeAnimations->isAnimati onStyleChange());
267
268 AnimatableValueKeyframeVector resolvedKeyframes; 273 AnimatableValueKeyframeVector resolvedKeyframes;
269 resolveKeyframes(resolver, animatingElement, element, st yle, parentStyle, animationName, keyframeTimingFunction.get(), resolvedKeyframes ); 274 resolveKeyframes(resolver, animatingElement, element, st yle, parentStyle, animationName, keyframeTimingFunction.get(), resolvedKeyframes );
270 275
271 update->updateAnimationTiming(player, InertAnimation::cr eate(AnimatableValueKeyframeEffectModel::create(resolvedKeyframes), 276 update->updateAnimation(animationName, player, InertAnim ation::create(AnimatableValueKeyframeEffectModel::create(resolvedKeyframes),
272 timing, isPaused, player->currentTimeInternal()), ti ming); 277 timing, isPaused, player->currentTimeInternal()), sp ecifiedTiming, keyframesRule);
273 } 278 }
274 279
275 if (isPaused != player->paused()) { 280 if (isPaused != player->paused()) {
276 ASSERT(!activeAnimations || !activeAnimations->isAnimati onStyleChange()); 281 ASSERT(!activeAnimations || !activeAnimations->isAnimati onStyleChange());
277 update->toggleAnimationPaused(animationName); 282 update->toggleAnimationPaused(animationName);
278 } 283 }
279 284
280 continue; 285 continue;
281 } 286 }
282 } 287 }
283 288
284 AnimatableValueKeyframeVector resolvedKeyframes; 289 AnimatableValueKeyframeVector resolvedKeyframes;
285 resolveKeyframes(resolver, animatingElement, element, style, parentS tyle, animationName, keyframeTimingFunction.get(), resolvedKeyframes); 290 resolveKeyframes(resolver, animatingElement, element, style, parentS tyle, animationName, keyframeTimingFunction.get(), resolvedKeyframes);
286 if (!resolvedKeyframes.isEmpty()) { 291 if (!resolvedKeyframes.isEmpty()) {
287 ASSERT(!activeAnimations || !activeAnimations->isAnimationStyleC hange()); 292 ASSERT(!activeAnimations || !activeAnimations->isAnimationStyleC hange());
288 update->startAnimation(animationName, InertAnimation::create(Ani matableValueKeyframeEffectModel::create(resolvedKeyframes), timing, isPaused, 0) ); 293 update->startAnimation(animationName, InertAnimation::create(Ani matableValueKeyframeEffectModel::create(resolvedKeyframes), timing, isPaused, 0) , specifiedTiming, keyframesRule);
289 } 294 }
290 } 295 }
291 } 296 }
292 297
293 ASSERT(inactive.isEmpty() || cssAnimations); 298 ASSERT(inactive.isEmpty() || cssAnimations);
294 for (const AtomicString& animationName : inactive) { 299 for (const AtomicString& animationName : inactive) {
295 ASSERT(!activeAnimations || !activeAnimations->isAnimationStyleChange()) ; 300 ASSERT(!activeAnimations || !activeAnimations->isAnimationStyleChange()) ;
296 update->cancelAnimation(animationName, *cssAnimations->m_animations.get( animationName)); 301 update->cancelAnimation(animationName, *cssAnimations->m_animations.get( animationName).player);
297 } 302 }
298 } 303 }
299 304
300 void CSSAnimations::maybeApplyPendingUpdate(Element* element) 305 void CSSAnimations::maybeApplyPendingUpdate(Element* element)
301 { 306 {
302 if (!m_pendingUpdate) { 307 if (!m_pendingUpdate) {
303 m_previousActiveInterpolationsForAnimations.clear(); 308 m_previousActiveInterpolationsForAnimations.clear();
304 return; 309 return;
305 } 310 }
306 311
307 OwnPtrWillBeRawPtr<CSSAnimationUpdate> update = m_pendingUpdate.release(); 312 OwnPtrWillBeRawPtr<CSSAnimationUpdate> update = m_pendingUpdate.release();
308 313
309 m_previousActiveInterpolationsForAnimations.swap(update->activeInterpolation sForAnimations()); 314 m_previousActiveInterpolationsForAnimations.swap(update->activeInterpolation sForAnimations());
310 315
311 // FIXME: cancelling, pausing, unpausing animations all query compositingSta te, which is not necessarily up to date here 316 // FIXME: cancelling, pausing, unpausing animations all query compositingSta te, which is not necessarily up to date here
312 // since we call this from recalc style. 317 // since we call this from recalc style.
313 // https://code.google.com/p/chromium/issues/detail?id=339847 318 // https://code.google.com/p/chromium/issues/detail?id=339847
314 DisableCompositingQueryAsserts disabler; 319 DisableCompositingQueryAsserts disabler;
315 320
316 for (const AtomicString& animationName : update->cancelledAnimationNames()) { 321 for (const AtomicString& animationName : update->cancelledAnimationNames()) {
317 RefPtrWillBeRawPtr<AnimationPlayer> player = m_animations.take(animation Name); 322 RefPtrWillBeRawPtr<AnimationPlayer> player = m_animations.take(animation Name).player;
318 player->cancel(); 323 player->cancel();
319 player->update(TimingUpdateOnDemand); 324 player->update(TimingUpdateOnDemand);
320 } 325 }
321 326
322 for (const AtomicString& animationName : update->animationsWithPauseToggled( )) { 327 for (const AtomicString& animationName : update->animationsWithPauseToggled( )) {
323 AnimationPlayer* player = m_animations.get(animationName); 328 AnimationPlayer* player = m_animations.get(animationName).player.get();
324 if (player->paused()) 329 if (player->paused())
325 player->unpause(); 330 player->unpause();
326 else 331 else
327 player->pause(); 332 player->pause();
328 if (player->outdated()) 333 if (player->outdated())
329 player->update(TimingUpdateOnDemand); 334 player->update(TimingUpdateOnDemand);
330 } 335 }
331 336
332 for (const auto& timingUpdate : update->animationsWithTimingUpdates()) { 337 for (const auto& entry : update->animationsWithUpdates()) {
333 timingUpdate.player->source()->updateSpecifiedTiming(timingUpdate.newTim ing); 338 Animation* animation = toAnimation(entry.player->source());
334 timingUpdate.player->update(TimingUpdateOnDemand); 339
340 animation->setEffect(entry.animation->effect());
341 animation->updateSpecifiedTiming(entry.animation->specifiedTiming());
342
343 auto& runningAnimation = m_animations.find(entry.name)->value;
344 runningAnimation.styleRule = entry.styleRule;
345 runningAnimation.styleChangeCounter = entry.styleChangeCounter;
346 runningAnimation.specifiedTiming = entry.specifiedTiming;
335 } 347 }
336 348
337 for (const auto& entry : update->newAnimations()) { 349 for (const auto& entry : update->newAnimations()) {
338 const InertAnimation* inertAnimation = entry.animation.get(); 350 const InertAnimation* inertAnimation = entry.animation.get();
339 OwnPtrWillBeRawPtr<AnimationEventDelegate> eventDelegate = adoptPtrWillB eNoop(new AnimationEventDelegate(element, entry.name)); 351 OwnPtrWillBeRawPtr<AnimationEventDelegate> eventDelegate = adoptPtrWillB eNoop(new AnimationEventDelegate(element, entry.name));
340 RefPtrWillBeRawPtr<Animation> animation = Animation::create(element, ine rtAnimation->effect(), inertAnimation->specifiedTiming(), Animation::DefaultPrio rity, eventDelegate.release()); 352 RefPtrWillBeRawPtr<Animation> animation = Animation::create(element, ine rtAnimation->effect(), inertAnimation->specifiedTiming(), Animation::DefaultPrio rity, eventDelegate.release());
341 animation->setName(inertAnimation->name()); 353 animation->setName(inertAnimation->name());
342 RefPtrWillBeRawPtr<AnimationPlayer> player = element->document().timelin e().createAnimationPlayer(animation.get()); 354 RefPtrWillBeRawPtr<AnimationPlayer> player = element->document().timelin e().createAnimationPlayer(animation.get());
343 if (inertAnimation->paused()) 355 if (inertAnimation->paused())
344 player->pause(); 356 player->pause();
345 player->update(TimingUpdateOnDemand); 357 player->update(TimingUpdateOnDemand);
346 m_animations.set(entry.name, player.get()); 358
359 RunningAnimation runningAnimation;
360 runningAnimation.player = player;
361 runningAnimation.specifiedTiming = entry.timing;
362 runningAnimation.styleRule = entry.styleRule;
363 runningAnimation.styleChangeCounter = entry.styleChangeCounter;
364
365 m_animations.set(entry.name, runningAnimation);
347 } 366 }
348 367
349 // Transitions that are run on the compositor only update main-thread state 368 // Transitions that are run on the compositor only update main-thread state
350 // lazily. However, we need the new state to know what the from state shoud 369 // lazily. However, we need the new state to know what the from state shoud
351 // be when transitions are retargeted. Instead of triggering complete style 370 // be when transitions are retargeted. Instead of triggering complete style
352 // recalculation, we find these cases by searching for new transitions that 371 // recalculation, we find these cases by searching for new transitions that
353 // have matching cancelled animation property IDs on the compositor. 372 // have matching cancelled animation property IDs on the compositor.
354 WillBeHeapHashMap<CSSPropertyID, std::pair<RefPtrWillBeMember<Animation>, do uble>> retargetedCompositorTransitions; 373 WillBeHeapHashMap<CSSPropertyID, std::pair<RefPtrWillBeMember<Animation>, do uble>> retargetedCompositorTransitions;
355 for (CSSPropertyID id : update->cancelledTransitions()) { 374 for (CSSPropertyID id : update->cancelledTransitions()) {
356 ASSERT(m_transitions.contains(id)); 375 ASSERT(m_transitions.contains(id));
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 // ASSERT(player.finishedInternal() || !(activeAnimations && act iveAnimations->isAnimationStyleChange())); 545 // ASSERT(player.finishedInternal() || !(activeAnimations && act iveAnimations->isAnimationStyleChange()));
527 update->cancelTransition(id); 546 update->cancelTransition(id);
528 } 547 }
529 } 548 }
530 } 549 }
531 } 550 }
532 551
533 void CSSAnimations::cancel() 552 void CSSAnimations::cancel()
534 { 553 {
535 for (const auto& entry : m_animations) { 554 for (const auto& entry : m_animations) {
536 entry.value->cancel(); 555 entry.value.player->cancel();
537 entry.value->update(TimingUpdateOnDemand); 556 entry.value.player->update(TimingUpdateOnDemand);
538 } 557 }
539 558
540 for (const auto& entry : m_transitions) { 559 for (const auto& entry : m_transitions) {
541 entry.value.player->cancel(); 560 entry.value.player->cancel();
542 entry.value.player->update(TimingUpdateOnDemand); 561 entry.value.player->update(TimingUpdateOnDemand);
543 } 562 }
544 563
545 m_animations.clear(); 564 m_animations.clear();
546 m_transitions.clear(); 565 m_transitions.clear();
547 m_pendingUpdate = nullptr; 566 m_pendingUpdate = nullptr;
548 } 567 }
549 568
550 void CSSAnimations::calculateAnimationActiveInterpolations(CSSAnimationUpdate* u pdate, const Element* animatingElement, double timelineCurrentTime) 569 void CSSAnimations::calculateAnimationActiveInterpolations(CSSAnimationUpdate* u pdate, const Element* animatingElement, double timelineCurrentTime)
551 { 570 {
552 ActiveAnimations* activeAnimations = animatingElement ? animatingElement->ac tiveAnimations() : nullptr; 571 ActiveAnimations* activeAnimations = animatingElement ? animatingElement->ac tiveAnimations() : nullptr;
553 AnimationStack* animationStack = activeAnimations ? &activeAnimations->defau ltStack() : nullptr; 572 AnimationStack* animationStack = activeAnimations ? &activeAnimations->defau ltStack() : nullptr;
554 573
555 if (update->newAnimations().isEmpty() && update->suppressedAnimationAnimatio nPlayers().isEmpty()) { 574 if (update->newAnimations().isEmpty() && update->suppressedAnimationAnimatio nPlayers().isEmpty()) {
556 WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation>> acti veInterpolationsForAnimations(AnimationStack::activeInterpolations(animationStac k, 0, 0, Animation::DefaultPriority, timelineCurrentTime)); 575 WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation>> acti veInterpolationsForAnimations(AnimationStack::activeInterpolations(animationStac k, 0, 0, Animation::DefaultPriority, timelineCurrentTime));
557 update->adoptActiveInterpolationsForAnimations(activeInterpolationsForAn imations); 576 update->adoptActiveInterpolationsForAnimations(activeInterpolationsForAn imations);
558 return; 577 return;
559 } 578 }
560 579
561 WillBeHeapVector<RawPtrWillBeMember<InertAnimation>> newAnimations; 580 WillBeHeapVector<RawPtrWillBeMember<InertAnimation>> newAnimations;
562 for (const auto& newAnimation : update->newAnimations()) 581 for (const auto& newAnimation : update->newAnimations())
563 newAnimations.append(newAnimation.animation.get()); 582 newAnimations.append(newAnimation.animation.get());
564 for (const auto& updatedAnimation : update->animationsWithTimingUpdates()) 583 for (const auto& updatedAnimation : update->animationsWithUpdates())
565 newAnimations.append(updatedAnimation.animation.get()); // Animations wi th timing updates use a temporary InertAnimation for the current frame. 584 newAnimations.append(updatedAnimation.animation.get()); // Animations wi th updates use a temporary InertAnimation for the current frame.
566 585
567 WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation>> activeIn terpolationsForAnimations(AnimationStack::activeInterpolations(animationStack, & newAnimations, &update->suppressedAnimationAnimationPlayers(), Animation::Defaul tPriority, timelineCurrentTime)); 586 WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation>> activeIn terpolationsForAnimations(AnimationStack::activeInterpolations(animationStack, & newAnimations, &update->suppressedAnimationAnimationPlayers(), Animation::Defaul tPriority, timelineCurrentTime));
568 update->adoptActiveInterpolationsForAnimations(activeInterpolationsForAnimat ions); 587 update->adoptActiveInterpolationsForAnimations(activeInterpolationsForAnimat ions);
569 } 588 }
570 589
571 void CSSAnimations::calculateTransitionActiveInterpolations(CSSAnimationUpdate* update, const Element* animatingElement, double timelineCurrentTime) 590 void CSSAnimations::calculateTransitionActiveInterpolations(CSSAnimationUpdate* update, const Element* animatingElement, double timelineCurrentTime)
572 { 591 {
573 ActiveAnimations* activeAnimations = animatingElement ? animatingElement->ac tiveAnimations() : nullptr; 592 ActiveAnimations* activeAnimations = animatingElement ? animatingElement->ac tiveAnimations() : nullptr;
574 AnimationStack* animationStack = activeAnimations ? &activeAnimations->defau ltStack() : nullptr; 593 AnimationStack* animationStack = activeAnimations ? &activeAnimations->defau ltStack() : nullptr;
575 594
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 } 760 }
742 761
743 void CSSAnimationUpdate::trace(Visitor* visitor) 762 void CSSAnimationUpdate::trace(Visitor* visitor)
744 { 763 {
745 #if ENABLE(OILPAN) 764 #if ENABLE(OILPAN)
746 visitor->trace(m_newTransitions); 765 visitor->trace(m_newTransitions);
747 visitor->trace(m_activeInterpolationsForAnimations); 766 visitor->trace(m_activeInterpolationsForAnimations);
748 visitor->trace(m_activeInterpolationsForTransitions); 767 visitor->trace(m_activeInterpolationsForTransitions);
749 visitor->trace(m_newAnimations); 768 visitor->trace(m_newAnimations);
750 visitor->trace(m_suppressedAnimationPlayers); 769 visitor->trace(m_suppressedAnimationPlayers);
751 visitor->trace(m_animationsWithTimingUpdates); 770 visitor->trace(m_animationsWithUpdates);
752 #endif 771 #endif
753 } 772 }
754 773
755 } // namespace blink 774 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698