| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 | 258 |
| 259 bool AnimationControllerPrivate::isRunningAnimationOnRenderer(RenderObject* rend
erer, CSSPropertyID property, bool isRunningNow) const | 259 bool AnimationControllerPrivate::isRunningAnimationOnRenderer(RenderObject* rend
erer, CSSPropertyID property, bool isRunningNow) const |
| 260 { | 260 { |
| 261 RefPtr<CompositeAnimation> animation = m_compositeAnimations.get(renderer); | 261 RefPtr<CompositeAnimation> animation = m_compositeAnimations.get(renderer); |
| 262 if (!animation) | 262 if (!animation) |
| 263 return false; | 263 return false; |
| 264 | 264 |
| 265 return animation->isAnimatingProperty(property, false, isRunningNow); | 265 return animation->isAnimatingProperty(property, false, isRunningNow); |
| 266 } | 266 } |
| 267 | 267 |
| 268 bool AnimationControllerPrivate::isRunningAcceleratableAnimationOnRenderer(Rende
rObject *renderer, bool isOpacityAcceleratable) const | 268 bool AnimationControllerPrivate::isRunningAcceleratableAnimationOnRenderer(Rende
rObject *renderer) const |
| 269 { | 269 { |
| 270 RefPtr<CompositeAnimation> animation = m_compositeAnimations.get(renderer); | 270 RefPtr<CompositeAnimation> animation = m_compositeAnimations.get(renderer); |
| 271 if (!animation) | 271 if (!animation) |
| 272 return false; | 272 return false; |
| 273 | 273 |
| 274 bool acceleratedOnly = false; | 274 bool acceleratedOnly = false; |
| 275 bool isRunningNow = true; | 275 bool isRunningNow = true; |
| 276 return (isOpacityAcceleratable && animation->isAnimatingProperty(CSSProperty
Opacity, acceleratedOnly, isRunningNow)) | 276 return animation->isAnimatingProperty(CSSPropertyOpacity, acceleratedOnly, i
sRunningNow) |
| 277 || animation->isAnimatingProperty(CSSPropertyWebkitTransform, accelerate
dOnly, isRunningNow) | 277 || animation->isAnimatingProperty(CSSPropertyWebkitTransform, accelerate
dOnly, isRunningNow) |
| 278 || animation->isAnimatingProperty(CSSPropertyWebkitFilter, acceleratedOn
ly, isRunningNow); | 278 || animation->isAnimatingProperty(CSSPropertyWebkitFilter, acceleratedOn
ly, isRunningNow); |
| 279 } | 279 } |
| 280 | 280 |
| 281 bool AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer(RenderO
bject* renderer, CSSPropertyID property, bool isRunningNow) const | 281 bool AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer(RenderO
bject* renderer, CSSPropertyID property, bool isRunningNow) const |
| 282 { | 282 { |
| 283 RefPtr<CompositeAnimation> animation = m_compositeAnimations.get(renderer); | 283 RefPtr<CompositeAnimation> animation = m_compositeAnimations.get(renderer); |
| 284 if (!animation) | 284 if (!animation) |
| 285 return false; | 285 return false; |
| 286 | 286 |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 unsigned AnimationController::numberOfActiveAnimations(Document* document) const | 497 unsigned AnimationController::numberOfActiveAnimations(Document* document) const |
| 498 { | 498 { |
| 499 return m_data->numberOfActiveAnimations(document); | 499 return m_data->numberOfActiveAnimations(document); |
| 500 } | 500 } |
| 501 | 501 |
| 502 bool AnimationController::isRunningAnimationOnRenderer(RenderObject* renderer, C
SSPropertyID property, bool isRunningNow) const | 502 bool AnimationController::isRunningAnimationOnRenderer(RenderObject* renderer, C
SSPropertyID property, bool isRunningNow) const |
| 503 { | 503 { |
| 504 return m_data->isRunningAnimationOnRenderer(renderer, property, isRunningNow
); | 504 return m_data->isRunningAnimationOnRenderer(renderer, property, isRunningNow
); |
| 505 } | 505 } |
| 506 | 506 |
| 507 bool AnimationController::isRunningAcceleratableAnimationOnRenderer(RenderObject
* renderer, bool isOpacityAcceleratable) const | 507 bool AnimationController::isRunningAcceleratableAnimationOnRenderer(RenderObject
* renderer) const |
| 508 { | 508 { |
| 509 return m_data->isRunningAcceleratableAnimationOnRenderer(renderer, isOpacity
Acceleratable); | 509 return m_data->isRunningAcceleratableAnimationOnRenderer(renderer); |
| 510 } | 510 } |
| 511 | 511 |
| 512 bool AnimationController::isRunningAcceleratedAnimationOnRenderer(RenderObject*
renderer, CSSPropertyID property, bool isRunningNow) const | 512 bool AnimationController::isRunningAcceleratedAnimationOnRenderer(RenderObject*
renderer, CSSPropertyID property, bool isRunningNow) const |
| 513 { | 513 { |
| 514 return m_data->isRunningAcceleratedAnimationOnRenderer(renderer, property, i
sRunningNow); | 514 return m_data->isRunningAcceleratedAnimationOnRenderer(renderer, property, i
sRunningNow); |
| 515 } | 515 } |
| 516 | 516 |
| 517 void AnimationController::serviceAnimations() | 517 void AnimationController::serviceAnimations() |
| 518 { | 518 { |
| 519 m_data->serviceAnimations(); | 519 m_data->serviceAnimations(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 533 if (!m_beginAnimationUpdateCount) | 533 if (!m_beginAnimationUpdateCount) |
| 534 m_data->endAnimationUpdate(); | 534 m_data->endAnimationUpdate(); |
| 535 } | 535 } |
| 536 | 536 |
| 537 bool AnimationController::supportsAcceleratedAnimationOfProperty(CSSPropertyID p
roperty) | 537 bool AnimationController::supportsAcceleratedAnimationOfProperty(CSSPropertyID p
roperty) |
| 538 { | 538 { |
| 539 return CSSPropertyAnimation::animationOfPropertyIsAccelerated(property); | 539 return CSSPropertyAnimation::animationOfPropertyIsAccelerated(property); |
| 540 } | 540 } |
| 541 | 541 |
| 542 } // namespace WebCore | 542 } // namespace WebCore |
| OLD | NEW |