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

Unified Diff: Source/core/css/CSSPrimitiveValue.cpp

Issue 1162453002: [svg2] Make SVGLength wrap a CSSPrimitiveValue (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: nit Created 5 years, 7 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
« no previous file with comments | « Source/core/animation/LengthSVGInterpolation.cpp ('k') | Source/core/css/parser/CSSParserFastPaths.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSPrimitiveValue.cpp
diff --git a/Source/core/css/CSSPrimitiveValue.cpp b/Source/core/css/CSSPrimitiveValue.cpp
index 0fc04f0ad270edc9d6df18fa4a22119fd402f35d..fac0d2c93ed0be68decdbd1bb4181d3a70e265c5 100644
--- a/Source/core/css/CSSPrimitiveValue.cpp
+++ b/Source/core/css/CSSPrimitiveValue.cpp
@@ -699,6 +699,8 @@ Length CSSPrimitiveValue::convertToLength(const CSSToLengthConversionData& conve
return computeLength<Length>(conversionData);
if (isPercentage())
return Length(getDoubleValue(), Percent);
+ if (isNumber())
+ return Length(getDoubleValue() * conversionData.zoom(), Fixed);
ASSERT(isCalculated());
return Length(cssCalcValue()->toCalcValue(conversionData));
}
« no previous file with comments | « Source/core/animation/LengthSVGInterpolation.cpp ('k') | Source/core/css/parser/CSSParserFastPaths.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698