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

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: Remove Compositor Animations and add tests for inherit and initial Created 5 years, 6 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/ColorStyleInterpolation.h" 9 #include "core/animation/ColorStyleInterpolation.h"
10 #include "core/animation/CompositorAnimations.h" 10 #include "core/animation/CompositorAnimations.h"
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 case CSSPropertyWebkitFilter: { 395 case CSSPropertyWebkitFilter: {
396 RefPtrWillBeRawPtr<Interpolation> interpolation = FilterStyleInterpolati on::maybeCreateList(*fromCSSValue, *toCSSValue, property); 396 RefPtrWillBeRawPtr<Interpolation> interpolation = FilterStyleInterpolati on::maybeCreateList(*fromCSSValue, *toCSSValue, property);
397 if (interpolation) 397 if (interpolation)
398 return interpolation.release(); 398 return interpolation.release();
399 399
400 // FIXME: Support drop shadow interpolation. 400 // FIXME: Support drop shadow interpolation.
401 fallBackToLegacy = true; 401 fallBackToLegacy = true;
402 break; 402 break;
403 } 403 }
404 404
405 case CSSPropertyTranslate: {
406 RefPtrWillBeRawPtr<Interpolation> interpolation = ListStyleInterpolation <LengthStyleInterpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, prop erty, range);
407 if (interpolation)
408 return interpolation.release();
409
410 fallBackToLegacy = true;
alancutter (OOO until 2018) 2015/06/24 01:17:09 I suspect you don't need this, see if your tests s
soonm 2015/06/24 02:53:19 I still need this when the lists are different len
411 break;
412 }
413
414 case CSSPropertyScale: {
415 RefPtrWillBeRawPtr<Interpolation> interpolation = ListStyleInterpolation <DoubleStyleInterpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, prop erty, range);
416 if (interpolation)
417 return interpolation.release();
418
419 fallBackToLegacy = true;
420 break;
421 }
422
405 default: 423 default:
406 // Fall back to LegacyStyleInterpolation. 424 // Fall back to LegacyStyleInterpolation.
407 fallBackToLegacy = true; 425 fallBackToLegacy = true;
408 break; 426 break;
409 } 427 }
410 428
411 if (fromCSSValue == toCSSValue) 429 if (fromCSSValue == toCSSValue)
412 return ConstantStyleInterpolation::create(fromCSSValue, property); 430 return ConstantStyleInterpolation::create(fromCSSValue, property);
413 431
414 if (forceDefaultInterpolation) 432 if (forceDefaultInterpolation)
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase( )->cloneForAnimation(m_value); 567 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase( )->cloneForAnimation(m_value);
550 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()- >cloneForAnimation(toSVGPropertySpecificKeyframe(end).value()); 568 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()- >cloneForAnimation(toSVGPropertySpecificKeyframe(end).value());
551 569
552 if (!fromValue || !toValue) 570 if (!fromValue || !toValue)
553 return nullptr; 571 return nullptr;
554 572
555 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get( )); 573 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get( ));
556 } 574 }
557 575
558 } // namespace blink 576 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698