| 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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 maybeDispatch(Document::ANIMATIONITERATION_LISTENER, EventTypeNames::ani
mationiteration, elapsedTime); | 615 maybeDispatch(Document::ANIMATIONITERATION_LISTENER, EventTypeNames::ani
mationiteration, elapsedTime); |
| 616 } | 616 } |
| 617 | 617 |
| 618 if (currentPhase == AnimationNode::PhaseAfter && m_previousPhase != Animatio
nNode::PhaseAfter) | 618 if (currentPhase == AnimationNode::PhaseAfter && m_previousPhase != Animatio
nNode::PhaseAfter) |
| 619 maybeDispatch(Document::ANIMATIONEND_LISTENER, EventTypeNames::animation
end, animationNode->activeDurationInternal()); | 619 maybeDispatch(Document::ANIMATIONEND_LISTENER, EventTypeNames::animation
end, animationNode->activeDurationInternal()); |
| 620 | 620 |
| 621 m_previousPhase = currentPhase; | 621 m_previousPhase = currentPhase; |
| 622 m_previousIteration = currentIteration; | 622 m_previousIteration = currentIteration; |
| 623 } | 623 } |
| 624 | 624 |
| 625 void CSSAnimations::AnimationEventDelegate::trace(Visitor* visitor) | |
| 626 { | |
| 627 visitor->trace(m_target); | |
| 628 AnimationNode::EventDelegate::trace(visitor); | |
| 629 } | |
| 630 | |
| 631 void CSSAnimations::TransitionEventDelegate::onEventCondition(const AnimationNod
e* animationNode) | 625 void CSSAnimations::TransitionEventDelegate::onEventCondition(const AnimationNod
e* animationNode) |
| 632 { | 626 { |
| 633 const AnimationNode::Phase currentPhase = animationNode->phase(); | 627 const AnimationNode::Phase currentPhase = animationNode->phase(); |
| 634 if (currentPhase == AnimationNode::PhaseAfter && currentPhase != m_previousP
hase && m_target->document().hasListenerType(Document::TRANSITIONEND_LISTENER))
{ | 628 if (currentPhase == AnimationNode::PhaseAfter && currentPhase != m_previousP
hase && m_target->document().hasListenerType(Document::TRANSITIONEND_LISTENER))
{ |
| 635 String propertyName = getPropertyNameString(m_property); | 629 String propertyName = getPropertyNameString(m_property); |
| 636 const Timing& timing = animationNode->specifiedTiming(); | 630 const Timing& timing = animationNode->specifiedTiming(); |
| 637 double elapsedTime = timing.iterationDuration; | 631 double elapsedTime = timing.iterationDuration; |
| 638 const AtomicString& eventType = EventTypeNames::transitionend; | 632 const AtomicString& eventType = EventTypeNames::transitionend; |
| 639 RefPtr<TransitionEvent> event = TransitionEvent::create(eventType, prope
rtyName, elapsedTime); | 633 RefPtr<TransitionEvent> event = TransitionEvent::create(eventType, prope
rtyName, elapsedTime); |
| 640 event->setTarget(m_target); | 634 event->setTarget(m_target); |
| 641 m_target->document().enqueueAnimationFrameEvent(event); | 635 m_target->document().enqueueAnimationFrameEvent(event); |
| 642 } | 636 } |
| 643 | 637 |
| 644 m_previousPhase = currentPhase; | 638 m_previousPhase = currentPhase; |
| 645 } | 639 } |
| 646 | 640 |
| 647 void CSSAnimations::TransitionEventDelegate::trace(Visitor* visitor) | |
| 648 { | |
| 649 visitor->trace(m_target); | |
| 650 AnimationNode::EventDelegate::trace(visitor); | |
| 651 } | |
| 652 | |
| 653 const StylePropertyShorthand& CSSAnimations::animatableProperties() | 641 const StylePropertyShorthand& CSSAnimations::animatableProperties() |
| 654 { | 642 { |
| 655 DEFINE_STATIC_LOCAL(Vector<CSSPropertyID>, properties, ()); | 643 DEFINE_STATIC_LOCAL(Vector<CSSPropertyID>, properties, ()); |
| 656 DEFINE_STATIC_LOCAL(StylePropertyShorthand, propertyShorthand, ()); | 644 DEFINE_STATIC_LOCAL(StylePropertyShorthand, propertyShorthand, ()); |
| 657 if (properties.isEmpty()) { | 645 if (properties.isEmpty()) { |
| 658 for (int i = firstCSSProperty; i < lastCSSProperty; ++i) { | 646 for (int i = firstCSSProperty; i < lastCSSProperty; ++i) { |
| 659 CSSPropertyID id = convertToCSSPropertyID(i); | 647 CSSPropertyID id = convertToCSSPropertyID(i); |
| 660 if (CSSPropertyMetadata::isAnimatableProperty(id)) | 648 if (CSSPropertyMetadata::isAnimatableProperty(id)) |
| 661 properties.append(id); | 649 properties.append(id); |
| 662 } | 650 } |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 case CSSPropertyWebkitTransitionDelay: | 686 case CSSPropertyWebkitTransitionDelay: |
| 699 case CSSPropertyWebkitTransitionDuration: | 687 case CSSPropertyWebkitTransitionDuration: |
| 700 case CSSPropertyWebkitTransitionProperty: | 688 case CSSPropertyWebkitTransitionProperty: |
| 701 case CSSPropertyWebkitTransitionTimingFunction: | 689 case CSSPropertyWebkitTransitionTimingFunction: |
| 702 return false; | 690 return false; |
| 703 default: | 691 default: |
| 704 return true; | 692 return true; |
| 705 } | 693 } |
| 706 } | 694 } |
| 707 | 695 |
| 708 void CSSAnimations::trace(Visitor* visitor) | |
| 709 { | |
| 710 #if ENABLE(OILPAN) | |
| 711 visitor->trace(m_transitions); | |
| 712 visitor->trace(m_pendingUpdate); | |
| 713 visitor->trace(m_animations); | |
| 714 visitor->trace(m_previousActiveInterpolationsForAnimations); | |
| 715 #endif | |
| 716 } | |
| 717 | |
| 718 void CSSAnimationUpdate::trace(Visitor* visitor) | |
| 719 { | |
| 720 #if ENABLE(OILPAN) | |
| 721 visitor->trace(m_newTransitions); | |
| 722 visitor->trace(m_activeInterpolationsForAnimations); | |
| 723 visitor->trace(m_activeInterpolationsForTransitions); | |
| 724 visitor->trace(m_newAnimations); | |
| 725 visitor->trace(m_cancelledAnimationPlayers); | |
| 726 #endif | |
| 727 } | |
| 728 | |
| 729 } // namespace blink | 696 } // namespace blink |
| OLD | NEW |