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 564527 - rsvg_handle_get_dimensions_sub weird behaviour
rsvg_handle_get_dimensions_sub weird behaviour
Product: librsvg
Classification: Core
Component: general
Other Linux
: Normal normal
: ---
Assigned To: librsvg maintainers
librsvg maintainers
: 612560 (view as bug list)
Depends on:
Blocks: 580998 612951
Reported: 2008-12-14 21:49 UTC by Christian Persch
Modified: 2011-04-16 20:02 UTC
See Also:
GNOME target: ---
GNOME version: ---

testcase (1.48 KB, text/plain)
2008-12-14 21:49 UTC, Christian Persch
patch (3.38 KB, patch)
2009-03-05 00:06 UTC, Christian Persch
none Details | Review
Fix (3.92 KB, patch)
2010-04-05 10:46 UTC, Hiroyuki Ikezoe
committed Details | Review

Description Christian Persch 2008-12-14 21:49:35 UTC
I'm getting weird behaviour from rsvg_handle_get_dimensions_sub, namely width and height that are greater than what was returned by rsvg_handle_get_dimensions or by rsvg_handle_get_dimensions_sub with NULL as node. 

Testcase attached; to use on this SVG:*checkout*/trunk/KDE/kdegames/libkdegames/carddecks/svg-oxygen/oxygen.svgz

Using NULL as node:

$ ./test oxygen.svgz
RSVG width=2105 height=1488
Node <root> width=2105 heigh=1488 at x=0 y=0

but when using non-NULL node:

$ ./test oxygen.svgz '#back'
RSVG width=2105 height=1488
Node #back width=13035 heigh=18422 at x=177 y=925
Comment 1 Christian Persch 2008-12-14 21:49:59 UTC
Created attachment 124679 [details]
Comment 2 Christian Persch 2009-03-05 00:06:39 UTC
Created attachment 130082 [details] [review]

This seems to bring the values to about what one'd expect (not sure it's *completely* correct though).
Comment 3 Markus Schwab 2010-03-11 14:06:55 UTC
*** Bug 612560 has been marked as a duplicate of this bug. ***
Comment 4 Hiroyuki Ikezoe 2010-04-05 10:46:43 UTC
Created attachment 157960 [details] [review]

Many bugs related to no width and height specification come from this... I should have tried to fix this bug first.

In case of sub element dimensions handling, the dimensions have already been calculated in rsvg_node_draw so _rsvg_css_hand_normalize_length_sub is unnecessary.