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

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

Issue 2384263003: Reflow comments in core/animation and subdirs (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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 return takeConstRef((fraction < 0.5) ? left : right); 128 return takeConstRef((fraction < 0.5) ? left : right);
129 } 129 }
130 130
131 template <class T> 131 template <class T>
132 static PassRefPtr<T> takeConstRef(const T* value) { 132 static PassRefPtr<T> takeConstRef(const T* value) {
133 return PassRefPtr<T>(const_cast<T*>(value)); 133 return PassRefPtr<T>(const_cast<T*>(value));
134 } 134 }
135 135
136 private: 136 private:
137 virtual AnimatableType type() const = 0; 137 virtual AnimatableType type() const = 0;
138 // Implementations can assume that the object being compared has the same type as the object this is called on 138 // Implementations can assume that the object being compared has the same type
139 // as the object this is called on
139 virtual bool equalTo(const AnimatableValue*) const = 0; 140 virtual bool equalTo(const AnimatableValue*) const = 0;
140 141
141 template <class Keyframe> 142 template <class Keyframe>
142 friend class KeyframeEffectModel; 143 friend class KeyframeEffectModel;
143 }; 144 };
144 145
145 #define DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(thisType, predicate) \ 146 #define DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(thisType, predicate) \
146 DEFINE_TYPE_CASTS(thisType, AnimatableValue, value, value->predicate, \ 147 DEFINE_TYPE_CASTS(thisType, AnimatableValue, value, value->predicate, \
147 value.predicate) 148 value.predicate)
148 149
149 } // namespace blink 150 } // namespace blink
150 151
151 #endif // AnimatableValue_h 152 #endif // AnimatableValue_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698