Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp |
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp |
index 6a16ef6e0c526312cb58eb02bede00019b3fea8b..00f9cd2947c2d7acf6f7be30da72749a396759be 100644 |
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp |
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp |
@@ -39,15 +39,6 @@ |
namespace blink { |
-namespace { |
- |
-FloatSize calculateIntrinsicSize(const SVGSVGElement& svg) |
-{ |
- return FloatSize(floatValueForLength(svg.intrinsicWidth(), 0), floatValueForLength(svg.intrinsicHeight(), 0)); |
-} |
- |
-} // namespace |
- |
LayoutSVGRoot::LayoutSVGRoot(SVGElement* node) |
: LayoutReplaced(node) |
, m_objectBoundingBoxValid(false) |
@@ -60,7 +51,7 @@ LayoutSVGRoot::LayoutSVGRoot(SVGElement* node) |
SVGSVGElement* svg = toSVGSVGElement(node); |
ASSERT(svg); |
- LayoutSize intrinsicSize(calculateIntrinsicSize(*svg)); |
+ LayoutSize intrinsicSize(svg->intrinsicWidth(), svg->intrinsicHeight()); |
if (!svg->hasIntrinsicWidth()) |
intrinsicSize.setWidth(LayoutUnit(defaultWidth)); |
if (!svg->hasIntrinsicHeight()) |
@@ -79,7 +70,7 @@ void LayoutSVGRoot::computeIntrinsicSizingInfo(IntrinsicSizingInfo& intrinsicSiz |
SVGSVGElement* svg = toSVGSVGElement(node()); |
ASSERT(svg); |
- intrinsicSizingInfo.size = calculateIntrinsicSize(*svg); |
+ intrinsicSizingInfo.size = FloatSize(svg->intrinsicWidth(), svg->intrinsicHeight()); |
intrinsicSizingInfo.hasWidth = svg->hasIntrinsicWidth(); |
intrinsicSizingInfo.hasHeight = svg->hasIntrinsicHeight(); |