| 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/XLinkNames.h" | 8 #include "core/XLinkNames.h" |
| 9 #include "core/animation/CSSColorInterpolationType.h" | 9 #include "core/animation/CSSColorInterpolationType.h" |
| 10 #include "core/animation/CSSImageInterpolationType.h" | 10 #include "core/animation/CSSImageInterpolationType.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "core/animation/LegacyStyleInterpolation.h" | 28 #include "core/animation/LegacyStyleInterpolation.h" |
| 29 #include "core/animation/LengthBoxStyleInterpolation.h" | 29 #include "core/animation/LengthBoxStyleInterpolation.h" |
| 30 #include "core/animation/LengthPairStyleInterpolation.h" | 30 #include "core/animation/LengthPairStyleInterpolation.h" |
| 31 #include "core/animation/LengthSVGInterpolation.h" | 31 #include "core/animation/LengthSVGInterpolation.h" |
| 32 #include "core/animation/LengthStyleInterpolation.h" | 32 #include "core/animation/LengthStyleInterpolation.h" |
| 33 #include "core/animation/ListSVGInterpolation.h" | 33 #include "core/animation/ListSVGInterpolation.h" |
| 34 #include "core/animation/ListStyleInterpolation.h" | 34 #include "core/animation/ListStyleInterpolation.h" |
| 35 #include "core/animation/NumberOptionalNumberSVGInterpolation.h" | 35 #include "core/animation/NumberOptionalNumberSVGInterpolation.h" |
| 36 #include "core/animation/NumberSVGInterpolation.h" | 36 #include "core/animation/NumberSVGInterpolation.h" |
| 37 #include "core/animation/PathSVGInterpolation.h" | 37 #include "core/animation/PathSVGInterpolation.h" |
| 38 #include "core/animation/PointSVGInterpolation.h" | |
| 39 #include "core/animation/RectSVGInterpolation.h" | 38 #include "core/animation/RectSVGInterpolation.h" |
| 40 #include "core/animation/SVGAngleInterpolationType.h" | 39 #include "core/animation/SVGAngleInterpolationType.h" |
| 41 #include "core/animation/SVGNumberInterpolationType.h" | 40 #include "core/animation/SVGNumberInterpolationType.h" |
| 41 #include "core/animation/SVGPointListInterpolationType.h" |
| 42 #include "core/animation/SVGStrokeDasharrayStyleInterpolation.h" | 42 #include "core/animation/SVGStrokeDasharrayStyleInterpolation.h" |
| 43 #include "core/animation/SVGValueInterpolationType.h" | 43 #include "core/animation/SVGValueInterpolationType.h" |
| 44 #include "core/animation/TransformSVGInterpolation.h" | 44 #include "core/animation/TransformSVGInterpolation.h" |
| 45 #include "core/animation/VisibilityStyleInterpolation.h" | 45 #include "core/animation/VisibilityStyleInterpolation.h" |
| 46 #include "core/animation/css/CSSAnimations.h" | 46 #include "core/animation/css/CSSAnimations.h" |
| 47 #include "core/css/CSSPropertyMetadata.h" | 47 #include "core/css/CSSPropertyMetadata.h" |
| 48 #include "core/css/resolver/StyleResolver.h" | 48 #include "core/css/resolver/StyleResolver.h" |
| 49 #include "core/style/ComputedStyle.h" | 49 #include "core/style/ComputedStyle.h" |
| 50 #include "core/svg/SVGElement.h" | 50 #include "core/svg/SVGElement.h" |
| 51 #include "platform/RuntimeEnabledFeatures.h" | 51 #include "platform/RuntimeEnabledFeatures.h" |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 || attribute == SVGNames::pointsAtYAttr | 287 || attribute == SVGNames::pointsAtYAttr |
| 288 || attribute == SVGNames::pointsAtZAttr | 288 || attribute == SVGNames::pointsAtZAttr |
| 289 || attribute == SVGNames::scaleAttr | 289 || attribute == SVGNames::scaleAttr |
| 290 || attribute == SVGNames::seedAttr | 290 || attribute == SVGNames::seedAttr |
| 291 || attribute == SVGNames::slopeAttr | 291 || attribute == SVGNames::slopeAttr |
| 292 || attribute == SVGNames::specularConstantAttr | 292 || attribute == SVGNames::specularConstantAttr |
| 293 || attribute == SVGNames::specularExponentAttr | 293 || attribute == SVGNames::specularExponentAttr |
| 294 || attribute == SVGNames::surfaceScaleAttr | 294 || attribute == SVGNames::surfaceScaleAttr |
| 295 || attribute == SVGNames::zAttr) { | 295 || attribute == SVGNames::zAttr) { |
| 296 applicableTypes->append(adoptPtr(new SVGNumberInterpolationType(attr
ibute))); | 296 applicableTypes->append(adoptPtr(new SVGNumberInterpolationType(attr
ibute))); |
| 297 } else if (attribute == SVGNames::pointsAttr) { |
| 298 applicableTypes->append(adoptPtr(new SVGPointListInterpolationType(a
ttribute))); |
| 297 } else if (attribute == HTMLNames::classAttr | 299 } else if (attribute == HTMLNames::classAttr |
| 298 || attribute == SVGNames::clipPathUnitsAttr | 300 || attribute == SVGNames::clipPathUnitsAttr |
| 299 || attribute == SVGNames::edgeModeAttr | 301 || attribute == SVGNames::edgeModeAttr |
| 300 || attribute == SVGNames::filterUnitsAttr | 302 || attribute == SVGNames::filterUnitsAttr |
| 301 || attribute == SVGNames::gradientUnitsAttr | 303 || attribute == SVGNames::gradientUnitsAttr |
| 302 || attribute == SVGNames::inAttr | 304 || attribute == SVGNames::inAttr |
| 303 || attribute == SVGNames::in2Attr | 305 || attribute == SVGNames::in2Attr |
| 304 || attribute == SVGNames::lengthAdjustAttr | 306 || attribute == SVGNames::lengthAdjustAttr |
| 305 || attribute == SVGNames::markerUnitsAttr | 307 || attribute == SVGNames::markerUnitsAttr |
| 306 || attribute == SVGNames::maskContentUnitsAttr | 308 || attribute == SVGNames::maskContentUnitsAttr |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 interpolation = ListSVGInterpolation<LengthSVGInterpolation>::maybeCreat
e(fromValue, toValue, attribute); | 567 interpolation = ListSVGInterpolation<LengthSVGInterpolation>::maybeCreat
e(fromValue, toValue, attribute); |
| 566 break; | 568 break; |
| 567 case AnimatedNumberOptionalNumber: | 569 case AnimatedNumberOptionalNumber: |
| 568 return NumberOptionalNumberSVGInterpolation::create(fromValue, toValue,
attribute); | 570 return NumberOptionalNumberSVGInterpolation::create(fromValue, toValue,
attribute); |
| 569 case AnimatedNumberList: | 571 case AnimatedNumberList: |
| 570 interpolation = ListSVGInterpolation<NumberSVGInterpolation>::maybeCreat
e(fromValue, toValue, attribute); | 572 interpolation = ListSVGInterpolation<NumberSVGInterpolation>::maybeCreat
e(fromValue, toValue, attribute); |
| 571 break; | 573 break; |
| 572 case AnimatedPath: | 574 case AnimatedPath: |
| 573 interpolation = PathSVGInterpolation::maybeCreate(fromValue, toValue, at
tribute); | 575 interpolation = PathSVGInterpolation::maybeCreate(fromValue, toValue, at
tribute); |
| 574 break; | 576 break; |
| 575 case AnimatedPoints: | |
| 576 interpolation = ListSVGInterpolation<PointSVGInterpolation>::maybeCreate
(fromValue, toValue, attribute); | |
| 577 break; | |
| 578 case AnimatedRect: | 577 case AnimatedRect: |
| 579 return RectSVGInterpolation::create(fromValue, toValue, attribute); | 578 return RectSVGInterpolation::create(fromValue, toValue, attribute); |
| 580 case AnimatedTransformList: | 579 case AnimatedTransformList: |
| 581 interpolation = ListSVGInterpolation<TransformSVGInterpolation>::maybeCr
eate(fromValue, toValue, attribute); | 580 interpolation = ListSVGInterpolation<TransformSVGInterpolation>::maybeCr
eate(fromValue, toValue, attribute); |
| 582 break; | 581 break; |
| 583 | 582 |
| 584 // Handled by SVGInterpolationTypes. | 583 // Handled by SVGInterpolationTypes. |
| 585 case AnimatedAngle: | 584 case AnimatedAngle: |
| 586 case AnimatedNumber: | 585 case AnimatedNumber: |
| 586 case AnimatedPoints: |
| 587 ASSERT_NOT_REACHED(); | 587 ASSERT_NOT_REACHED(); |
| 588 // Fallthrough. | 588 // Fallthrough. |
| 589 | 589 |
| 590 // TODO(ericwilligers): Support more animation types. | 590 // TODO(ericwilligers): Support more animation types. |
| 591 default: | 591 default: |
| 592 break; | 592 break; |
| 593 } | 593 } |
| 594 if (interpolation) | 594 if (interpolation) |
| 595 return interpolation.release(); | 595 return interpolation.release(); |
| 596 | 596 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 612 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase(
)->cloneForAnimation(m_value); | 612 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase(
)->cloneForAnimation(m_value); |
| 613 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()-
>cloneForAnimation(toSVGPropertySpecificKeyframe(end).value()); | 613 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()-
>cloneForAnimation(toSVGPropertySpecificKeyframe(end).value()); |
| 614 | 614 |
| 615 if (!fromValue || !toValue) | 615 if (!fromValue || !toValue) |
| 616 return nullptr; | 616 return nullptr; |
| 617 | 617 |
| 618 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get(
)); | 618 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get(
)); |
| 619 } | 619 } |
| 620 | 620 |
| 621 } // namespace blink | 621 } // namespace blink |
| OLD | NEW |