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

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: Review feedback 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
« no previous file with comments | « LayoutTests/animations/interpolation/object-position-interpolation.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
381 // Fall through
382 case CSSPropertyObjectPosition:
383 if (LengthPairStyleInterpolation::canCreateFrom(*fromCSSValue) && Length PairStyleInterpolation::canCreateFrom(*toCSSValue)) 380 if (LengthPairStyleInterpolation::canCreateFrom(*fromCSSValue) && Length PairStyleInterpolation::canCreateFrom(*toCSSValue))
384 return LengthPairStyleInterpolation::create(*fromCSSValue, *toCSSVal ue, property, range); 381 return LengthPairStyleInterpolation::create(*fromCSSValue, *toCSSVal ue, property, RangeNonNegative);
385 break; 382 break;
386 383
387 case CSSPropertyPerspectiveOrigin: 384 case CSSPropertyPerspectiveOrigin:
388 case CSSPropertyTransformOrigin: { 385 case CSSPropertyTransformOrigin: {
389 RefPtrWillBeRawPtr<Interpolation> interpolation = ListStyleInterpolation <LengthStyleInterpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, prop erty, range); 386 RefPtrWillBeRawPtr<Interpolation> interpolation = ListStyleInterpolation <LengthStyleInterpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, prop erty, range);
390 if (interpolation) 387 if (interpolation)
391 return interpolation.release(); 388 return interpolation.release();
392 389
393 // FIXME: Handle keywords: top, right, left, center, bottom 390 // FIXME: Handle keywords: top, right, left, center, bottom
394 return createLegacyStyleInterpolation(property, end, element, baseStyle) ; 391 return createLegacyStyleInterpolation(property, end, element, baseStyle) ;
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase( )->cloneForAnimation(m_value); 598 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase( )->cloneForAnimation(m_value);
602 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()- >cloneForAnimation(toSVGPropertySpecificKeyframe(end).value()); 599 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()- >cloneForAnimation(toSVGPropertySpecificKeyframe(end).value());
603 600
604 if (!fromValue || !toValue) 601 if (!fromValue || !toValue)
605 return nullptr; 602 return nullptr;
606 603
607 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get( )); 604 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get( ));
608 } 605 }
609 606
610 } // namespace blink 607 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/animations/interpolation/object-position-interpolation.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698