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

Side by Side Diff: Source/WebCore/page/animation/ImplicitAnimation.cpp

Issue 10696154: Merge 120639 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 years, 5 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) 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
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
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
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
OLDNEW
« no previous file with comments | « Source/WebCore/page/animation/AnimationController.cpp ('k') | Source/WebCore/page/animation/KeyframeAnimation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698