1 Index: mozilla/gfx/src/gtk/nsFontMetricsPango.cpp
2 ===================================================================
3 RCS file: /cvsroot/mozilla/gfx/src/gtk/nsFontMetricsPango.cpp,v
4 retrieving revision 1.24
5 diff -d -u -p -6 -r1.24 nsFontMetricsPango.cpp
6 --- mozilla/gfx/src/gtk/nsFontMetricsPango.cpp 25 Aug 2006 01:02:34 -0000 1.24
7 +++ mozilla/gfx/src/gtk/nsFontMetricsPango.cpp 6 Sep 2006 07:01:49 -0000
8 @@ -948,13 +948,12 @@ nsFontMetricsPango::GetClusterInfo(const
10 nsFontMetricsPango::GetPosition(const PRUnichar *aText, PRUint32 aLength,
15 - gboolean found = FALSE;
19 float f = mDeviceContext->AppUnitsToDevUnits();
21 PangoLayout *layout = pango_layout_new(mPangoContext);
22 @@ -974,28 +973,18 @@ nsFontMetricsPango::GetPosition(const PR
25 // Set up the pango layout
26 pango_layout_set_text(layout, text, strlen(text));
27 FixupSpaceWidths(layout, text);
29 - found = pango_layout_xy_to_index(layout, localX, localY,
31 + pango_layout_xy_to_index(layout, localX, localY,
34 // Convert the index back to the utf-16 index
37 - // Jump to the end if it's not found.
47 for (PRUint32 curOffset=0; curOffset < aLength;
48 curOffset++, curChar = g_utf8_find_next_char(curChar, NULL)) {
50 // Check for a match before checking for a surrogate pair
51 if (curChar - text == inx) {