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

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

Issue 2379863003: Implement AnimationEffectTimingReadOnly interface (Closed)
Patch Set: Response to review, update formatting of new files 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 { TimingUpdateOnDemand, TimingUpdateForAnimationFrame }; 46 enum TimingUpdateReason { TimingUpdateOnDemand, TimingUpdateForAnimationFrame };
47 47
48 static inline bool isNull(double value) { 48 static inline bool isNull(double value) {
49 return std::isnan(value); 49 return std::isnan(value);
50 } 50 }
51 51
52 static inline double nullValue() { 52 static inline double nullValue() {
53 return std::numeric_limits<double>::quiet_NaN(); 53 return std::numeric_limits<double>::quiet_NaN();
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 double iterationDuration() const; 100 double iterationDuration() const;
101 double activeDurationInternal() const; 101 double activeDurationInternal() const;
102 double endTimeInternal() const { 102 double endTimeInternal() const {
103 return specifiedTiming().startDelay + activeDurationInternal() + 103 return specifiedTiming().startDelay + activeDurationInternal() +
104 specifiedTiming().endDelay; 104 specifiedTiming().endDelay;
105 } 105 }
106 106
107 const Animation* animation() const { return m_animation; } 107 const Animation* animation() const { return m_animation; }
108 Animation* animation() { return m_animation; } 108 Animation* animation() { return m_animation; }
109 const Timing& specifiedTiming() const { return m_timing; } 109 const Timing& specifiedTiming() const { return m_timing; }
110 AnimationEffectTiming* timing(); 110 virtual AnimationEffectTimingReadOnly* timing();
111 void updateSpecifiedTiming(const Timing&); 111 void updateSpecifiedTiming(const Timing&);
112 112
113 void getComputedTiming(ComputedTimingProperties&); 113 void getComputedTiming(ComputedTimingProperties&);
114 ComputedTimingProperties getComputedTiming(); 114 ComputedTimingProperties getComputedTiming();
115 115
116 DECLARE_VIRTUAL_TRACE(); 116 DECLARE_VIRTUAL_TRACE();
117 117
118 protected: 118 protected:
119 explicit AnimationEffectReadOnly(const Timing&, EventDelegate* = nullptr); 119 explicit AnimationEffectReadOnly(const Timing&, EventDelegate* = nullptr);
120 120
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 mutable bool m_needsUpdate; 164 mutable bool m_needsUpdate;
165 mutable double m_lastUpdateTime; 165 mutable double m_lastUpdateTime;
166 String m_name; 166 String m_name;
167 167
168 const CalculatedTiming& ensureCalculated() const; 168 const CalculatedTiming& ensureCalculated() const;
169 }; 169 };
170 170
171 } // namespace blink 171 } // namespace blink
172 172
173 #endif // AnimationEffectReadOnly_h 173 #endif // AnimationEffectReadOnly_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698