| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 return; | 122 return; |
| 123 | 123 |
| 124 #if USE(ACCELERATED_COMPOSITING) | 124 #if USE(ACCELERATED_COMPOSITING) |
| 125 if (m_object->isComposited()) | 125 if (m_object->isComposited()) |
| 126 toRenderBoxModelObject(m_object)->transitionPaused(timeOffset, m_animati
ngProperty); | 126 toRenderBoxModelObject(m_object)->transitionPaused(timeOffset, m_animati
ngProperty); |
| 127 #else | 127 #else |
| 128 UNUSED_PARAM(timeOffset); | 128 UNUSED_PARAM(timeOffset); |
| 129 #endif | 129 #endif |
| 130 // Restore the original (unanimated) style | 130 // Restore the original (unanimated) style |
| 131 if (!paused()) | 131 if (!paused()) |
| 132 setNeedsStyleRecalc(m_object->styledGeneratingNode()); | 132 setNeedsStyleRecalc(m_object->node()); |
| 133 } | 133 } |
| 134 | 134 |
| 135 void ImplicitAnimation::endAnimation() | 135 void ImplicitAnimation::endAnimation() |
| 136 { | 136 { |
| 137 #if USE(ACCELERATED_COMPOSITING) | 137 #if USE(ACCELERATED_COMPOSITING) |
| 138 if (m_object && m_object->isComposited()) | 138 if (m_object && m_object->isComposited()) |
| 139 toRenderBoxModelObject(m_object)->transitionFinished(m_animatingProperty
); | 139 toRenderBoxModelObject(m_object)->transitionFinished(m_animatingProperty
); |
| 140 #endif | 140 #endif |
| 141 } | 141 } |
| 142 | 142 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 158 bool ImplicitAnimation::sendTransitionEvent(const AtomicString& eventType, doubl
e elapsedTime) | 158 bool ImplicitAnimation::sendTransitionEvent(const AtomicString& eventType, doubl
e elapsedTime) |
| 159 { | 159 { |
| 160 if (eventType == eventNames().webkitTransitionEndEvent) { | 160 if (eventType == eventNames().webkitTransitionEndEvent) { |
| 161 Document::ListenerType listenerType = Document::TRANSITIONEND_LISTENER; | 161 Document::ListenerType listenerType = Document::TRANSITIONEND_LISTENER; |
| 162 | 162 |
| 163 if (shouldSendEventForListener(listenerType)) { | 163 if (shouldSendEventForListener(listenerType)) { |
| 164 String propertyName = getPropertyName(m_animatingProperty); | 164 String propertyName = getPropertyName(m_animatingProperty); |
| 165 | 165 |
| 166 // Dispatch the event | 166 // Dispatch the event |
| 167 RefPtr<Element> element = 0; | 167 RefPtr<Element> element = 0; |
| 168 if (m_object->styledGeneratingNode() && m_object->styledGeneratingNo
de()->isElementNode()) | 168 if (m_object->node() && m_object->node()->isElementNode()) |
| 169 element = static_cast<Element*>(m_object->styledGeneratingNode()
); | 169 element = static_cast<Element*>(m_object->node()); |
| 170 | 170 |
| 171 ASSERT(!element || (element->document() && !element->document()->inP
ageCache())); | 171 ASSERT(!element || (element->document() && !element->document()->inP
ageCache())); |
| 172 if (!element) | 172 if (!element) |
| 173 return false; | 173 return false; |
| 174 | 174 |
| 175 // Schedule event handling | 175 // Schedule event handling |
| 176 m_compAnim->animationController()->addEventToDispatch(element, event
Type, propertyName, elapsedTime); | 176 m_compAnim->animationController()->addEventToDispatch(element, event
Type, propertyName, elapsedTime); |
| 177 | 177 |
| 178 // Restore the original (unanimated) style | 178 // Restore the original (unanimated) style |
| 179 if (eventType == eventNames().webkitTransitionEndEvent && element->r
enderer()) | 179 if (eventType == eventNames().webkitTransitionEndEvent && element->r
enderer()) |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 // only need service at the end of the transition. | 299 // only need service at the end of the transition. |
| 300 if (CSSPropertyAnimation::animationOfPropertyIsAccelerated(m_animatingProper
ty) && isAccelerated()) { | 300 if (CSSPropertyAnimation::animationOfPropertyIsAccelerated(m_animatingProper
ty) && isAccelerated()) { |
| 301 bool isLooping; | 301 bool isLooping; |
| 302 getTimeToNextEvent(t, isLooping); | 302 getTimeToNextEvent(t, isLooping); |
| 303 } | 303 } |
| 304 #endif | 304 #endif |
| 305 return t; | 305 return t; |
| 306 } | 306 } |
| 307 | 307 |
| 308 } // namespace WebCore | 308 } // namespace WebCore |
| OLD | NEW |