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

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

Issue 182063005: Web Animations API: Refactor IDL input conversion out of Animation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix up includes Created 6 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 | Annotate | Revision Log
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 class Dictionary; 42 class Dictionary;
43 43
44 class Animation FINAL : public TimedItem { 44 class Animation FINAL : public TimedItem {
45 45
46 public: 46 public:
47 enum Priority { DefaultPriority, TransitionPriority }; 47 enum Priority { DefaultPriority, TransitionPriority };
48 48
49 static PassRefPtr<Animation> create(PassRefPtr<Element>, PassRefPtrWillBeRaw Ptr<AnimationEffect>, const Timing&, Priority = DefaultPriority, PassOwnPtr<Even tDelegate> = nullptr); 49 static PassRefPtr<Animation> create(PassRefPtr<Element>, PassRefPtrWillBeRaw Ptr<AnimationEffect>, const Timing&, Priority = DefaultPriority, PassOwnPtr<Even tDelegate> = nullptr);
50 // Web Animations API Bindings constructors. 50 // Web Animations API Bindings constructors.
51 static PassRefPtr<Animation> create(Element*, Vector<Dictionary> keyframeDic tionaryVector, Dictionary timingInput); 51 static PassRefPtr<Animation> create(Element*, Vector<Dictionary> keyframeDic tionaryVector, Dictionary timingInput);
52 static PassRefPtr<Animation> create(Element*, Vector<Dictionary> keyframeDic tionaryVector, double timingInput); 52 static PassRefPtr<Animation> create(Element*, Vector<Dictionary> keyframeDic tionaryVector, double duration = Timing::initialIterationDuration());
53 static PassRefPtr<Animation> create(Element*, Vector<Dictionary> keyframeDic tionaryVector);
54 53
55 // FIXME: Move all of these setter methods out of Animation, 54 // FIXME: Move all of these setter methods out of Animation,
56 // possibly into a new class (TimingInput?). 55 // possibly into a new class (TimingInput?).
57 static void setStartDelay(Timing&, double startDelay); 56 static void setStartDelay(Timing&, double startDelay);
58 static void setEndDelay(Timing&, double endDelay); 57 static void setEndDelay(Timing&, double endDelay);
59 static void setFillMode(Timing&, String fillMode); 58 static void setFillMode(Timing&, String fillMode);
60 static void setIterationStart(Timing&, double iterationStart); 59 static void setIterationStart(Timing&, double iterationStart);
61 static void setIterationCount(Timing&, double iterationCount); 60 static void setIterationCount(Timing&, double iterationCount);
62 static void setIterationDuration(Timing&, double iterationDuration); 61 static void setIterationDuration(Timing&, double iterationDuration);
63 static void setPlaybackRate(Timing&, double playbackRate); 62 static void setPlaybackRate(Timing&, double playbackRate);
(...skipping 26 matching lines...) Expand all
90 void clearEffects(); 89 void clearEffects();
91 virtual void updateChildrenAndEffects() const OVERRIDE; 90 virtual void updateChildrenAndEffects() const OVERRIDE;
92 virtual void didAttach() OVERRIDE; 91 virtual void didAttach() OVERRIDE;
93 virtual void willDetach() OVERRIDE; 92 virtual void willDetach() OVERRIDE;
94 virtual double calculateTimeToEffectChange(bool forwards, double inheritedTi me, double timeToNextIteration) const OVERRIDE; 93 virtual double calculateTimeToEffectChange(bool forwards, double inheritedTi me, double timeToNextIteration) const OVERRIDE;
95 94
96 private: 95 private:
97 static void populateTiming(Timing&, Dictionary); 96 static void populateTiming(Timing&, Dictionary);
98 // createUnsafe should only be directly called from tests. 97 // createUnsafe should only be directly called from tests.
99 static PassRefPtr<Animation> createUnsafe(Element*, Vector<Dictionary> keyfr ameDictionaryVector, Dictionary timingInput); 98 static PassRefPtr<Animation> createUnsafe(Element*, Vector<Dictionary> keyfr ameDictionaryVector, Dictionary timingInput);
100 static PassRefPtr<Animation> createUnsafe(Element*, Vector<Dictionary> keyfr ameDictionaryVector, double timingInput); 99 static PassRefPtr<Animation> createUnsafe(Element*, Vector<Dictionary> keyfr ameDictionaryVector, double duration = Timing::initialIterationDuration());
101 static PassRefPtr<Animation> createUnsafe(Element*, Vector<Dictionary> keyfr ameDictionaryVector);
102 100
103 Animation(PassRefPtr<Element>, PassRefPtrWillBeRawPtr<AnimationEffect>, cons t Timing&, Priority, PassOwnPtr<EventDelegate>); 101 Animation(PassRefPtr<Element>, PassRefPtrWillBeRawPtr<AnimationEffect>, cons t Timing&, Priority, PassOwnPtr<EventDelegate>);
104 102
105 RefPtr<Element> m_target; 103 RefPtr<Element> m_target;
106 RefPtrWillBePersistent<AnimationEffect> m_effect; 104 RefPtrWillBePersistent<AnimationEffect> m_effect;
107 105
108 bool m_activeInAnimationStack; 106 bool m_activeInAnimationStack;
109 OwnPtr<AnimationEffect::CompositableValueList> m_compositableValues; 107 OwnPtr<AnimationEffect::CompositableValueList> m_compositableValues;
110 108
111 Priority m_priority; 109 Priority m_priority;
112 110
113 Vector<int> m_compositorAnimationIds; 111 Vector<int> m_compositorAnimationIds;
114 112
115 friend class CSSAnimations; 113 friend class CSSAnimations;
116 friend class AnimationAnimationV8Test; 114 friend class AnimationAnimationV8Test;
117 friend class AnimationAnimationTimingInputTest; 115 friend class AnimationAnimationTimingInputTest;
118 }; 116 };
119 117
120 DEFINE_TYPE_CASTS(Animation, TimedItem, timedItem, timedItem->isAnimation(), tim edItem.isAnimation()); 118 DEFINE_TYPE_CASTS(Animation, TimedItem, timedItem, timedItem->isAnimation(), tim edItem.isAnimation());
121 119
122 } // namespace WebCore 120 } // namespace WebCore
123 121
124 #endif 122 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/animation/Animation.cpp » ('j') | Source/core/animation/ElementAnimation.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698