| 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 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 AnimatableValueKeyframeEffectModel* model = AnimatableValueKeyframeEffectMod
el::create(keyframes); | 536 AnimatableValueKeyframeEffectModel* model = AnimatableValueKeyframeEffectMod
el::create(keyframes); |
| 537 update.startTransition(id, from.get(), to.get(), InertEffect::create(model,
timing, false, 0)); | 537 update.startTransition(id, from.get(), to.get(), InertEffect::create(model,
timing, false, 0)); |
| 538 ASSERT(!element->elementAnimations() || !element->elementAnimations()->isAni
mationStyleChange()); | 538 ASSERT(!element->elementAnimations() || !element->elementAnimations()->isAni
mationStyleChange()); |
| 539 } | 539 } |
| 540 | 540 |
| 541 void CSSAnimations::calculateTransitionUpdate(CSSAnimationUpdate& update, const
Element* animatingElement, const ComputedStyle& style) | 541 void CSSAnimations::calculateTransitionUpdate(CSSAnimationUpdate& update, const
Element* animatingElement, const ComputedStyle& style) |
| 542 { | 542 { |
| 543 if (!animatingElement) | 543 if (!animatingElement) |
| 544 return; | 544 return; |
| 545 | 545 |
| 546 if (animatingElement->document().printing() || animatingElement->document().
wasPrinting()) |
| 547 return; |
| 548 |
| 546 ElementAnimations* elementAnimations = animatingElement->elementAnimations()
; | 549 ElementAnimations* elementAnimations = animatingElement->elementAnimations()
; |
| 547 const TransitionMap* activeTransitions = elementAnimations ? &elementAnimati
ons->cssAnimations().m_transitions : nullptr; | 550 const TransitionMap* activeTransitions = elementAnimations ? &elementAnimati
ons->cssAnimations().m_transitions : nullptr; |
| 548 const CSSTransitionData* transitionData = style.transitions(); | 551 const CSSTransitionData* transitionData = style.transitions(); |
| 549 | 552 |
| 550 #if ENABLE(ASSERT) | 553 #if ENABLE(ASSERT) |
| 551 // In debug builds we verify that it would have been safe to avoid populatin
g and testing listedProperties if the style recalc is due to animation. | 554 // In debug builds we verify that it would have been safe to avoid populatin
g and testing listedProperties if the style recalc is due to animation. |
| 552 const bool animationStyleRecalc = false; | 555 const bool animationStyleRecalc = false; |
| 553 #else | 556 #else |
| 554 // In release builds we avoid the cost of checking for new and interrupted t
ransitions if the style recalc is due to animation. | 557 // In release builds we avoid the cost of checking for new and interrupted t
ransitions if the style recalc is due to animation. |
| 555 const bool animationStyleRecalc = elementAnimations && elementAnimations->is
AnimationStyleChange(); | 558 const bool animationStyleRecalc = elementAnimations && elementAnimations->is
AnimationStyleChange(); |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 } | 815 } |
| 813 | 816 |
| 814 DEFINE_TRACE(CSSAnimations) | 817 DEFINE_TRACE(CSSAnimations) |
| 815 { | 818 { |
| 816 visitor->trace(m_transitions); | 819 visitor->trace(m_transitions); |
| 817 visitor->trace(m_pendingUpdate); | 820 visitor->trace(m_pendingUpdate); |
| 818 visitor->trace(m_animations); | 821 visitor->trace(m_animations); |
| 819 } | 822 } |
| 820 | 823 |
| 821 } // namespace blink | 824 } // namespace blink |
| OLD | NEW |