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 624158 - coalesced text breaks order
coalesced text breaks order
Status: RESOLVED DUPLICATE of bug 581108
Product: librsvg
Classification: Core
Component: general
Other All
: Normal normal
: ---
Assigned To: librsvg maintainers
librsvg maintainers
Depends on:
Blocks: 525023
Reported: 2010-07-12 12:07 UTC by Martin von Gagern
Modified: 2010-07-12 19:40 UTC
See Also:
GNOME target: ---
GNOME version: ---

Example exposing the issue (236 bytes, image/svg+xml)
2010-07-12 12:07 UTC, Martin von Gagern
Cautious fix (638 bytes, patch)
2010-07-12 12:13 UTC, Martin von Gagern
none Details | Review

Description Martin von Gagern 2010-07-12 12:07:53 UTC
Created attachment 165723 [details]
Example exposing the issue

If a <text> or <tspan> element contains both <tspan> children and #PCDATA children, then all the #PCDATA content will be rendered at the position of the first #PCDATA node. See the attached example, which should render "abc" but renders "acb" instead, because the "a" and the "c" are coalesced.

I believe that this issue was introduced by (svn r1150) in an attempt to solve some Pango issue. I don't know what kind of issue, as I couldn't find a reference to the bug this was supposed to fix.

Attachment #121249 [details] from bug #525023 comment #6 is broken for the same reason. That bug report seems to be more generic than this one here, though, as it has example images not addressed here. So perhaps you want to mark that bug depending on this one here, and fix this one here with the limited scope it has.
Comment 1 Martin von Gagern 2010-07-12 12:13:20 UTC
Created attachment 165724 [details] [review]
Cautious fix

This fix addressed the problem by avoiding coalescing with a CHARS node if there is a tspan node after it. I'm not sure if this is the ideal patch, or if dropping this whole coalescing thing would be better. I assume that librsvg with this patch is better than without it, but even there I'd need more info on the original Pango issue behind this coalescing idea to know if I'm correct.
Comment 2 Martin von Gagern 2010-07-12 17:28:14 UTC
Going through adjacent git commit messages, I might have found a discussion of the original issue that lead to the code in question:
Unfortunately the example images linked to at the beginning of that thread aren't available any more, so I can't see whether my patch will introduce a regression in that case, and whether removing all that coalescing code might be feasible.
Comment 3 Hiroyuki Ikezoe 2010-07-12 19:40:37 UTC
Thanks for the patch.

But this issue has already opened as another bug. Please attach your patch there.

*** This bug has been marked as a duplicate of bug 581108 ***