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

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

Issue 1196913005: Implement animations for Independent CSS Transform Properties (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix rotate-interpolation test Created 5 years, 5 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 "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/AnimationType.h" 9 #include "core/animation/AnimationType.h"
10 #include "core/animation/CSSValueAnimationType.h" 10 #include "core/animation/CSSValueAnimationType.h"
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 case CSSPropertyWebkitFilter: { 420 case CSSPropertyWebkitFilter: {
421 RefPtrWillBeRawPtr<Interpolation> interpolation = FilterStyleInterpolati on::maybeCreateList(*fromCSSValue, *toCSSValue, property); 421 RefPtrWillBeRawPtr<Interpolation> interpolation = FilterStyleInterpolati on::maybeCreateList(*fromCSSValue, *toCSSValue, property);
422 if (interpolation) 422 if (interpolation)
423 return interpolation.release(); 423 return interpolation.release();
424 424
425 // FIXME: Support drop shadow interpolation. 425 // FIXME: Support drop shadow interpolation.
426 fallBackToLegacy = true; 426 fallBackToLegacy = true;
427 break; 427 break;
428 } 428 }
429 429
430 case CSSPropertyTranslate: {
431 RefPtrWillBeRawPtr<Interpolation> interpolation = ListStyleInterpolation <LengthStyleInterpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, prop erty, range);
432 if (interpolation)
433 return interpolation.release();
434
435 // TODO(soonm): Legacy mode is used when from and to cssvaluelist length does not match.
436 fallBackToLegacy = true;
437 break;
438 }
439
440 case CSSPropertyScale: {
441 RefPtrWillBeRawPtr<Interpolation> interpolation = ListStyleInterpolation <DoubleStyleInterpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, prop erty, range);
442 if (interpolation)
443 return interpolation.release();
444
445 // TODO(soonm): Legacy mode is used when from and to cssvaluelist length does not match.
446 fallBackToLegacy = true;
447 break;
448 }
449
430 default: 450 default:
431 // Fall back to LegacyStyleInterpolation. 451 // Fall back to LegacyStyleInterpolation.
432 fallBackToLegacy = true; 452 fallBackToLegacy = true;
433 break; 453 break;
434 } 454 }
435 455
436 if (fromCSSValue == toCSSValue) 456 if (fromCSSValue == toCSSValue)
437 return ConstantStyleInterpolation::create(fromCSSValue, property); 457 return ConstantStyleInterpolation::create(fromCSSValue, property);
438 458
439 if (forceDefaultInterpolation) 459 if (forceDefaultInterpolation)
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase( )->cloneForAnimation(m_value); 594 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase( )->cloneForAnimation(m_value);
575 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()- >cloneForAnimation(toSVGPropertySpecificKeyframe(end).value()); 595 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()- >cloneForAnimation(toSVGPropertySpecificKeyframe(end).value());
576 596
577 if (!fromValue || !toValue) 597 if (!fromValue || !toValue)
578 return nullptr; 598 return nullptr;
579 599
580 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get( )); 600 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get( ));
581 } 601 }
582 602
583 } // namespace blink 603 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/animation/KeyframeEffect.cpp ('k') | Source/core/animation/css/CSSAnimatableValueFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698