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

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

Issue 2379863003: Implement AnimationEffectTimingReadOnly interface (Closed)
Patch Set: Created 4 years, 2 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 /* 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 22 matching lines...) Expand all
33 33
34 #include "bindings/core/v8/ScriptWrappable.h" 34 #include "bindings/core/v8/ScriptWrappable.h"
35 #include "core/CoreExport.h" 35 #include "core/CoreExport.h"
36 #include "core/animation/Timing.h" 36 #include "core/animation/Timing.h"
37 #include "platform/heap/Handle.h" 37 #include "platform/heap/Handle.h"
38 38
39 namespace blink { 39 namespace blink {
40 40
41 class Animation; 41 class Animation;
42 class AnimationEffectReadOnly; 42 class AnimationEffectReadOnly;
43 class AnimationEffectTiming; 43 class AnimationEffectTimingReadOnly;
44 class ComputedTimingProperties; 44 class ComputedTimingProperties;
45 45
46 enum TimingUpdateReason { 46 enum TimingUpdateReason {
47 TimingUpdateOnDemand, 47 TimingUpdateOnDemand,
48 TimingUpdateForAnimationFrame 48 TimingUpdateForAnimationFrame
49 }; 49 };
50 50
51 static inline bool isNull(double value) 51 static inline bool isNull(double value)
52 { 52 {
53 return std::isnan(value); 53 return std::isnan(value);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 double timeToForwardsEffectChange() const { return ensureCalculated().timeTo ForwardsEffectChange; } 94 double timeToForwardsEffectChange() const { return ensureCalculated().timeTo ForwardsEffectChange; }
95 double timeToReverseEffectChange() const { return ensureCalculated().timeToR everseEffectChange; } 95 double timeToReverseEffectChange() const { return ensureCalculated().timeToR everseEffectChange; }
96 96
97 double iterationDuration() const; 97 double iterationDuration() const;
98 double activeDurationInternal() const; 98 double activeDurationInternal() const;
99 double endTimeInternal() const { return specifiedTiming().startDelay + activ eDurationInternal() + specifiedTiming().endDelay; } 99 double endTimeInternal() const { return specifiedTiming().startDelay + activ eDurationInternal() + specifiedTiming().endDelay; }
100 100
101 const Animation* animation() const { return m_animation; } 101 const Animation* animation() const { return m_animation; }
102 Animation* animation() { return m_animation; } 102 Animation* animation() { return m_animation; }
103 const Timing& specifiedTiming() const { return m_timing; } 103 const Timing& specifiedTiming() const { return m_timing; }
104 AnimationEffectTiming* timing(); 104 virtual AnimationEffectTimingReadOnly* timing();
105 void updateSpecifiedTiming(const Timing&); 105 void updateSpecifiedTiming(const Timing&);
106 106
107 void getComputedTiming(ComputedTimingProperties&); 107 void getComputedTiming(ComputedTimingProperties&);
108 ComputedTimingProperties getComputedTiming(); 108 ComputedTimingProperties getComputedTiming();
109 109
110 DECLARE_VIRTUAL_TRACE(); 110 DECLARE_VIRTUAL_TRACE();
111 111
112 protected: 112 protected:
113 explicit AnimationEffectReadOnly(const Timing&, EventDelegate* = nullptr); 113 explicit AnimationEffectReadOnly(const Timing&, EventDelegate* = nullptr);
114 114
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 mutable bool m_needsUpdate; 157 mutable bool m_needsUpdate;
158 mutable double m_lastUpdateTime; 158 mutable double m_lastUpdateTime;
159 String m_name; 159 String m_name;
160 160
161 const CalculatedTiming& ensureCalculated() const; 161 const CalculatedTiming& ensureCalculated() const;
162 }; 162 };
163 163
164 } // namespace blink 164 } // namespace blink
165 165
166 #endif // AnimationEffectReadOnly_h 166 #endif // AnimationEffectReadOnly_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698