Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 // TODO: Legacy mode is used when from and to cssvaluelist length does n ot match. | |
|
alancutter (OOO until 2018)
2015/06/26 02:56:15
It's Blink style to add your username to any TODOs
| |
| 411 fallBackToLegacy = true; | |
| 412 break; | |
| 413 } | |
| 414 | |
| 415 case CSSPropertyScale: { | |
| 416 RefPtrWillBeRawPtr<Interpolation> interpolation = ListStyleInterpolation <DoubleStyleInterpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, prop erty, range); | |
| 417 if (interpolation) | |
| 418 return interpolation.release(); | |
| 419 | |
| 420 // TODO: Legacy mode is used when from and to cssvaluelist length does n ot match. | |
| 421 fallBackToLegacy = true; | |
| 422 break; | |
| 423 } | |
| 424 | |
| 405 default: | 425 default: |
| 406 // Fall back to LegacyStyleInterpolation. | 426 // Fall back to LegacyStyleInterpolation. |
| 407 fallBackToLegacy = true; | 427 fallBackToLegacy = true; |
| 408 break; | 428 break; |
| 409 } | 429 } |
| 410 | 430 |
| 411 if (fromCSSValue == toCSSValue) | 431 if (fromCSSValue == toCSSValue) |
| 412 return ConstantStyleInterpolation::create(fromCSSValue, property); | 432 return ConstantStyleInterpolation::create(fromCSSValue, property); |
| 413 | 433 |
| 414 if (forceDefaultInterpolation) | 434 if (forceDefaultInterpolation) |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 549 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase( )->cloneForAnimation(m_value); | 569 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase( )->cloneForAnimation(m_value); |
| 550 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()- >cloneForAnimation(toSVGPropertySpecificKeyframe(end).value()); | 570 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()- >cloneForAnimation(toSVGPropertySpecificKeyframe(end).value()); |
| 551 | 571 |
| 552 if (!fromValue || !toValue) | 572 if (!fromValue || !toValue) |
| 553 return nullptr; | 573 return nullptr; |
| 554 | 574 |
| 555 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get( )); | 575 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get( )); |
| 556 } | 576 } |
| 557 | 577 |
| 558 } // namespace blink | 578 } // namespace blink |
| OLD | NEW |