Index: Source/core/rendering/svg/SVGPathData.cpp |
diff --git a/Source/core/rendering/svg/SVGPathData.cpp b/Source/core/rendering/svg/SVGPathData.cpp |
index adafc73821f44f5f37f115fe461c89ffe595e191..e2f02294d5b0ea702bdb3342867e659ff5240b13 100644 |
--- a/Source/core/rendering/svg/SVGPathData.cpp |
+++ b/Source/core/rendering/svg/SVGPathData.cpp |
@@ -50,11 +50,14 @@ static void updatePathFromEllipseElement(SVGElement* element, Path& path) |
SVGLengthContext lengthContext(element); |
float rx = ellipse->rx()->currentValue()->value(lengthContext); |
- if (rx <= 0) |
+ if (rx < 0) |
return; |
float ry = ellipse->ry()->currentValue()->value(lengthContext); |
- if (ry <= 0) |
+ if (ry < 0) |
return; |
+ if (!(rx || ry)) |
pdr.
2014/03/26 00:55:41
It took me a minute to understand this codechange.
|
+ return; |
+ |
path.addEllipse(FloatRect(ellipse->cx()->currentValue()->value(lengthContext) - rx, ellipse->cy()->currentValue()->value(lengthContext) - ry, rx * 2, ry * 2)); |
} |
@@ -100,10 +103,12 @@ static void updatePathFromRectElement(SVGElement* element, Path& path) |
SVGLengthContext lengthContext(element); |
float width = rect->width()->currentValue()->value(lengthContext); |
- if (width <= 0) |
+ if (width < 0) |
return; |
float height = rect->height()->currentValue()->value(lengthContext); |
- if (height <= 0) |
+ if (height < 0) |
+ return; |
+ if (!(width || height)) |
pdr.
2014/03/26 00:55:41
Similarly here, can you fold the negation into the
|
return; |
float x = rect->x()->currentValue()->value(lengthContext); |
float y = rect->y()->currentValue()->value(lengthContext); |