| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2007, 2012 Apple Inc. All rights reserved. | 2  * Copyright (C) 2007, 2012 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 232     } | 232     } | 
| 233 } | 233 } | 
| 234 | 234 | 
| 235 bool KeyframeAnimation::hasAnimationForProperty(CSSPropertyID property) const | 235 bool KeyframeAnimation::hasAnimationForProperty(CSSPropertyID property) const | 
| 236 { | 236 { | 
| 237     return m_keyframes.containsProperty(property); | 237     return m_keyframes.containsProperty(property); | 
| 238 } | 238 } | 
| 239 | 239 | 
| 240 bool KeyframeAnimation::startAnimation(double timeOffset) | 240 bool KeyframeAnimation::startAnimation(double timeOffset) | 
| 241 { | 241 { | 
| 242     if (m_object && m_object->isComposited()) { | 242     if (m_object && m_object->compositingState() == PaintsIntoOwnBacking) { | 
| 243         return toRenderBoxModelObject(m_object)->startAnimation(timeOffset, m_an
     imation.get(), m_keyframes); | 243         return toRenderBoxModelObject(m_object)->startAnimation(timeOffset, m_an
     imation.get(), m_keyframes); | 
| 244     } | 244     } | 
| 245     return false; | 245     return false; | 
| 246 } | 246 } | 
| 247 | 247 | 
| 248 void KeyframeAnimation::pauseAnimation(double timeOffset) | 248 void KeyframeAnimation::pauseAnimation(double timeOffset) | 
| 249 { | 249 { | 
| 250     if (!m_object) | 250     if (!m_object) | 
| 251         return; | 251         return; | 
| 252 | 252 | 
| 253     if (m_object->isComposited()) | 253     if (m_object->compositingState() == PaintsIntoOwnBacking) | 
| 254         toRenderBoxModelObject(m_object)->animationPaused(timeOffset, m_keyframe
     s.animationName()); | 254         toRenderBoxModelObject(m_object)->animationPaused(timeOffset, m_keyframe
     s.animationName()); | 
| 255 | 255 | 
| 256     // Restore the original (unanimated) style | 256     // Restore the original (unanimated) style | 
| 257     if (!paused()) | 257     if (!paused()) | 
| 258         setNeedsStyleRecalc(m_object->node()); | 258         setNeedsStyleRecalc(m_object->node()); | 
| 259 } | 259 } | 
| 260 | 260 | 
| 261 void KeyframeAnimation::endAnimation() | 261 void KeyframeAnimation::endAnimation() | 
| 262 { | 262 { | 
| 263     if (!m_object) | 263     if (!m_object) | 
| 264         return; | 264         return; | 
| 265 | 265 | 
| 266     if (m_object->isComposited()) | 266     if (m_object->compositingState() == PaintsIntoOwnBacking) | 
| 267         toRenderBoxModelObject(m_object)->animationFinished(m_keyframes.animatio
     nName()); | 267         toRenderBoxModelObject(m_object)->animationFinished(m_keyframes.animatio
     nName()); | 
| 268 | 268 | 
| 269     // Restore the original (unanimated) style | 269     // Restore the original (unanimated) style | 
| 270     if (!paused()) | 270     if (!paused()) | 
| 271         setNeedsStyleRecalc(m_object->node()); | 271         setNeedsStyleRecalc(m_object->node()); | 
| 272 } | 272 } | 
| 273 | 273 | 
| 274 bool KeyframeAnimation::shouldSendEventForListener(Document::ListenerType listen
     erType) const | 274 bool KeyframeAnimation::shouldSendEventForListener(Document::ListenerType listen
     erType) const | 
| 275 { | 275 { | 
| 276     return m_object->document().hasListenerType(listenerType); | 276     return m_object->document().hasListenerType(listenerType); | 
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 453 | 453 | 
| 454     if (acceleratedPropertiesOnly) { | 454     if (acceleratedPropertiesOnly) { | 
| 455         bool isLooping; | 455         bool isLooping; | 
| 456         getTimeToNextEvent(t, isLooping); | 456         getTimeToNextEvent(t, isLooping); | 
| 457     } | 457     } | 
| 458 | 458 | 
| 459     return t; | 459     return t; | 
| 460 } | 460 } | 
| 461 | 461 | 
| 462 } // namespace WebCore | 462 } // namespace WebCore | 
| OLD | NEW | 
|---|