RESOLVED FIXED 4706
Shapes with zero width or height shouldn't be rendered
https://bugs.webkit.org/show_bug.cgi?id=4706
Summary Shapes with zero width or height shouldn't be rendered
Tobias Lidskog
Reported 2005-08-28 02:03:21 PDT
According to the spec (http://www.w3.org/TR/SVG/shapes.html) shapes such as rectangles and ellipses shouldn't be rendered when the width or height is zero, no matter the stroke. This isn't true for the current implementation of WebCore+SVG.
Attachments
don't create 0x0 paths (9.06 KB, patch)
2005-08-28 02:04 PDT, Tobias Lidskog
no flags
updated png result (507 bytes, image/png)
2005-08-28 02:06 PDT, Tobias Lidskog
no flags
previous rendering (554 bytes, image/png)
2005-08-28 02:08 PDT, Tobias Lidskog
no flags
slightly better ifs (8.86 KB, patch)
2005-08-28 02:17 PDT, Tobias Lidskog
tobiaslidskog: review-
now with correct logic (8.43 KB, patch)
2005-08-28 02:37 PDT, Tobias Lidskog
eric: review+
Tobias Lidskog
Comment 1 2005-08-28 02:04:29 PDT
Created attachment 3616 [details] don't create 0x0 paths WildFox and rwlbuis over at #ksvg seemed ok with this fix
Tobias Lidskog
Comment 2 2005-08-28 02:06:05 PDT
Created attachment 3617 [details] updated png result this png need to be changed in cvs as well, in the Resources folder
Tobias Lidskog
Comment 3 2005-08-28 02:08:06 PDT
Created attachment 3618 [details] previous rendering Attached the previous rendering for reference. The relevant svg code is: <rect x="2" y="10" width="0" height="20" style="fill: lightgreen"> <animate attributeName="width" attributeType="XML" from="0" to="120" begin="1s" dur="5s" fill="freeze"/> </rect> Since the pixel tests dump the first frame the rect should be 0x0 and therefor not rendered
Tobias Lidskog
Comment 4 2005-08-28 02:17:34 PDT
Created attachment 3619 [details] slightly better ifs
Tobias Lidskog
Comment 5 2005-08-28 02:34:15 PDT
Comment on attachment 3619 [details] slightly better ifs accidently reversed logic =(
Tobias Lidskog
Comment 6 2005-08-28 02:37:55 PDT
Created attachment 3621 [details] now with correct logic
Eric Seidel (no email)
Comment 7 2005-08-28 03:08:14 PDT
Comment on attachment 3621 [details] now with correct logic I'm not sure that zero-length lines aren't supposed to be still rendered as "points"... but since the spec seems unclear on this, I'm OK with this patch. A 0d point doesn't make as much sense in a scalable world...
Note You need to log in before you can comment on or make changes to this bug.