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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 ASSERT(it->key->source()); | 102 ASSERT(it->key->source()); |
103 if (it->key->source()->isCurrent()) | 103 if (it->key->source()->isCurrent()) |
104 animationPlayers.append(it->key); | 104 animationPlayers.append(it->key); |
105 } | 105 } |
106 return animationPlayers; | 106 return animationPlayers; |
107 } | 107 } |
108 | 108 |
109 private: | 109 private: |
110 static AnimationPlayer* animateInternal(Element& element, PassRefPtrWillBeRa
wPtr<AnimationEffect> effect, const Timing& timing) | 110 static AnimationPlayer* animateInternal(Element& element, PassRefPtrWillBeRa
wPtr<AnimationEffect> effect, const Timing& timing) |
111 { | 111 { |
112 if (RuntimeEnabledFeatures::webAnimationsElementAnimateEnabled()) { | 112 RefPtrWillBeRawPtr<Animation> animation = Animation::create(&element, ef
fect, timing); |
113 RefPtrWillBeRawPtr<Animation> animation = Animation::create(&element
, effect, timing); | 113 return element.document().timeline().play(animation.get()); |
114 return element.document().timeline().play(animation.get()); | |
115 } | |
116 return 0; | |
117 } | 114 } |
118 }; | 115 }; |
119 | 116 |
120 } // namespace blink | 117 } // namespace blink |
121 | 118 |
122 #endif // ElementAnimation_h | 119 #endif // ElementAnimation_h |
OLD | NEW |