Closed
Bug 243931
Opened 20 years ago
Closed 20 years ago
GTK2 build on AIX: Caret misplaced when inserting RTL input into LTR text
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: lkemmel, Assigned: pkwarren)
Details
(Keywords: rtl)
Attachments
(2 files)
813 bytes,
patch
|
smontagu
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
795 bytes,
patch
|
smontagu
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Build Identifier: In mozilla text widgets, caret is misplaced when inserting RTL input into LTR text. The problem is not reproducible on Windows. Reproducible: Always Steps to Reproduce: 1. Switch language layer to Hebrew or Arabic. 2. Locate the caret in the Address bar with some LTR text (note that gtk2 doesn't provide contextual language switching, so the keyboard language remains RTL). 3. Start inputting RTL characters. Actual Results: The caret is displayed at the leading edge of a typed character. Expected Results: The caret is displayed at the trailing edge of a typed character.
Reporter | ||
Comment 1•20 years ago
|
||
Simon, it seems I have an explanation to what's going on. After repositioning, caret level is derived from the level of the content it's related to. So in Step 2 above it gets level 0. After new text is inserted, caret level is reset to BIDI_LEVEL_UNDEFINED - to be recalculated later, according to the level of the inserted text. - That's was supposed to take place in Step 3. However, on IME composing (which in our case takes place when RTL text is inserted), gtk emits the "commit" signal, as opposed to the "key_press_event" signal in the absence of IME composing. Event handlers will finally translate the former into |kOpInsertText| Editor operation, and the later - into |kOpInsertIMEText|. The only problem is, that |nsTextEditRules::AfterEdit|, when deciding about undefying the level, disregards |kOpInsertIMEText|, and checks only for "simple" text insertion. Once I added the missing condition, the problem was resolved. I'll submit a patch shortly.
Reporter | ||
Comment 2•20 years ago
|
||
Sorry, it should have been vice versa: "...the former ["commit] - into |kOpInsertIMEText| Editor operation, and the latter ["key_press_event"] - into |kOpInsertText|".
Reporter | ||
Comment 3•20 years ago
|
||
Reporter | ||
Comment 4•20 years ago
|
||
Simon, can you review attachment 148756 [details] [diff] [review]? or help in determining r/sr? Thanks!
Comment 5•20 years ago
|
||
Comment on attachment 148756 [details] [diff] [review] Proposed patch r=smontagu
Attachment #148756 -
Flags: review+
Reporter | ||
Updated•20 years ago
|
Attachment #148756 -
Flags: superreview?
Comment 6•20 years ago
|
||
Comment on attachment 148756 [details] [diff] [review] Proposed patch Lina, when setting the review request flags you should insert the reviewer's name in the "Requestee" field.
Attachment #148756 -
Flags: superreview? → superreview?(roc)
Updated•20 years ago
|
OS: other → AIX
Attachment #148756 -
Flags: superreview?(roc) → superreview+
Reporter | ||
Comment 7•20 years ago
|
||
OK, Simon. And if I don't know reviewer's name - I shouldn't set the review request flags at all? I think I've seen "review ?" without a name.
Assignee | ||
Updated•20 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 8•20 years ago
|
||
Patch checked in. (In reply to comment #7) > OK, Simon. And if I don't know reviewer's name - I shouldn't set the review > request flags at all? I think I've seen "review ?" without a name. I don't think there's any rule against it, but there is much more chance of getting a prompt review if you request by name.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 9•20 years ago
|
||
The bug is fixed for nsPlaintextEditor, but still occurs in nsHTMLEditor.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Reporter | ||
Comment 10•20 years ago
|
||
Similarly to a plain text editor, consider |action == nsEditor::kOpInsertIMEText| also in an HTML editor.
Reporter | ||
Updated•20 years ago
|
Attachment #150647 -
Flags: superreview?(roc)
Attachment #150647 -
Flags: review?(smontagu)
Comment 11•20 years ago
|
||
Comment on attachment 150647 [details] [diff] [review] Patch for the HTML editor Sorry, I should have spotted that when reviewing the first patch. r=smontagu.
Attachment #150647 -
Flags: review?(smontagu) → review+
> there is much more chance of getting a prompt review if you request by name.
IN fact there is really no chance of ever getting a review if you don't put in a
name.
Attachment #150647 -
Flags: superreview?(roc) → superreview+
Reporter | ||
Comment 13•20 years ago
|
||
> IN fact there is really no chance of ever getting a review if you don't put
> in a name.
I see, thanks.
Can anyone check in the fix please?
Assignee | ||
Comment 14•20 years ago
|
||
I'll check this in today.
Assignee | ||
Updated•20 years ago
|
Assignee: mkaply → pkwarren
Status: REOPENED → NEW
Assignee | ||
Comment 15•20 years ago
|
||
Fixed. Checking in nsHTMLEditRules.cpp; /cvsroot/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp,v <-- nsHTMLEditRules.cpp new revision: 1.312; previous revision: 1.311 done
Status: NEW → RESOLVED
Closed: 20 years ago → 20 years ago
Resolution: --- → FIXED
Comment 16•16 years ago
|
||
Mass-assigning the new rtl keyword to RTL-related (see bug 349193).
Keywords: rtl
Component: Layout: BiDi Hebrew & Arabic → Layout: Text
QA Contact: zach → layout.fonts-and-text
You need to log in
before you can comment on or make changes to this bug.
Description
•