After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 612951 - SVG not rendered if header contains width or height in percentage
SVG not rendered if header contains width or height in percentage
Status: RESOLVED FIXED
Product: librsvg
Classification: Core
Component: general
unspecified
Other Linux
: Normal minor
: ---
Assigned To: librsvg maintainers
librsvg maintainers
: 608102 614018 (view as bug list)
Depends on: 564527
Blocks:
 
 
Reported: 2010-03-15 16:25 UTC by Oliver Joos
Modified: 2010-04-07 03:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
non-renderable SVG image (35.97 KB, image/svg+xml)
2010-03-15 16:25 UTC, Oliver Joos
  Details
Proposed patch (4.36 KB, patch)
2010-03-31 11:35 UTC, Hiroyuki Ikezoe
none Details | Review
Use viewBox width and height if these values are in there (4.43 KB, patch)
2010-04-02 10:33 UTC, Hiroyuki Ikezoe
none Details | Review
Fix (1.84 KB, patch)
2010-04-05 10:55 UTC, Hiroyuki Ikezoe
committed Details | Review

Description Oliver Joos 2010-03-15 16:25:14 UTC
Created attachment 156191 [details]
non-renderable SVG image 

Evince does not render an SVG vector image if the header contains something like:
  <svg width="100%" height="100%" ... >
Other values than 100% also fail. But if width and height are removed from header, then rendering works.

The SVG document standard [1] says:
  "If the attribute (width and height) is not specified, the effect is as if a value of "100%" were specified."

gnome-thumbnailer is also affected, so the bug itself may be located in the library both evince an gnome-thumbnailer call to render an SVG.

[1] http://www.w3.org/TR/SVG/struct.html#NewDocument
Comment 1 Carlos Garcia Campos 2010-03-15 16:41:29 UTC
Evince image backend uses GdkPixbuf, so I guess it's a bug in GdkPixbuf or even in librsvg. Moving to GdkPixbuf. Thanks for reporting.
Comment 2 Matthias Clasen 2010-03-16 21:18:21 UTC
rsvg-view has the same problem, so I would say this is an issue in librsvg
Comment 3 Hiroyuki Ikezoe 2010-03-31 11:35:11 UTC
Created attachment 157573 [details] [review]
Proposed patch

This patch makes attachment 15691 [details] [review] viewable by rsvg-view.
Comment 4 Hiroyuki Ikezoe 2010-04-02 10:33:29 UTC
Created attachment 157743 [details] [review]
Use viewBox width and height if these values are in there

This change also fixes bug #608102.
Comment 5 Hiroyuki Ikezoe 2010-04-05 10:55:03 UTC
Created attachment 157962 [details] [review]
Fix 

I noticed bug #564527 is the principal issue among width and height related issues.

This patch depends on the fix for #bug564527.
Comment 6 Hiroyuki Ikezoe 2010-04-05 10:57:51 UTC
This second patch covers bug 608102 and bug 614018, so I duplicate those bugs of this bug.
Comment 7 Hiroyuki Ikezoe 2010-04-05 10:58:47 UTC
*** Bug 608102 has been marked as a duplicate of this bug. ***
Comment 8 Hiroyuki Ikezoe 2010-04-05 10:59:43 UTC
*** Bug 614018 has been marked as a duplicate of this bug. ***