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

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

Issue 896773002: [svg2] Make 'x' and 'y' presentation attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 10 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/style/SVGLayoutStyleDefs.cpp ('k') | Source/core/layout/svg/SVGPathData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/svg/LayoutSVGRect.cpp
diff --git a/Source/core/layout/svg/LayoutSVGRect.cpp b/Source/core/layout/svg/LayoutSVGRect.cpp
index b0c2ee717715973ebba9dc0485ce4c3116ccba86..c41e28d6e5bbad496ffdbdb7166209ea8e06a85c 100644
--- a/Source/core/layout/svg/LayoutSVGRect.cpp
+++ b/Source/core/layout/svg/LayoutSVGRect.cpp
@@ -74,7 +74,11 @@ void LayoutSVGRect::updateShapeFromElement()
}
}
- m_fillBoundingBox = FloatRect(FloatPoint(rect->x()->currentValue()->value(lengthContext), rect->y()->currentValue()->value(lengthContext)), boundingBoxSize);
+ m_fillBoundingBox = FloatRect(
+ FloatPoint(
+ lengthContext.valueForLength(style()->svgStyle().x(), LengthModeWidth),
+ lengthContext.valueForLength(style()->svgStyle().y(), LengthModeHeight)),
+ boundingBoxSize);
// To decide if the stroke contains a point we create two rects which represent the inner and
// the outer stroke borders. A stroke contains the point, if the point is between them.
« no previous file with comments | « Source/core/layout/style/SVGLayoutStyleDefs.cpp ('k') | Source/core/layout/svg/SVGPathData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698