| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 if (!canStartAnimationOnCompositor(element)) { | 376 if (!canStartAnimationOnCompositor(element)) { |
| 377 // When an element is being detached, we cancel any associated | 377 // When an element is being detached, we cancel any associated |
| 378 // Animations for CSS animations. But by the time we get | 378 // Animations for CSS animations. But by the time we get |
| 379 // here the mapping will have been removed. | 379 // here the mapping will have been removed. |
| 380 // FIXME: Defer remove/pause operations until after the | 380 // FIXME: Defer remove/pause operations until after the |
| 381 // compositing update. | 381 // compositing update. |
| 382 return; | 382 return; |
| 383 } | 383 } |
| 384 if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled()) { | 384 if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled()) { |
| 385 WebCompositorAnimationPlayer* compositorPlayer = animation.compositorPla
yer(); | 385 WebCompositorAnimationPlayer* compositorPlayer = animation.compositorPla
yer(); |
| 386 ASSERT(compositorPlayer); | 386 if (compositorPlayer) |
| 387 compositorPlayer->removeAnimation(id); | 387 compositorPlayer->removeAnimation(id); |
| 388 } else { | 388 } else { |
| 389 toLayoutBoxModelObject(element.layoutObject())->layer()->compositedLayer
Mapping()->mainGraphicsLayer()->removeAnimation(id); | 389 toLayoutBoxModelObject(element.layoutObject())->layer()->compositedLayer
Mapping()->mainGraphicsLayer()->removeAnimation(id); |
| 390 } | 390 } |
| 391 } | 391 } |
| 392 | 392 |
| 393 void CompositorAnimations::pauseAnimationForTestingOnCompositor(const Element& e
lement, const Animation& animation, int id, double pauseTime) | 393 void CompositorAnimations::pauseAnimationForTestingOnCompositor(const Element& e
lement, const Animation& animation, int id, double pauseTime) |
| 394 { | 394 { |
| 395 // FIXME: canStartAnimationOnCompositor queries compositingState, which is n
ot necessarily up to date. | 395 // FIXME: canStartAnimationOnCompositor queries compositingState, which is n
ot necessarily up to date. |
| 396 // https://code.google.com/p/chromium/issues/detail?id=339847 | 396 // https://code.google.com/p/chromium/issues/detail?id=339847 |
| 397 DisableCompositingQueryAsserts disabler; | 397 DisableCompositingQueryAsserts disabler; |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 757 break; | 757 break; |
| 758 default: | 758 default: |
| 759 ASSERT_NOT_REACHED(); | 759 ASSERT_NOT_REACHED(); |
| 760 } | 760 } |
| 761 animations.append(animation.release()); | 761 animations.append(animation.release()); |
| 762 } | 762 } |
| 763 ASSERT(!animations.isEmpty()); | 763 ASSERT(!animations.isEmpty()); |
| 764 } | 764 } |
| 765 | 765 |
| 766 } // namespace blink | 766 } // namespace blink |
| OLD | NEW |