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

Unified Diff: Source/core/layout/svg/LayoutSVGForeignObject.cpp

Issue 963733002: [svg2] Make 'width' and 'height' presentation attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebaseline some EX tests [Mac Win] Created 5 years, 9 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/css/CSSPrimitiveValue.cpp ('k') | Source/core/layout/svg/LayoutSVGImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3cfa30a0ec7f4b2a036086047b451f6944bd9203 100644
--- a/Source/core/layout/svg/LayoutSVGForeignObject.cpp
+++ b/Source/core/layout/svg/LayoutSVGForeignObject.cpp
@@ -93,8 +93,12 @@ 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)));
+ FloatPoint viewportLocation(
+ lengthContext.valueForLength(styleRef().svgStyle().x(), styleRef(), SVGLengthMode::Width),
+ lengthContext.valueForLength(styleRef().svgStyle().y(), styleRef(), SVGLengthMode::Height));
+ m_viewport = FloatRect(viewportLocation, FloatSize(
+ lengthContext.valueForLength(styleRef().width(), styleRef(), SVGLengthMode::Width),
+ lengthContext.valueForLength(styleRef().height(), styleRef(), SVGLengthMode::Height)));
if (!updateCachedBoundariesInParents)
updateCachedBoundariesInParents = oldViewport != m_viewport;
« no previous file with comments | « Source/core/css/CSSPrimitiveValue.cpp ('k') | Source/core/layout/svg/LayoutSVGImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698