Index: Source/core/layout/svg/LayoutSVGForeignObject.cpp |
diff --git a/Source/core/layout/svg/LayoutSVGForeignObject.cpp b/Source/core/layout/svg/LayoutSVGForeignObject.cpp |
index 298769cb550d6a2d08530aea77fb106b52f22efb..392bc5a92828ff76cddbc8fa4b08ce466ce10f77 100644 |
--- a/Source/core/layout/svg/LayoutSVGForeignObject.cpp |
+++ b/Source/core/layout/svg/LayoutSVGForeignObject.cpp |
@@ -93,8 +93,13 @@ void LayoutSVGForeignObject::layout() |
// Cache viewport boundaries |
SVGLengthContext lengthContext(foreign); |
- FloatPoint viewportLocation(foreign->x()->currentValue()->value(lengthContext), foreign->y()->currentValue()->value(lengthContext)); |
- m_viewport = FloatRect(viewportLocation, FloatSize(foreign->width()->currentValue()->value(lengthContext), foreign->height()->currentValue()->value(lengthContext))); |
+ const LayoutStyle& style = foreign->layoutObject()->styleRef(); |
fs
2015/03/12 14:28:48
Just use styleRef() directly? (foreign->layoutObje
Erik Dahlström (inactive)
2015/03/12 16:14:56
Done.
|
+ FloatPoint viewportLocation( |
+ lengthContext.valueForLength(style.svgStyle().x(), style, SVGLengthMode::Width), |
+ lengthContext.valueForLength(style.svgStyle().y(), style, SVGLengthMode::Height)); |
+ m_viewport = FloatRect(viewportLocation, FloatSize( |
+ lengthContext.valueForLength(style.width(), style, SVGLengthMode::Width), |
+ lengthContext.valueForLength(style.height(), style, SVGLengthMode::Height))); |
if (!updateCachedBoundariesInParents) |
updateCachedBoundariesInParents = oldViewport != m_viewport; |