| Index: third_party/WebKit/Source/core/animation/animatable/AnimatableSVGPaint.cpp
|
| diff --git a/third_party/WebKit/Source/core/animation/animatable/AnimatableSVGPaint.cpp b/third_party/WebKit/Source/core/animation/animatable/AnimatableSVGPaint.cpp
|
| index 3082335683bc844c37479f69e5996e8e7b64be34..b95dbd12150e77b0e544d3de06f5e7691891d1e0 100644
|
| --- a/third_party/WebKit/Source/core/animation/animatable/AnimatableSVGPaint.cpp
|
| +++ b/third_party/WebKit/Source/core/animation/animatable/AnimatableSVGPaint.cpp
|
| @@ -32,39 +32,12 @@
|
|
|
| namespace blink {
|
|
|
| -bool AnimatableSVGPaint::usesDefaultInterpolationWith(
|
| - const AnimatableValue* value) const {
|
| - const AnimatableSVGPaint* svgPaint = toAnimatableSVGPaint(value);
|
| - return (paintType() != SVG_PAINTTYPE_RGBCOLOR ||
|
| - svgPaint->paintType() != SVG_PAINTTYPE_RGBCOLOR) &&
|
| - (visitedLinkPaintType() != SVG_PAINTTYPE_RGBCOLOR ||
|
| - svgPaint->visitedLinkPaintType() != SVG_PAINTTYPE_RGBCOLOR);
|
| -}
|
| -
|
| -PassRefPtr<AnimatableValue> AnimatableSVGPaint::interpolateTo(
|
| - const AnimatableValue* value,
|
| - double fraction) const {
|
| - if (usesDefaultInterpolationWith(value))
|
| - return defaultInterpolateTo(this, value, fraction);
|
| -
|
| - const AnimatableSVGPaint* svgPaint = toAnimatableSVGPaint(value);
|
| - RefPtr<AnimatableColor> color =
|
| - toAnimatableColor(AnimatableValue::interpolate(
|
| - m_color.get(), svgPaint->m_color.get(), fraction)
|
| - .get());
|
| - if (fraction < 0.5)
|
| - return create(paintType(), visitedLinkPaintType(), color, uri(),
|
| - visitedLinkURI());
|
| - return create(svgPaint->paintType(), svgPaint->visitedLinkPaintType(), color,
|
| - svgPaint->uri(), svgPaint->visitedLinkURI());
|
| -}
|
| -
|
| bool AnimatableSVGPaint::equalTo(const AnimatableValue* value) const {
|
| const AnimatableSVGPaint* svgPaint = toAnimatableSVGPaint(value);
|
| - return paintType() == svgPaint->paintType() &&
|
| - visitedLinkPaintType() == svgPaint->visitedLinkPaintType() &&
|
| - getColor() == svgPaint->getColor() && uri() == svgPaint->uri() &&
|
| - visitedLinkURI() == svgPaint->visitedLinkURI();
|
| + return m_type == svgPaint->m_type &&
|
| + m_visitedLinkType == svgPaint->m_visitedLinkType &&
|
| + m_color->equals(svgPaint->m_color.get()) && m_uri == svgPaint->m_uri &&
|
| + m_visitedLinkURI == svgPaint->m_visitedLinkURI;
|
| }
|
|
|
| } // namespace blink
|
|
|