Closed
Bug 100173
Opened 23 years ago
Closed 17 years ago
Thai language selection broken.
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: prabhat.hegde, Assigned: smontagu)
References
()
Details
(Keywords: intl)
Attachments
(1 file)
236 bytes,
text/html
|
Details |
For a description about this bug, please see:
http://bugzilla.mozilla.org/show_bug.cgi?id=100170
Have filed a separate bug for clarity.
Once again patch attached below :
Index: nsTextFrame.cpp
===================================================================
RCS file: /cvsroot/mozilla/layout/html/base/src/nsTextFrame.cpp,v
retrieving revision 1.318
diff -u -r1.318 nsTextFrame.cpp
--- nsTextFrame.cpp 2001/08/21 01:47:08 1.318
+++ nsTextFrame.cpp 2001/09/17 21:39:43
@@ -83,6 +83,10 @@
//ahmed end
#endif // IBMBIDI
+#ifdef SUNCTL
+#include "nsILE.h"
+#endif
+
#ifndef PR_ABS
#define PR_ABS(x) ((x) < 0 ? -(x) : (x))
#endif
@@ -2239,6 +2243,37 @@
while (sdptr){
sdptr->mStart = ip[sdptr->mStart] - mContentOffset;
sdptr->mEnd = ip[sdptr->mEnd] - mContentOffset;
+
+#ifdef SUNCTL
+ static NS_DEFINE_CID(kLECID, NS_ULE_CID);
+
+ nsCOMPtr<nsILE> mCtlObj;
+ mCtlObj = do_CreateInstance(kLECID, &rv);
+ if (NS_FAILED(rv)) {
+ NS_WARNING("Cell based Cursor Movement Will Not Be Supported\n");
+ mCtlObj = nsnull;
+ }
+ else {
+ PRInt32 mStart, mEnd;
+
+ if (sdptr->mEnd < textLength) {
+ mCtlObj->GetRangeOfCluster(text, PRInt32(textLength), sdptr->mEnd,
+ &mStart, &mEnd);
+ if (sdptr->mStart > sdptr->mEnd) /* Left Edge */
+ sdptr->mEnd = mStart;
+ else
+ sdptr->mEnd = mEnd;
+ }
+
+ /* Always start selection from a Right Edge */
+ if (sdptr->mStart > 0) {
+ mCtlObj->GetRangeOfCluster(text, PRInt32(textLength), sdptr->mStart
,
+ &mStart, &mEnd);
+ sdptr->mStart = mEnd;
+ }
+ }
+#endif
+
#ifdef IBMBIDI // Simon - display substrings RTL in RTL frame on non-Bidi platf
orm
if ((level & 1) && !(isRightToLeftOnBidiPlatform)) {
PRInt32 swap = sdptr->mStart;
@@ -3894,12 +3929,31 @@
#endif
aPos->mContentOffset = 0;
PRInt32 i;
Please review and comment.
prabhat.
Comment 1•23 years ago
|
||
bstell/shanjian: can one of you review the patch?
Comment 2•23 years ago
|
||
Switching QA contact to katakai for now, please re-assign further as appropriate.
Keywords: intl
QA Contact: andreasb → katakai
Updated•23 years ago
|
Status: NEW → ASSIGNED
Updated•23 years ago
|
Target Milestone: --- → mozilla0.9.7
Comment 6•23 years ago
|
||
nsILE is not ready for all platform yet. move to m98
Target Milestone: mozilla0.9.7 → mozilla0.9.8
Reporter | ||
Comment 7•23 years ago
|
||
Thanks to Roland Mainz this feature has been putback into trunk (Ref: Bugzilla
#84380)
Assignee | ||
Comment 8•23 years ago
|
||
Marking fixed since the patch has been checked in. Who can verify that the
current Thai selection behaviour is correct?
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 9•23 years ago
|
||
On my Solaris build, it seems working fine for me. But
I'll assign prabhat to QA person for verification.
Prabhat, can you try on your build?
QA Contact: katakai → prabhat.hegde
Reporter | ||
Comment 10•23 years ago
|
||
Verified on Solaris with --enable-ctl flag, Checked that selection is by
"cluster". Arthit could you independently verify this as thai user and
also Mark bug as VERIFIED?
Comment 11•22 years ago
|
||
i can't verify this prabhat,
since it still has a bug.
please see details in bug 167983.
[CTL-Thai] text with Thai/non-Thai combination, highlighting is not match with
selection
Blocks: thai
Comment 12•22 years ago
|
||
can i reopen this?
Comment 13•22 years ago
|
||
also this guaranteed the cell-based selection with keyboard only
(<shift>+arrow keys)
but NOT covers the case of selection by dragging mouse.
i've tested by dragging mouse to select Thai text,
still able to select only part of cell.
i will reopen this bug.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Updated•22 years ago
|
Target Milestone: mozilla0.9.8 → ---
Updated•20 years ago
|
Depends on: grapheme-breaker
Comment 14•20 years ago
|
||
You can test the selection problem with this minimal HTML test case. See also
bug 283416 - Windows : Selection must be done by grapheme cluster boundaries
Comment 15•17 years ago
|
||
Tested on Mac OS X 10.5.2 with Minefield nightly trunk build 2008030111 seems this bug has been fixed.
Comment 16•17 years ago
|
||
I reproduce the step posted in bug 283416, can confirm Patipat comment #15 that this bug has been fixed.
Nightly build 2008030204 Mac OS X 10.5.2
Comment 17•17 years ago
|
||
no problem with Firefox 3 beta 3 on Linux (Ubuntu 8.04 Alpha 4)
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b3) Gecko/2008021416 Firefox/3.0b3
Comment 18•17 years ago
|
||
Works fine on Windows XP.
Tested with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b4pre) Gecko/2008030305 Minefield/3.0b4pre
Comment 19•17 years ago
|
||
seems to already works fine on Windows XP, Mac OS X, and Linux.
we should be able to close this,
but as this bug is originally filed as bug on Solaris, should wait response from Solaris side.
Comment 20•17 years ago
|
||
BugAThon Bangkok.
all confirmed this works ok. close.
Status: REOPENED → RESOLVED
Closed: 23 years ago → 17 years ago
Resolution: --- → WORKSFORME
Component: Layout: CTL → Layout: Text
QA Contact: prabhat.hegde → layout.fonts-and-text
You need to log in
before you can comment on or make changes to this bug.
Description
•