Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGRect.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGRect.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGRect.cpp |
| index 5e1703f8eddd91ef701ac1ad71fff75129f4acf4..bb97c299c4aa1870992b27417fcf19d33e77beae 100644 |
| --- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGRect.cpp |
| +++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGRect.cpp |
| @@ -54,8 +54,8 @@ void LayoutSVGRect::updateShapeFromElement() |
| SVGLengthContext lengthContext(rect); |
| FloatSize boundingBoxSize( |
| - lengthContext.valueForLength(styleRef().width(), styleRef(), SVGLengthMode::Width), |
| - lengthContext.valueForLength(styleRef().height(), styleRef(), SVGLengthMode::Height)); |
| + styleRef().width().isAuto() ? rect->width()->currentValue()->value(lengthContext) : lengthContext.valueForLength(styleRef().width(), styleRef(), SVGLengthMode::Width), |
|
fs
2016/08/10 18:01:34
I'd suggest to leave this alone for now. (Not sure
Shanmuga Pandi
2016/08/11 05:54:20
Acknowledged.
|
| + styleRef().height().isAuto() ? rect->height()->currentValue()->value(lengthContext) : lengthContext.valueForLength(styleRef().height(), styleRef(), SVGLengthMode::Height)); |
| // Spec: "A negative value is an error." |
| if (boundingBoxSize.width() < 0 || boundingBoxSize.height() < 0) |