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

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

Issue 955033002: [svg2] Make 'rx' and 'ry' presentation attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add tests 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
Index: Source/core/layout/svg/LayoutSVGRect.cpp
diff --git a/Source/core/layout/svg/LayoutSVGRect.cpp b/Source/core/layout/svg/LayoutSVGRect.cpp
index 7a350d14b3817fb8dd440031619e36060edacd70..28f461212b682b07a8963077c84525472dfe9e52 100644
--- a/Source/core/layout/svg/LayoutSVGRect.cpp
+++ b/Source/core/layout/svg/LayoutSVGRect.cpp
@@ -64,8 +64,8 @@ void LayoutSVGRect::updateShapeFromElement()
if (!boundingBoxSize.isEmpty()) {
// Fallback to LayoutSVGShape and path-based hit detection if the rect
// has rounded corners or a non-scaling or non-simple stroke.
- if (rect->rx()->currentValue()->value(lengthContext) > 0
- || rect->ry()->currentValue()->value(lengthContext) > 0
+ if (lengthContext.valueForLength(style()->svgStyle().rx(), styleRef(), LengthModeWidth) > 0
+ || lengthContext.valueForLength(style()->svgStyle().ry(), styleRef(), LengthModeHeight) > 0
|| hasNonScalingStroke()
|| !definitelyHasSimpleStroke()) {
LayoutSVGShape::updateShapeFromElement();

Powered by Google App Engine
This is Rietveld 408576698