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

Unified Diff: Source/core/animation/SVGLengthStyleInterpolation.cpp

Issue 956553004: Use Length for baselineShiftValue in SVGLayoutStyle (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: A few more TEs. Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/animation/SVGLengthStyleInterpolation.cpp
diff --git a/Source/core/animation/SVGLengthStyleInterpolation.cpp b/Source/core/animation/SVGLengthStyleInterpolation.cpp
index 4af667c11a55348d14742e82d53ab07c0f852fca..7d0415c7389a8f37500b59b973419fbb5cebf31d 100644
--- a/Source/core/animation/SVGLengthStyleInterpolation.cpp
+++ b/Source/core/animation/SVGLengthStyleInterpolation.cpp
@@ -9,18 +9,6 @@
namespace blink {
-namespace {
-
-bool isBaseline(const CSSValue& value)
-{
- if (!value.isPrimitiveValue())
- return false;
- const CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(value);
- return primitiveValue.isValueID() && primitiveValue.getValueID() == CSSValueBaseline;
-}
-
-} // namespace
-
bool SVGLengthStyleInterpolation::canCreateFrom(const CSSValue& value)
{
if (!value.isPrimitiveValue())
@@ -40,7 +28,7 @@ bool SVGLengthStyleInterpolation::canCreateFrom(const CSSValue& value)
return true;
default:
- return isBaseline(value);
+ return false;
}
}
@@ -64,11 +52,8 @@ PassRefPtrWillBeRawPtr<SVGLengthStyleInterpolation> SVGLengthStyleInterpolation:
if (!canCreateFrom(start) || !canCreateFrom(end))
return nullptr;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> zero = CSSPrimitiveValue::create(0, CSSPrimitiveValue::CSS_PX);
- const CSSPrimitiveValue& primitiveStart =
- isBaseline(start) ? *zero : toCSSPrimitiveValue(start);
- const CSSPrimitiveValue& primitiveEnd =
- isBaseline(end) ? *zero : toCSSPrimitiveValue(end);
+ const CSSPrimitiveValue& primitiveStart = toCSSPrimitiveValue(start);
+ const CSSPrimitiveValue& primitiveEnd = toCSSPrimitiveValue(end);
CSSPrimitiveValue::UnitType type = primitiveStart.primitiveType();
if (primitiveStart.getDoubleValue() == 0)

Powered by Google App Engine
This is Rietveld 408576698