summaryrefslogtreecommitdiff
path: root/firefox-1.5-pango-cursor-position-more.patch
blob: ef5b96773367b8ae9d19a69b6dda3f271a72d559 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff -pruN -x '.moz*' -x .deps -x 'firefox*' -x '*.mk' -x 'config*' -x dist -x build -x toolkit -x '*o' -x '*a' -x '*html' mozilla.orig/layout/generic/nsTextFrame.cpp mozilla/layout/generic/nsTextFrame.cpp
--- mozilla.orig/layout/generic/nsTextFrame.cpp	2006-08-26 13:33:35.000000000 +0900
+++ mozilla/layout/generic/nsTextFrame.cpp	2006-12-13 20:54:32.000000000 +0900
@@ -4261,12 +4261,10 @@ nsTextFrame::GetPointFromOffset(nsPresCo
       if (tc) {
         totalLength = tc->Text()->GetLength(); // raw value which includes whitespace
       }
-      if ((hitLength == textLength) && (inOffset = mContentLength) &&
-          (mContentOffset + mContentLength == totalLength)) {
-        // no need to re-measure when at the end of the last-in-flow
-      }
+      if (hitLength > 0)
+	inRendContext->GetRangeWidth(paintBuffer.mBuffer, textLength, 0, hitLength, (PRUint32&)width);
       else
-        inRendContext->GetWidth(paintBuffer.mBuffer, hitLength, width);
+	width = 0;
     }
     if ((hitLength == textLength) && (TEXT_TRIMMED_WS & mState)) {
       //
bgstack15