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 28 matching lines...) Expand all Loading... |
39 #include "core/animation/KeyframeEffectOptions.h" | 39 #include "core/animation/KeyframeEffectOptions.h" |
40 #include "core/animation/KeyframeEffectReadOnly.h" | 40 #include "core/animation/KeyframeEffectReadOnly.h" |
41 #include "core/animation/TimingInput.h" | 41 #include "core/animation/TimingInput.h" |
42 #include "core/dom/Document.h" | 42 #include "core/dom/Document.h" |
43 #include "core/dom/Element.h" | 43 #include "core/dom/Element.h" |
44 #include "platform/RuntimeEnabledFeatures.h" | 44 #include "platform/RuntimeEnabledFeatures.h" |
45 #include "wtf/Allocator.h" | 45 #include "wtf/Allocator.h" |
46 | 46 |
47 namespace blink { | 47 namespace blink { |
48 | 48 |
49 class Dictionary; | |
50 | |
51 class ElementAnimation { | 49 class ElementAnimation { |
52 STATIC_ONLY(ElementAnimation); | 50 STATIC_ONLY(ElementAnimation); |
53 | 51 |
54 public: | 52 public: |
55 static Animation* animate(ExecutionContext* executionContext, | 53 static Animation* animate(ExecutionContext* executionContext, |
56 Element& element, | 54 Element& element, |
57 const DictionarySequenceOrDictionary& effectInput, | 55 const DictionarySequenceOrDictionary& effectInput, |
58 double duration, | 56 double duration, |
59 ExceptionState& exceptionState) { | 57 ExceptionState& exceptionState) { |
60 EffectModel* effect = EffectInput::convert( | 58 EffectModel* effect = EffectInput::convert( |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 const Timing& timing) { | 121 const Timing& timing) { |
124 KeyframeEffect* keyframeEffect = | 122 KeyframeEffect* keyframeEffect = |
125 KeyframeEffect::create(&element, effect, timing); | 123 KeyframeEffect::create(&element, effect, timing); |
126 return element.document().timeline().play(keyframeEffect); | 124 return element.document().timeline().play(keyframeEffect); |
127 } | 125 } |
128 }; | 126 }; |
129 | 127 |
130 } // namespace blink | 128 } // namespace blink |
131 | 129 |
132 #endif // ElementAnimation_h | 130 #endif // ElementAnimation_h |
OLD | NEW |