summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralancutter <alancutter@chromium.org>2015-11-07 16:08:13 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-08 00:09:09 +0000
commit36bb6108a8f0444fea13d008c78d95a7c4f2b956 (patch)
treea7696dfcbac4efb7c8bbb0040e1518d9f32d05c9
parent98479cbd8152a34ea18531abf38749f5e52d1853 (diff)
downloadchromium_src-36bb6108a8f0444fea13d008c78d95a7c4f2b956.zip
chromium_src-36bb6108a8f0444fea13d008c78d95a7c4f2b956.tar.gz
chromium_src-36bb6108a8f0444fea13d008c78d95a7c4f2b956.tar.bz2
Upstream maybeConvertUnderlyingValue() to SVGInterpolationType class
This function is implemented identically for all SVGInterpolationType subclasses except SVGValueInterpolationType, this patch upstreams the common definition. BUG=530436 Review URL: https://codereview.chromium.org/1414493008 Cr-Commit-Position: refs/heads/master@{#358540}
-rw-r--r--third_party/WebKit/Source/core/animation/SVGAngleInterpolationType.cpp5
-rw-r--r--third_party/WebKit/Source/core/animation/SVGAngleInterpolationType.h1
-rw-r--r--third_party/WebKit/Source/core/animation/SVGInterpolationType.cpp5
-rw-r--r--third_party/WebKit/Source/core/animation/SVGInterpolationType.h1
-rw-r--r--third_party/WebKit/Source/core/animation/SVGNumberInterpolationType.cpp5
-rw-r--r--third_party/WebKit/Source/core/animation/SVGNumberInterpolationType.h1
6 files changed, 6 insertions, 12 deletions
diff --git a/third_party/WebKit/Source/core/animation/SVGAngleInterpolationType.cpp b/third_party/WebKit/Source/core/animation/SVGAngleInterpolationType.cpp
index aa3145a..4fced35 100644
--- a/third_party/WebKit/Source/core/animation/SVGAngleInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/SVGAngleInterpolationType.cpp
@@ -23,11 +23,6 @@ PassOwnPtr<InterpolationValue> SVGAngleInterpolationType::maybeConvertSVGValue(c
return InterpolationValue::create(*this, InterpolableNumber::create(toSVGAngle(svgValue).value()));
}
-PassOwnPtr<InterpolationValue> SVGAngleInterpolationType::maybeConvertUnderlyingValue(const InterpolationEnvironment& environment) const
-{
- return maybeConvertSVGValue(environment.svgBaseValue());
-}
-
RefPtrWillBeRawPtr<SVGPropertyBase> SVGAngleInterpolationType::appliedSVGValue(const InterpolableValue& interpolableValue, const NonInterpolableValue*) const
{
double doubleValue = toInterpolableNumber(interpolableValue).value();
diff --git a/third_party/WebKit/Source/core/animation/SVGAngleInterpolationType.h b/third_party/WebKit/Source/core/animation/SVGAngleInterpolationType.h
index 176bf33..15e766e 100644
--- a/third_party/WebKit/Source/core/animation/SVGAngleInterpolationType.h
+++ b/third_party/WebKit/Source/core/animation/SVGAngleInterpolationType.h
@@ -18,7 +18,6 @@ public:
private:
PassOwnPtr<InterpolationValue> maybeConvertNeutral() const final;
PassOwnPtr<InterpolationValue> maybeConvertSVGValue(const SVGPropertyBase& svgValue) const final;
- PassOwnPtr<InterpolationValue> maybeConvertUnderlyingValue(const InterpolationEnvironment&) const final;
RefPtrWillBeRawPtr<SVGPropertyBase> appliedSVGValue(const InterpolableValue&, const NonInterpolableValue*) const final;
};
diff --git a/third_party/WebKit/Source/core/animation/SVGInterpolationType.cpp b/third_party/WebKit/Source/core/animation/SVGInterpolationType.cpp
index 82435d9..0b18d60 100644
--- a/third_party/WebKit/Source/core/animation/SVGInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/SVGInterpolationType.cpp
@@ -20,6 +20,11 @@ PassOwnPtr<InterpolationValue> SVGInterpolationType::maybeConvertSingle(const Pr
return maybeConvertSVGValue(*svgValue);
}
+PassOwnPtr<InterpolationValue> SVGInterpolationType::maybeConvertUnderlyingValue(const InterpolationEnvironment& environment) const
+{
+ return maybeConvertSVGValue(environment.svgBaseValue());
+}
+
void SVGInterpolationType::apply(const InterpolableValue& interpolableValue, const NonInterpolableValue* nonInterpolableValue, InterpolationEnvironment& environment) const
{
SVGElement& targetElement = environment.svgElement();
diff --git a/third_party/WebKit/Source/core/animation/SVGInterpolationType.h b/third_party/WebKit/Source/core/animation/SVGInterpolationType.h
index e8b3b3b..5e4ef44 100644
--- a/third_party/WebKit/Source/core/animation/SVGInterpolationType.h
+++ b/third_party/WebKit/Source/core/animation/SVGInterpolationType.h
@@ -24,6 +24,7 @@ protected:
virtual RefPtrWillBeRawPtr<SVGPropertyBase> appliedSVGValue(const InterpolableValue&, const NonInterpolableValue*) const = 0;
PassOwnPtr<InterpolationValue> maybeConvertSingle(const PropertySpecificKeyframe&, const InterpolationEnvironment&, const UnderlyingValue&, ConversionCheckers&) const override;
+ PassOwnPtr<InterpolationValue> maybeConvertUnderlyingValue(const InterpolationEnvironment&) const override;
void apply(const InterpolableValue&, const NonInterpolableValue*, InterpolationEnvironment&) const final;
};
diff --git a/third_party/WebKit/Source/core/animation/SVGNumberInterpolationType.cpp b/third_party/WebKit/Source/core/animation/SVGNumberInterpolationType.cpp
index 86702f4..820077f 100644
--- a/third_party/WebKit/Source/core/animation/SVGNumberInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/SVGNumberInterpolationType.cpp
@@ -24,11 +24,6 @@ PassOwnPtr<InterpolationValue> SVGNumberInterpolationType::maybeConvertSVGValue(
return InterpolationValue::create(*this, InterpolableNumber::create(toSVGNumber(svgValue).value()));
}
-PassOwnPtr<InterpolationValue> SVGNumberInterpolationType::maybeConvertUnderlyingValue(const InterpolationEnvironment& environment) const
-{
- return maybeConvertSVGValue(environment.svgBaseValue());
-}
-
RefPtrWillBeRawPtr<SVGPropertyBase> SVGNumberInterpolationType::appliedSVGValue(const InterpolableValue& interpolableValue, const NonInterpolableValue*) const
{
double value = toInterpolableNumber(interpolableValue).value();
diff --git a/third_party/WebKit/Source/core/animation/SVGNumberInterpolationType.h b/third_party/WebKit/Source/core/animation/SVGNumberInterpolationType.h
index 05aa0b8..e169aaf 100644
--- a/third_party/WebKit/Source/core/animation/SVGNumberInterpolationType.h
+++ b/third_party/WebKit/Source/core/animation/SVGNumberInterpolationType.h
@@ -20,7 +20,6 @@ public:
private:
PassOwnPtr<InterpolationValue> maybeConvertNeutral() const final;
PassOwnPtr<InterpolationValue> maybeConvertSVGValue(const SVGPropertyBase& svgValue) const final;
- PassOwnPtr<InterpolationValue> maybeConvertUnderlyingValue(const InterpolationEnvironment&) const final;
RefPtrWillBeRawPtr<SVGPropertyBase> appliedSVGValue(const InterpolableValue&, const NonInterpolableValue*) const final;
bool m_isNonNegative;