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

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

Issue 1325783004: Changed CSSPropertyObjectPosition to use legacy interpolation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 | Annotate | Revision Log
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 "config.h" 5 #include "config.h"
6 #include "core/animation/StringKeyframe.h" 6 #include "core/animation/StringKeyframe.h"
7 7
8 #include "core/animation/AngleSVGInterpolation.h" 8 #include "core/animation/AngleSVGInterpolation.h"
9 #include "core/animation/CSSValueInterpolationType.h" 9 #include "core/animation/CSSValueInterpolationType.h"
10 #include "core/animation/ColorStyleInterpolation.h" 10 #include "core/animation/ColorStyleInterpolation.h"
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 370
371 if (ImageStyleInterpolation::canCreateFrom(*fromCSSValue) && ImageStyleI nterpolation::canCreateFrom(*toCSSValue)) 371 if (ImageStyleInterpolation::canCreateFrom(*fromCSSValue) && ImageStyleI nterpolation::canCreateFrom(*toCSSValue))
372 return ImageStyleInterpolation::create(*fromCSSValue, *toCSSValue, p roperty); 372 return ImageStyleInterpolation::create(*fromCSSValue, *toCSSValue, p roperty);
373 373
374 forceDefaultInterpolation = true; 374 forceDefaultInterpolation = true;
375 break; 375 break;
376 case CSSPropertyBorderBottomLeftRadius: 376 case CSSPropertyBorderBottomLeftRadius:
377 case CSSPropertyBorderBottomRightRadius: 377 case CSSPropertyBorderBottomRightRadius:
378 case CSSPropertyBorderTopLeftRadius: 378 case CSSPropertyBorderTopLeftRadius:
379 case CSSPropertyBorderTopRightRadius: 379 case CSSPropertyBorderTopRightRadius:
380 range = RangeNonNegative; 380 range = RangeNonNegative;
alancutter (OOO until 2018) 2015/09/01 03:38:45 We can use RangeNonNegative directly here.
sashab 2015/09/01 04:49:03 Done.
381 // Fall through
382 case CSSPropertyObjectPosition:
383 if (LengthPairStyleInterpolation::canCreateFrom(*fromCSSValue) && Length PairStyleInterpolation::canCreateFrom(*toCSSValue)) 381 if (LengthPairStyleInterpolation::canCreateFrom(*fromCSSValue) && Length PairStyleInterpolation::canCreateFrom(*toCSSValue))
384 return LengthPairStyleInterpolation::create(*fromCSSValue, *toCSSVal ue, property, range); 382 return LengthPairStyleInterpolation::create(*fromCSSValue, *toCSSVal ue, property, range);
385 break; 383 break;
386 384
387 case CSSPropertyPerspectiveOrigin: 385 case CSSPropertyPerspectiveOrigin:
388 case CSSPropertyTransformOrigin: { 386 case CSSPropertyTransformOrigin: {
389 RefPtrWillBeRawPtr<Interpolation> interpolation = ListStyleInterpolation <LengthStyleInterpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, prop erty, range); 387 RefPtrWillBeRawPtr<Interpolation> interpolation = ListStyleInterpolation <LengthStyleInterpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, prop erty, range);
390 if (interpolation) 388 if (interpolation)
391 return interpolation.release(); 389 return interpolation.release();
392 390
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase( )->cloneForAnimation(m_value); 599 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase( )->cloneForAnimation(m_value);
602 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()- >cloneForAnimation(toSVGPropertySpecificKeyframe(end).value()); 600 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()- >cloneForAnimation(toSVGPropertySpecificKeyframe(end).value());
603 601
604 if (!fromValue || !toValue) 602 if (!fromValue || !toValue)
605 return nullptr; 603 return nullptr;
606 604
607 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get( )); 605 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get( ));
608 } 606 }
609 607
610 } // namespace blink 608 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698