Index: Source/core/rendering/svg/RenderSVGRoot.cpp |
diff --git a/Source/core/rendering/svg/RenderSVGRoot.cpp b/Source/core/rendering/svg/RenderSVGRoot.cpp |
index a4355cd4d9a64fa26624811b990ef5e4b1af31da..5ef015ca7ec23ef07e790a8e1e15c1241a2276b8 100644 |
--- a/Source/core/rendering/svg/RenderSVGRoot.cpp |
+++ b/Source/core/rendering/svg/RenderSVGRoot.cpp |
@@ -38,6 +38,7 @@ |
#include "core/svg/SVGElement.h" |
#include "core/svg/SVGSVGElement.h" |
#include "core/svg/graphics/SVGImage.h" |
+#include "platform/LengthFunctions.h" |
#include "platform/graphics/GraphicsContext.h" |
using namespace std; |
@@ -79,9 +80,9 @@ void RenderSVGRoot::computeIntrinsicRatioInformation(FloatSize& intrinsicSize, d |
// resolving both values to user units. |
if (intrinsicWidthAttribute.isFixed() || intrinsicHeightAttribute.isFixed()) { |
if (intrinsicWidthAttribute.isFixed()) |
- intrinsicSize.setWidth(floatValueForLength(intrinsicWidthAttribute, 0, 0)); |
+ intrinsicSize.setWidth(floatValueForLength(intrinsicWidthAttribute, 0)); |
if (intrinsicHeightAttribute.isFixed()) |
- intrinsicSize.setHeight(floatValueForLength(intrinsicHeightAttribute, 0, 0)); |
+ intrinsicSize.setHeight(floatValueForLength(intrinsicHeightAttribute, 0)); |
if (!intrinsicSize.isEmpty()) |
intrinsicRatio = intrinsicSize.width() / static_cast<double>(intrinsicSize.height()); |
return; |
@@ -128,9 +129,9 @@ bool RenderSVGRoot::isEmbeddedThroughFrameContainingSVGDocument() const |
return frame->document()->isSVGDocument(); |
} |
-static inline LayoutUnit resolveLengthAttributeForSVG(const Length& length, float scale, float maxSize, RenderView* renderView) |
+static inline LayoutUnit resolveLengthAttributeForSVG(const Length& length, float scale, float maxSize) |
{ |
- return static_cast<LayoutUnit>(valueForLength(length, maxSize, renderView) * (length.isFixed() ? scale : 1)); |
+ return static_cast<LayoutUnit>(valueForLength(length, maxSize) * (length.isFixed() ? scale : 1)); |
} |
LayoutUnit RenderSVGRoot::computeReplacedLogicalWidth(ShouldComputePreferred shouldComputePreferred) const |
@@ -146,7 +147,7 @@ LayoutUnit RenderSVGRoot::computeReplacedLogicalWidth(ShouldComputePreferred sho |
return RenderReplaced::computeReplacedLogicalWidth(shouldComputePreferred); |
if (svg->widthAttributeEstablishesViewport()) |
- return resolveLengthAttributeForSVG(svg->intrinsicWidth(SVGSVGElement::IgnoreCSSProperties), style()->effectiveZoom(), containingBlock()->availableLogicalWidth(), view()); |
+ return resolveLengthAttributeForSVG(svg->intrinsicWidth(SVGSVGElement::IgnoreCSSProperties), style()->effectiveZoom(), containingBlock()->availableLogicalWidth()); |
// SVG embedded through object/embed/iframe. |
if (isEmbeddedThroughFrameContainingSVGDocument()) |
@@ -180,7 +181,7 @@ LayoutUnit RenderSVGRoot::computeReplacedLogicalHeight() const |
} else |
RenderBlock::removePercentHeightDescendant(const_cast<RenderSVGRoot*>(this)); |
- return resolveLengthAttributeForSVG(height, style()->effectiveZoom(), containingBlock()->availableLogicalHeight(IncludeMarginBorderPadding), view()); |
+ return resolveLengthAttributeForSVG(height, style()->effectiveZoom(), containingBlock()->availableLogicalHeight(IncludeMarginBorderPadding)); |
} |
// SVG embedded through object/embed/iframe. |