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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 return true; | 61 return true; |
62 } | 62 } |
63 | 63 |
64 PassRefPtr<Animation> Animation::create(Element* element, Vector<Dictionary> key
frameDictionaryVector, Dictionary timingInput) | 64 PassRefPtr<Animation> Animation::create(Element* element, Vector<Dictionary> key
frameDictionaryVector, Dictionary timingInput) |
65 { | 65 { |
66 ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled()); | 66 ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled()); |
67 | 67 |
68 // FIXME: This test will not be neccessary once resolution of keyframe value
s occurs at | 68 // FIXME: This test will not be neccessary once resolution of keyframe value
s occurs at |
69 // animation application time. | 69 // animation application time. |
70 if (!checkDocumentAndRenderer(element)) | 70 if (!checkDocumentAndRenderer(element)) |
71 return 0; | 71 return nullptr; |
72 | 72 |
73 return createUnsafe(element, keyframeDictionaryVector, timingInput); | 73 return createUnsafe(element, keyframeDictionaryVector, timingInput); |
74 } | 74 } |
75 | 75 |
76 PassRefPtr<Animation> Animation::create(Element* element, Vector<Dictionary> key
frameDictionaryVector, double timingInput) | 76 PassRefPtr<Animation> Animation::create(Element* element, Vector<Dictionary> key
frameDictionaryVector, double timingInput) |
77 { | 77 { |
78 ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled()); | 78 ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled()); |
79 | 79 |
80 // FIXME: This test will not be neccessary once resolution of keyframe value
s occurs at | 80 // FIXME: This test will not be neccessary once resolution of keyframe value
s occurs at |
81 // animation application time. | 81 // animation application time. |
82 if (!checkDocumentAndRenderer(element)) | 82 if (!checkDocumentAndRenderer(element)) |
83 return 0; | 83 return nullptr; |
84 | 84 |
85 return createUnsafe(element, keyframeDictionaryVector, timingInput); | 85 return createUnsafe(element, keyframeDictionaryVector, timingInput); |
86 } | 86 } |
87 | 87 |
88 PassRefPtr<Animation> Animation::create(Element* element, Vector<Dictionary> key
frameDictionaryVector) | 88 PassRefPtr<Animation> Animation::create(Element* element, Vector<Dictionary> key
frameDictionaryVector) |
89 { | 89 { |
90 ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled()); | 90 ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled()); |
91 | 91 |
92 // FIXME: This test will not be neccessary once resolution of keyframe value
s occurs at | 92 // FIXME: This test will not be neccessary once resolution of keyframe value
s occurs at |
93 // animation application time. | 93 // animation application time. |
94 if (!checkDocumentAndRenderer(element)) | 94 if (!checkDocumentAndRenderer(element)) |
95 return 0; | 95 return nullptr; |
96 | 96 |
97 return createUnsafe(element, keyframeDictionaryVector); | 97 return createUnsafe(element, keyframeDictionaryVector); |
98 } | 98 } |
99 | 99 |
100 void Animation::setStartDelay(Timing& timing, double startDelay) | 100 void Animation::setStartDelay(Timing& timing, double startDelay) |
101 { | 101 { |
102 if (std::isfinite(startDelay)) | 102 if (std::isfinite(startDelay)) |
103 timing.startDelay = startDelay; | 103 timing.startDelay = startDelay; |
104 else | 104 else |
105 timing.startDelay = 0; | 105 timing.startDelay = 0; |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 void Animation::pauseAnimationForTestingOnCompositor(double pauseTime) | 478 void Animation::pauseAnimationForTestingOnCompositor(double pauseTime) |
479 { | 479 { |
480 ASSERT(hasActiveAnimationsOnCompositor()); | 480 ASSERT(hasActiveAnimationsOnCompositor()); |
481 if (!m_target || !m_target->renderer()) | 481 if (!m_target || !m_target->renderer()) |
482 return; | 482 return; |
483 for (size_t i = 0; i < m_compositorAnimationIds.size(); ++i) | 483 for (size_t i = 0; i < m_compositorAnimationIds.size(); ++i) |
484 CompositorAnimations::instance()->pauseAnimationForTestingOnCompositor(*
m_target.get(), m_compositorAnimationIds[i], pauseTime); | 484 CompositorAnimations::instance()->pauseAnimationForTestingOnCompositor(*
m_target.get(), m_compositorAnimationIds[i], pauseTime); |
485 } | 485 } |
486 | 486 |
487 } // namespace WebCore | 487 } // namespace WebCore |
OLD | NEW |