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

Side by Side Diff: third_party/WebKit/Source/core/animation/EffectInput.h

Issue 1720403002: Alternative syntax for element.animate list of keyframes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@animations-keyframeeffect-api
Patch Set: Rebase Created 4 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef EffectInput_h 5 #ifndef EffectInput_h
6 #define EffectInput_h 6 #define EffectInput_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/animation/EffectModel.h" 9 #include "core/animation/EffectModel.h"
10 #include "wtf/Allocator.h" 10 #include "wtf/Allocator.h"
11 #include "wtf/Vector.h" 11 #include "wtf/Vector.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class EffectModel; 15 class EffectModel;
16 class EffectModelOrDictionarySequenceOrDictionary; 16 class EffectModelOrDictionarySequenceOrDictionary;
17 class Dictionary; 17 class Dictionary;
18 class Element; 18 class Element;
19 class ExceptionState; 19 class ExceptionState;
20 class StringKeyframe;
20 21
21 class CORE_EXPORT EffectInput { 22 class CORE_EXPORT EffectInput {
22 STATIC_ONLY(EffectInput); 23 STATIC_ONLY(EffectInput);
23 public: 24 public:
24 // TODO(alancutter): Replace Element* parameter with Document&. 25 // TODO(alancutter): Replace Element* parameter with Document&.
25 static EffectModel* convert(Element*, const EffectModelOrDictionarySequenceO rDictionary&, ExceptionState&); 26 static EffectModel* convert(Element*, const EffectModelOrDictionarySequenceO rDictionary&, ExceptionState&);
26 27
27 private: 28 private:
28 static EffectModel* convert(Element*, const Vector<Dictionary>& keyframeDict ionaryVector, ExceptionState&); 29 // keyframesSpecifiedAsList should be
30 // - true if the keyframeDictionaryVector was specified as a list originally (we entered this function from the DictionarySequence case of
31 // EffectModelOrDictionarySequenceOrDictionary above)
32 // - false if we were in the single Dictionary case (handled by the function below) and needed to fall back to the sequence case instead
33 static EffectModel* convert(Element*, const Vector<Dictionary>& keyframeDict ionaryVector, ExceptionState&, bool keyframesSpecifiedAsList);
34
35 static EffectModel* convert(Element*, const Dictionary& keyframeDictionary, ExceptionState&);
36
37 // Returns true if the property passed in is a compositable property.
38 static bool setKeyframeValue(Element*, StringKeyframe&, const String& proper ty, const String& value);
39
40 static EffectModel* createEffectModelFromKeyframes(Element*, const Vector<Re fPtr<StringKeyframe>>& keyframes, bool encounteredCompositableProperty, Exceptio nState&);
alancutter (OOO until 2018) 2016/02/25 06:52:27 No need for private static methods, these can live
suzyh_UTC10 (ex-contributor) 2016/02/26 04:35:31 Done.
29 }; 41 };
30 42
31 } // namespace blink 43 } // namespace blink
32 44
33 #endif 45 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698