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

Unified Diff: Source/core/layout/svg/SVGPathData.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/layout/svg/LayoutSVGRect.cpp ('k') | Source/core/svg/SVGImageElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/svg/SVGPathData.cpp
diff --git a/Source/core/layout/svg/SVGPathData.cpp b/Source/core/layout/svg/SVGPathData.cpp
index 1830da82ab27a113b2607d963c807e83b21c9bf2..53dd57b9655dfd7d1167c8610e2de0a15c7a98ac 100644
--- a/Source/core/layout/svg/SVGPathData.cpp
+++ b/Source/core/layout/svg/SVGPathData.cpp
@@ -116,16 +116,16 @@ static void updatePathFromRectElement(SVGElement* element, Path& path)
ASSERT(rect->layoutObject());
SVGLengthContext lengthContext(element);
- float width = rect->width()->currentValue()->value(lengthContext);
+ const LayoutStyle& style = rect->layoutObject()->styleRef();
+ float width = lengthContext.valueForLength(style.width(), style, SVGLengthMode::Width);
if (width < 0)
return;
- float height = rect->height()->currentValue()->value(lengthContext);
+ float height = lengthContext.valueForLength(style.height(), style, SVGLengthMode::Height);
if (height < 0)
return;
if (!width && !height)
return;
- const LayoutStyle& style = rect->layoutObject()->styleRef();
float x = lengthContext.valueForLength(style.svgStyle().x(), style, SVGLengthMode::Width);
float y = lengthContext.valueForLength(style.svgStyle().y(), style, SVGLengthMode::Height);
float rx = lengthContext.valueForLength(style.svgStyle().rx(), style, SVGLengthMode::Width);
« no previous file with comments | « Source/core/layout/svg/LayoutSVGRect.cpp ('k') | Source/core/svg/SVGImageElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698