Closed
Bug 478030
Opened 15 years ago
Closed 15 years ago
[TSF] The composition string is not displayed on WinXP + MS-IME
Categories
(Core :: Widget: Win32, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9.2a1
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
(Keywords: inputmethod, intl)
Attachments
(1 file, 5 obsolete files)
65.95 KB,
patch
|
Details | Diff | Splinter Review |
On WinXP + MS-IME, the composition string is not displayed. But on WinVista, I cannot reproduce this bug.
The cause may be:
> |OnUpdateComposition| is called with pRangeNew == null.
> Therefore, we don't update IME selection. Looks like we need to create the log
> of |InsertTextAtSelection|. And we should use it if pRangeNew is null.
Comment 1•15 years ago
|
||
I first reported this issue in the original TSF bug: https://bugzilla.mozilla.org/show_bug.cgi?id=88831#c107
Assignee | ||
Updated•15 years ago
|
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•15 years ago
|
||
If pRangeNew is null, we can get the current range from pComposition. This patch fixes the composition string invisible problem. But the composition string doesn't looks good for me. Because we fail to get the attrs. But it should be another bug.
Attachment #362497 -
Flags: review?(chenn)
Assignee | ||
Comment 4•15 years ago
|
||
Jim, if you don't/cannot want to review TSF support code, please tell me it. I'll find another reviewer for it (Maybe, Kimura-san). Otherwise please review the patch ASAP.
Assignee | ||
Comment 5•15 years ago
|
||
This bug should be a blocker. Because the composing string is most important information for Japanese IME. So, without this fix, Japanese testers cannot test enough.
Severity: major → blocker
Comment 6•15 years ago
|
||
(In reply to comment #5) > This bug should be a blocker. Because the composing string is most important > information for Japanese IME. So, without this fix, Japanese testers cannot > test enough. Chinese users too.
Assignee | ||
Comment 7•15 years ago
|
||
ok, the previous patch may be wrong approach. OnUpdateComposition, the composing range should not be updated yet if TIP implements correctly. SetSelection will be called after OnUpdateComposition for setting the IME selection to composition string. This is the cause of the XP selection broken bug of my previous comment. Therefore, we should not dispatch text event in OnUpdateCompsition, instead of that, we should dispatch them in SetSelection. This patch works perfectly on Vista+MS-IME and XP+MS-IME.
Attachment #362497 -
Attachment is obsolete: true
Attachment #362752 -
Flags: review?(chenn)
Attachment #362497 -
Flags: review?(chenn)
Comment 8•15 years ago
|
||
Thank you for your work, Masayuki-san. It looks good. 1) On Vista I can see flickering with the patch using Microsoft Pinyin. Steps: Use Microsoft Pinyin on Vista, type in "nihaoma", press space, and then use left and right keys to move the cursor. There is flickering when the cursor moves. Can you reproduce this? It might be unimportant. 2) TestWinTSF is broken on a debug build because of NS_NOTREACHED in GetProperty. Can you include the fix in your patch? Thanks.
Assignee | ||
Comment 9•15 years ago
|
||
(In reply to comment #8) > 1) On Vista I can see flickering with the patch using Microsoft Pinyin. > Steps: Use Microsoft Pinyin on Vista, type in "nihaoma", press space, and then > use left and right keys to move the cursor. There is flickering when the cursor > moves. Can you reproduce this? It might be unimportant. mmmm, I cannot reproduce it, but maybe it can be happen by my patch. Because SetSelection is called many times. I think I should create a new flag which is set to true in OnUpdateComposition, and SendTextEventForCompositionString should be called only when the flag is true. Then, the flag should be cleared. > 2) TestWinTSF is broken on a debug build because of NS_NOTREACHED in > GetProperty. Can you include the fix in your patch? OK, I'll check it.
Assignee | ||
Comment 10•15 years ago
|
||
This is better. Text event is dispatched by both OnQueryComposition and SetSelection. nsTextStore cache the latest text event, and if current event is same as previous one, it doesn't dispatch the event again. This can suppress the flickering in some cases and stronger implementation for TIP implementation differences. However, this is not perfect solution for flickering. Because even when only caret position is changed, we need to dispatch new text event. I think that we should implement similar process to nsEditor. However, it should not be the scope of this bug. (and it's not important now)
Attachment #362752 -
Attachment is obsolete: true
Attachment #362752 -
Flags: review?(chenn)
Assignee | ||
Updated•15 years ago
|
Attachment #363078 -
Attachment is patch: true
Attachment #363078 -
Attachment mime type: application/octet-stream → text/plain
Assignee | ||
Comment 11•15 years ago
|
||
I expanded the test. Now, it's implemented the attribute property related interfaces.
Attachment #363078 -
Attachment is obsolete: true
Attachment #363304 -
Flags: review?(chenn)
Assignee | ||
Comment 12•15 years ago
|
||
removed an unused variable. sorry for the spam.
Attachment #363304 -
Attachment is obsolete: true
Attachment #363309 -
Flags: review?(chenn)
Attachment #363304 -
Flags: review?(chenn)
Comment 13•15 years ago
|
||
Comment on attachment 363309 [details] [diff] [review] Patch v3.1.1 Thank you!
Attachment #363309 -
Flags: review?(chenn) → review+
Assignee | ||
Updated•15 years ago
|
Attachment #363309 -
Flags: superreview?(roc)
+ if (mLastDispatchedTextEvent->rangeArray) + delete [] mLastDispatchedTextEvent->rangeArray; + delete mLastDispatchedTextEvent; Is there a reason we can't make the nsEvent destructor virtual, give the subclasses proper destructors and avoid having to repeat code like this (and similar code elsewhere)?
Comment on attachment 363309 [details] [diff] [review] Patch v3.1.1 + mLastDispatchedTextEvent-> rangeArray = nsnull; Unnecessary space. + // Clear the text event log Not sure what you mean by "log" here. Just say "clear the saved text event" I think.
Attachment #363309 -
Flags: superreview?(roc) → superreview+
Assignee | ||
Comment 16•15 years ago
|
||
(In reply to comment #14) > + if (mLastDispatchedTextEvent->rangeArray) > + delete [] mLastDispatchedTextEvent->rangeArray; > + delete mLastDispatchedTextEvent; > > Is there a reason we can't make the nsEvent destructor virtual, give the > subclasses proper destructors and avoid having to repeat code like this (and > similar code elsewhere)? here: http://mxr.mozilla.org/mozilla-central/source/widget/src/windows/nsWindow.cpp#6737 but maybe, the nsTextEvent can not be an owner of the buffer.
Assignee | ||
Comment 17•15 years ago
|
||
Attachment #363309 -
Attachment is obsolete: true
Assignee | ||
Comment 18•15 years ago
|
||
checked-in. http://hg.mozilla.org/mozilla-central/rev/9174e1bbfa9f
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Assignee | ||
Updated•14 years ago
|
Keywords: inputmethod
You need to log in
before you can comment on or make changes to this bug.
Description
•