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 580814 - bidi: GtkTextLayout incorrectly assumes pango iterates in logical order
bidi: GtkTextLayout incorrectly assumes pango iterates in logical order
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTextView
2.16.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2009-04-29 22:20 UTC by Itay Perl
Modified: 2009-05-04 03:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Testcase. As you can see, the labels are swapped. (1.26 KB, text/plain)
2009-04-30 18:04 UTC, Itay Perl
  Details
patch (3.46 KB, patch)
2009-05-03 16:37 UTC, Itay Perl
committed Details | Review

Description Itay Perl 2009-04-29 22:20:29 UTC
Please describe the problem:
The bug involves the allocate_child_widgets function on gtktextlayout.c:1800. This function iterates over Pango runs using a pango iterator, and sends for each run a signal containing the next object pointer from the list (display->shaped_objects), and the extents returned from pango. The problem is that pango iterates over the runs in visual order, while the shaped_objects list is in logical order, so in some cases the wrong object will be sent.

Steps to reproduce:
Create a GtkTextView displaying an RTL line including two anchored images. The images will get swapped.

Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Itay Perl 2009-04-30 18:04:36 UTC
Created attachment 133675 [details]
Testcase. As you can see, the labels are swapped.
Comment 2 Itay Perl 2009-05-03 16:37:02 UTC
Created attachment 133864 [details] [review]
patch