Bug 14241 - SVG <image> with height or width less than 1 fails to render image
Summary: SVG <image> with height or width less than 1 fails to render image
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-20 12:58 PDT by Jean-Pierre Fiset
Modified: 2007-06-28 01:59 PDT (History)
2 users (show)

See Also:


Attachments
external image (13.86 KB, image/png)
2007-06-20 13:01 PDT, Jean-Pierre Fiset
no flags Details
Test Case (1.39 KB, image/svg+xml)
2007-06-20 13:03 PDT, Jean-Pierre Fiset
no flags Details
First attempt (68.95 KB, patch)
2007-06-23 02:08 PDT, Rob Buis
mjs: review-
Details | Formatted Diff | Diff
Addressing the current issues (70.71 KB, patch)
2007-06-27 00:51 PDT, Rob Buis
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Pierre Fiset 2007-06-20 12:58:37 PDT
SVG <image> tag with height or width less than 1 fails to paint image, regardless if the established viewport is valid through coordinate transformations.
Comment 1 Jean-Pierre Fiset 2007-06-20 13:01:34 PDT
Created attachment 15142 [details]
external image
Comment 2 Jean-Pierre Fiset 2007-06-20 13:03:04 PDT
Created attachment 15143 [details]
Test Case
Comment 3 Rob Buis 2007-06-23 02:08:00 PDT
Created attachment 15192 [details]
First attempt

This is a bit of a hack, but I guess it just can't work using Length.
Cheers,

Rob.
Comment 4 Maciej Stachowiak 2007-06-26 23:13:44 PDT
Comment on attachment 15192 [details]
First attempt

You use "2." in some places, I'd prefer "2.0" or "2.0f" as appropriate.

Also, this asks for info directly from the element at paint time - I don't think that's right. Such things should be determined at layout time if needed.
Comment 5 Rob Buis 2007-06-27 00:51:01 PDT
Created attachment 15268 [details]
Addressing the current issues

This patch keeps around 2 float member vars for svg image width/height to work around the int based layout system. Note that now the values are determined at layout time (calcWidth/calcHeight).
Cheers,

Rob.
Comment 6 Maciej Stachowiak 2007-06-28 01:46:21 PDT
Comment on attachment 15268 [details]
Addressing the current issues

r=me
Comment 7 Maciej Stachowiak 2007-06-28 01:47:07 PDT
Comment on attachment 15268 [details]
Addressing the current issues

r=me
Comment 8 Rob Buis 2007-06-28 01:59:38 PDT
Landed in r23849.