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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 return true; | 178 return true; |
179 } | 179 } |
180 | 180 |
181 return false; | 181 return false; |
182 } | 182 } |
183 | 183 |
184 bool KeyframeAnimation::startAnimation(double beginTime) | 184 bool KeyframeAnimation::startAnimation(double beginTime) |
185 { | 185 { |
186 #if USE(ACCELERATED_COMPOSITING) | 186 #if USE(ACCELERATED_COMPOSITING) |
187 if (m_object && m_object->hasLayer()) { | 187 if (m_object && m_object->hasLayer()) { |
188 RenderLayer* layer = toRenderBoxModelObject(m_object)->layer(); | 188 RenderLayer* layer = toRenderBox(m_object)->layer(); |
189 if (layer->isComposited()) | 189 if (layer->isComposited()) |
190 return layer->backing()->startAnimation(beginTime, m_animation.get()
, m_keyframes); | 190 return layer->backing()->startAnimation(beginTime, m_animation.get()
, m_keyframes); |
191 } | 191 } |
192 #else | 192 #else |
193 UNUSED_PARAM(beginTime); | 193 UNUSED_PARAM(beginTime); |
194 #endif | 194 #endif |
195 return false; | 195 return false; |
196 } | 196 } |
197 | 197 |
198 void KeyframeAnimation::endAnimation(bool reset) | 198 void KeyframeAnimation::endAnimation(bool reset) |
199 { | 199 { |
200 if (m_object) { | 200 if (m_object) { |
201 #if USE(ACCELERATED_COMPOSITING) | 201 #if USE(ACCELERATED_COMPOSITING) |
202 if (m_object->hasLayer()) { | 202 if (m_object->hasLayer()) { |
203 RenderLayer* layer = toRenderBoxModelObject(m_object)->layer(); | 203 RenderLayer* layer = toRenderBox(m_object)->layer(); |
204 if (layer->isComposited()) | 204 if (layer->isComposited()) |
205 layer->backing()->animationFinished(m_keyframes.animationName(),
0, reset); | 205 layer->backing()->animationFinished(m_keyframes.animationName(),
0, reset); |
206 } | 206 } |
207 #else | 207 #else |
208 UNUSED_PARAM(reset); | 208 UNUSED_PARAM(reset); |
209 #endif | 209 #endif |
210 // Restore the original (unanimated) style | 210 // Restore the original (unanimated) style |
211 setChanged(m_object->element()); | 211 setChanged(m_object->element()); |
212 } | 212 } |
213 } | 213 } |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 | 365 |
366 if (acceleratedPropertiesOnly) { | 366 if (acceleratedPropertiesOnly) { |
367 bool isLooping; | 367 bool isLooping; |
368 getTimeToNextEvent(t, isLooping); | 368 getTimeToNextEvent(t, isLooping); |
369 } | 369 } |
370 #endif | 370 #endif |
371 return t; | 371 return t; |
372 } | 372 } |
373 | 373 |
374 } // namespace WebCore | 374 } // namespace WebCore |
OLD | NEW |