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

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

Issue 1682843003: Add additive animation support for border-radius CSS properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_positionInterpolation
Patch Set: 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"
11 #include "core/animation/FilterStyleInterpolation.h" 11 #include "core/animation/FilterStyleInterpolation.h"
12 #include "core/animation/ImageSliceStyleInterpolation.h" 12 #include "core/animation/ImageSliceStyleInterpolation.h"
13 #include "core/animation/InvalidatableInterpolation.h" 13 #include "core/animation/InvalidatableInterpolation.h"
14 #include "core/animation/LegacyStyleInterpolation.h" 14 #include "core/animation/LegacyStyleInterpolation.h"
15 #include "core/animation/LengthBoxStyleInterpolation.h" 15 #include "core/animation/LengthBoxStyleInterpolation.h"
16 #include "core/animation/LengthPairStyleInterpolation.h"
17 #include "core/animation/LengthStyleInterpolation.h" 16 #include "core/animation/LengthStyleInterpolation.h"
18 #include "core/animation/ListStyleInterpolation.h" 17 #include "core/animation/ListStyleInterpolation.h"
19 #include "core/animation/PropertyInterpolationTypesMapping.h" 18 #include "core/animation/PropertyInterpolationTypesMapping.h"
20 #include "core/animation/css/CSSAnimations.h" 19 #include "core/animation/css/CSSAnimations.h"
21 #include "core/css/CSSPropertyMetadata.h" 20 #include "core/css/CSSPropertyMetadata.h"
22 #include "core/css/resolver/StyleResolver.h" 21 #include "core/css/resolver/StyleResolver.h"
23 #include "core/style/ComputedStyle.h" 22 #include "core/style/ComputedStyle.h"
24 #include "core/svg/SVGElement.h" 23 #include "core/svg/SVGElement.h"
25 #include "platform/RuntimeEnabledFeatures.h" 24 #include "platform/RuntimeEnabledFeatures.h"
26 25
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 186
188 break; 187 break;
189 188
190 case CSSPropertyMotionRotation: { 189 case CSSPropertyMotionRotation: {
191 RefPtr<Interpolation> interpolation = DoubleStyleInterpolation::maybeCre ateFromMotionRotation(*fromCSSValue, *toCSSValue, property); 190 RefPtr<Interpolation> interpolation = DoubleStyleInterpolation::maybeCre ateFromMotionRotation(*fromCSSValue, *toCSSValue, property);
192 if (interpolation) 191 if (interpolation)
193 return interpolation.release(); 192 return interpolation.release();
194 break; 193 break;
195 } 194 }
196 195
197 case CSSPropertyBorderBottomLeftRadius:
198 case CSSPropertyBorderBottomRightRadius:
199 case CSSPropertyBorderTopLeftRadius:
200 case CSSPropertyBorderTopRightRadius:
201 if (LengthPairStyleInterpolation::canCreateFrom(*fromCSSValue) && Length PairStyleInterpolation::canCreateFrom(*toCSSValue))
202 return LengthPairStyleInterpolation::create(*fromCSSValue, *toCSSVal ue, property, RangeNonNegative);
203 break;
204
205 case CSSPropertyTransformOrigin: { 196 case CSSPropertyTransformOrigin: {
206 RefPtr<Interpolation> interpolation = ListStyleInterpolation<LengthStyle Interpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, property, range) ; 197 RefPtr<Interpolation> interpolation = ListStyleInterpolation<LengthStyle Interpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, property, range) ;
207 if (interpolation) 198 if (interpolation)
208 return interpolation.release(); 199 return interpolation.release();
209 200
210 // FIXME: Handle keywords: top, right, left, center, bottom 201 // FIXME: Handle keywords: top, right, left, center, bottom
211 return createLegacyStyleInterpolation(property, end, element, baseStyle) ; 202 return createLegacyStyleInterpolation(property, end, element, baseStyle) ;
212 } 203 }
213 204
214 case CSSPropertyClip: { 205 case CSSPropertyClip: {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 } 310 }
320 311
321 PassRefPtr<Interpolation> SVGPropertySpecificKeyframe::maybeCreateInterpolation( PropertyHandle propertyHandle, Keyframe::PropertySpecificKeyframe& end, Element* , const ComputedStyle*) const 312 PassRefPtr<Interpolation> SVGPropertySpecificKeyframe::maybeCreateInterpolation( PropertyHandle propertyHandle, Keyframe::PropertySpecificKeyframe& end, Element* , const ComputedStyle*) const
322 { 313 {
323 const InterpolationTypes* applicableTypes = PropertyInterpolationTypesMappin g::get(propertyHandle); 314 const InterpolationTypes* applicableTypes = PropertyInterpolationTypesMappin g::get(propertyHandle);
324 ASSERT(applicableTypes); 315 ASSERT(applicableTypes);
325 return InvalidatableInterpolation::create(propertyHandle, *applicableTypes, *this, end); 316 return InvalidatableInterpolation::create(propertyHandle, *applicableTypes, *this, end);
326 } 317 }
327 318
328 } // namespace blink 319 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698