Index: Source/core/svg/SVGLengthContext.cpp |
diff --git a/Source/core/svg/SVGLengthContext.cpp b/Source/core/svg/SVGLengthContext.cpp |
index 4f229d37b1ff000f0601d32346b4a59b73e4cd05..13c8784f7473ca59b853d36378192259f97b00fa 100644 |
--- a/Source/core/svg/SVGLengthContext.cpp |
+++ b/Source/core/svg/SVGLengthContext.cpp |
@@ -98,20 +98,21 @@ float SVGLengthContext::resolveLength(const SVGElement* context, SVGUnitTypes::S |
float SVGLengthContext::valueForLength(const Length& length, const LayoutStyle& style, SVGLengthMode mode) const |
{ |
- return valueForLengthWithZoom(length, style.effectiveZoom(), mode); |
-} |
- |
-float SVGLengthContext::valueForLengthWithZoom(const Length& length, float zoom, SVGLengthMode mode) const |
-{ |
- ASSERT(zoom != 0); |
float dimension = 0; |
if (length.isPercent()) { |
FloatSize viewportSize; |
determineViewport(viewportSize); |
// The viewport will be unaffected by zoom. |
- dimension = dimensionForLengthMode(mode, viewportSize) * zoom; |
+ dimension = dimensionForLengthMode(mode, viewportSize); |
} |
- return floatValueForLength(length, dimension) / zoom; |
+ return valueForLength(length, style, dimension); |
+} |
+ |
+float SVGLengthContext::valueForLength(const Length& length, const LayoutStyle& style, float dimension) |
+{ |
+ const float zoom = style.effectiveZoom(); |
+ ASSERT(zoom != 0); |
+ return floatValueForLength(length, dimension * zoom) / zoom; |
} |
float SVGLengthContext::convertValueToUserUnits(float value, SVGLengthMode mode, SVGLengthType fromUnit) const |