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

Side by Side Diff: third_party/WebKit/Source/core/animation/StringKeyframe.cpp

Issue 1645913002: Add additive animation support for CSS property motion-rotation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_propertyInterpolationTypesMapping
Patch Set: Rebased Created 4 years, 10 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 #include "core/animation/StringKeyframe.h" 5 #include "core/animation/StringKeyframe.h"
6 6
7 #include "core/StylePropertyShorthand.h" 7 #include "core/StylePropertyShorthand.h"
8 #include "core/animation/ConstantStyleInterpolation.h" 8 #include "core/animation/ConstantStyleInterpolation.h"
9 #include "core/animation/DeferredLegacyStyleInterpolation.h" 9 #include "core/animation/DeferredLegacyStyleInterpolation.h"
10 #include "core/animation/DoubleStyleInterpolation.h" 10 #include "core/animation/DoubleStyleInterpolation.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 // FIXME: Handle keywords e.g. 'smaller', 'larger'. 168 // FIXME: Handle keywords e.g. 'smaller', 'larger'.
169 if (property == CSSPropertyFontSize) 169 if (property == CSSPropertyFontSize)
170 return createLegacyStyleInterpolation(property, end, element, baseSt yle); 170 return createLegacyStyleInterpolation(property, end, element, baseSt yle);
171 171
172 // FIXME: Handle keywords e.g. 'baseline', 'sub'. 172 // FIXME: Handle keywords e.g. 'baseline', 'sub'.
173 if (property == CSSPropertyBaselineShift) 173 if (property == CSSPropertyBaselineShift)
174 return createLegacyStyleInterpolation(property, end, element, baseSt yle); 174 return createLegacyStyleInterpolation(property, end, element, baseSt yle);
175 175
176 break; 176 break;
177 177
178 case CSSPropertyMotionRotation: {
179 RefPtr<Interpolation> interpolation = DoubleStyleInterpolation::maybeCre ateFromMotionRotation(*fromCSSValue, *toCSSValue, property);
180 if (interpolation)
181 return interpolation.release();
182 break;
183 }
184
185 case CSSPropertyBorderBottomLeftRadius: 178 case CSSPropertyBorderBottomLeftRadius:
186 case CSSPropertyBorderBottomRightRadius: 179 case CSSPropertyBorderBottomRightRadius:
187 case CSSPropertyBorderTopLeftRadius: 180 case CSSPropertyBorderTopLeftRadius:
188 case CSSPropertyBorderTopRightRadius: 181 case CSSPropertyBorderTopRightRadius:
189 if (LengthPairStyleInterpolation::canCreateFrom(*fromCSSValue) && Length PairStyleInterpolation::canCreateFrom(*toCSSValue)) 182 if (LengthPairStyleInterpolation::canCreateFrom(*fromCSSValue) && Length PairStyleInterpolation::canCreateFrom(*toCSSValue))
190 return LengthPairStyleInterpolation::create(*fromCSSValue, *toCSSVal ue, property, RangeNonNegative); 183 return LengthPairStyleInterpolation::create(*fromCSSValue, *toCSSVal ue, property, RangeNonNegative);
191 break; 184 break;
192 185
193 case CSSPropertyPerspectiveOrigin: 186 case CSSPropertyPerspectiveOrigin:
194 case CSSPropertyTransformOrigin: { 187 case CSSPropertyTransformOrigin: {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 } 288 }
296 289
297 PassRefPtr<Interpolation> SVGPropertySpecificKeyframe::maybeCreateInterpolation( PropertyHandle propertyHandle, Keyframe::PropertySpecificKeyframe& end, Element* , const ComputedStyle*) const 290 PassRefPtr<Interpolation> SVGPropertySpecificKeyframe::maybeCreateInterpolation( PropertyHandle propertyHandle, Keyframe::PropertySpecificKeyframe& end, Element* , const ComputedStyle*) const
298 { 291 {
299 const InterpolationTypes* applicableTypes = PropertyInterpolationTypesMappin g::get(propertyHandle); 292 const InterpolationTypes* applicableTypes = PropertyInterpolationTypesMappin g::get(propertyHandle);
300 ASSERT(applicableTypes); 293 ASSERT(applicableTypes);
301 return InvalidatableInterpolation::create(propertyHandle, *applicableTypes, const_cast<SVGPropertySpecificKeyframe*>(this), &end); 294 return InvalidatableInterpolation::create(propertyHandle, *applicableTypes, const_cast<SVGPropertySpecificKeyframe*>(this), &end);
302 } 295 }
303 296
304 } // namespace blink 297 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698