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 19 matching lines...) Expand all Loading... |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "core/animation/ElementAnimation.h" | 32 #include "core/animation/ElementAnimation.h" |
33 | 33 |
34 #include "bindings/v8/Dictionary.h" | 34 #include "bindings/v8/Dictionary.h" |
35 #include "core/animation/DocumentTimeline.h" | 35 #include "core/animation/DocumentTimeline.h" |
36 #include "core/animation/css/CSSAnimations.h" | 36 #include "core/animation/css/CSSAnimations.h" |
37 | 37 |
38 namespace WebCore { | 38 namespace WebCore { |
39 | 39 |
40 Animation* ElementAnimation::animate(Element* element, Vector<Dictionary> keyfra
meDictionaryVector, Dictionary timingInput) | 40 Animation* ElementAnimation::animate(Element& element, Vector<Dictionary> keyfra
meDictionaryVector, Dictionary timingInput) |
41 { | 41 { |
42 ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled()); | 42 ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled()); |
43 | 43 |
44 RefPtr<Animation> animation = Animation::create(element, keyframeDictionaryV
ector, timingInput); | 44 RefPtr<Animation> animation = Animation::create(&element, keyframeDictionary
Vector, timingInput); |
45 DocumentTimeline* timeline = element->document().timeline(); | 45 DocumentTimeline* timeline = element.document().timeline(); |
46 ASSERT(timeline); | 46 ASSERT(timeline); |
47 timeline->play(animation.get()); | 47 timeline->play(animation.get()); |
48 | 48 |
49 return animation.get(); | 49 return animation.get(); |
50 } | 50 } |
51 | 51 |
52 Animation* ElementAnimation::animate(Element* element, Vector<Dictionary> keyfra
meDictionaryVector, double timingInput) | 52 Animation* ElementAnimation::animate(Element& element, Vector<Dictionary> keyfra
meDictionaryVector, double timingInput) |
53 { | 53 { |
54 ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled()); | 54 ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled()); |
55 | 55 |
56 RefPtr<Animation> animation = Animation::create(element, keyframeDictionaryV
ector, timingInput); | 56 RefPtr<Animation> animation = Animation::create(&element, keyframeDictionary
Vector, timingInput); |
57 DocumentTimeline* timeline = element->document().timeline(); | 57 DocumentTimeline* timeline = element.document().timeline(); |
58 ASSERT(timeline); | 58 ASSERT(timeline); |
59 timeline->play(animation.get()); | 59 timeline->play(animation.get()); |
60 | 60 |
61 return animation.get(); | 61 return animation.get(); |
62 } | 62 } |
63 | 63 |
64 Animation* ElementAnimation::animate(Element* element, Vector<Dictionary> keyfra
meDictionaryVector) | 64 Animation* ElementAnimation::animate(Element& element, Vector<Dictionary> keyfra
meDictionaryVector) |
65 { | 65 { |
66 ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled()); | 66 ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled()); |
67 | 67 |
68 RefPtr<Animation> animation = Animation::create(element, keyframeDictionaryV
ector); | 68 RefPtr<Animation> animation = Animation::create(&element, keyframeDictionary
Vector); |
69 DocumentTimeline* timeline = element->document().timeline(); | 69 DocumentTimeline* timeline = element.document().timeline(); |
70 ASSERT(timeline); | 70 ASSERT(timeline); |
71 timeline->play(animation.get()); | 71 timeline->play(animation.get()); |
72 | 72 |
73 return animation.get(); | 73 return animation.get(); |
74 } | 74 } |
75 | 75 |
76 } // namespace WebCore | 76 } // namespace WebCore |
OLD | NEW |