Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1415)

Side by Side Diff: Source/core/animation/ElementAnimation.h

Issue 1326443003: Web Animations: Enable additive animations in experimental (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update missed tests Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/animation/EffectInput.cpp ('k') | Source/core/animation/ElementAnimation.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "wtf/Allocator.h" 43 #include "wtf/Allocator.h"
44 44
45 45
46 namespace blink { 46 namespace blink {
47 47
48 class Dictionary; 48 class Dictionary;
49 49
50 class ElementAnimation { 50 class ElementAnimation {
51 STATIC_ONLY(ElementAnimation); 51 STATIC_ONLY(ElementAnimation);
52 public: 52 public:
53 static Animation* animate(Element& element, const EffectModelOrDictionarySeq uence& effectInput, double duration, ExceptionState& exceptionState) 53 static Animation* animate(Element& element, const EffectModelOrDictionarySeq uenceOrDictionary& effectInput, double duration, ExceptionState& exceptionState)
54 { 54 {
55 EffectModel* effect = EffectInput::convert(&element, effectInput, except ionState); 55 EffectModel* effect = EffectInput::convert(&element, effectInput, except ionState);
56 if (exceptionState.hadException()) 56 if (exceptionState.hadException())
57 return 0; 57 return 0;
58 return animateInternal(element, effect, TimingInput::convert(duration)); 58 return animateInternal(element, effect, TimingInput::convert(duration));
59 } 59 }
60 60
61 static Animation* animate(Element& element, const EffectModelOrDictionarySeq uence& effectInput, const KeyframeEffectOptions& timingInput, ExceptionState& ex ceptionState) 61 static Animation* animate(Element& element, const EffectModelOrDictionarySeq uenceOrDictionary& effectInput, const KeyframeEffectOptions& timingInput, Except ionState& exceptionState)
62 { 62 {
63 EffectModel* effect = EffectInput::convert(&element, effectInput, except ionState); 63 EffectModel* effect = EffectInput::convert(&element, effectInput, except ionState);
64 if (exceptionState.hadException()) 64 if (exceptionState.hadException())
65 return 0; 65 return 0;
66 return animateInternal(element, effect, TimingInput::convert(timingInput )); 66 return animateInternal(element, effect, TimingInput::convert(timingInput ));
67 } 67 }
68 68
69 static Animation* animate(Element& element, const EffectModelOrDictionarySeq uence& effectInput, ExceptionState& exceptionState) 69 static Animation* animate(Element& element, const EffectModelOrDictionarySeq uenceOrDictionary& effectInput, ExceptionState& exceptionState)
70 { 70 {
71 EffectModel* effect = EffectInput::convert(&element, effectInput, except ionState); 71 EffectModel* effect = EffectInput::convert(&element, effectInput, except ionState);
72 if (exceptionState.hadException()) 72 if (exceptionState.hadException())
73 return 0; 73 return 0;
74 return animateInternal(element, effect, Timing()); 74 return animateInternal(element, effect, Timing());
75 } 75 }
76 76
77 static HeapVector<Member<Animation>> getAnimations(Element& element) 77 static HeapVector<Member<Animation>> getAnimations(Element& element)
78 { 78 {
79 HeapVector<Member<Animation>> animationss; 79 HeapVector<Member<Animation>> animationss;
(...skipping 13 matching lines...) Expand all
93 static Animation* animateInternal(Element& element, EffectModel* effect, con st Timing& timing) 93 static Animation* animateInternal(Element& element, EffectModel* effect, con st Timing& timing)
94 { 94 {
95 KeyframeEffect* keyframeEffect = KeyframeEffect::create(&element, effect , timing); 95 KeyframeEffect* keyframeEffect = KeyframeEffect::create(&element, effect , timing);
96 return element.document().timeline().play(keyframeEffect); 96 return element.document().timeline().play(keyframeEffect);
97 } 97 }
98 }; 98 };
99 99
100 } // namespace blink 100 } // namespace blink
101 101
102 #endif // ElementAnimation_h 102 #endif // ElementAnimation_h
OLDNEW
« no previous file with comments | « Source/core/animation/EffectInput.cpp ('k') | Source/core/animation/ElementAnimation.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698