Last Comment Bug 713628 - [IMM] Do nothing if composition string isn't changed even when WM_IME_COMPOSITION is received
: [IMM] Do nothing if composition string isn't changed even when WM_IME_COMPOSI...
Status: RESOLVED FIXED
: inputmethod
Product: Core
Classification: Components
Component: Widget: Win32 (show other bugs)
: Trunk
: x86_64 Windows 7
: -- normal (vote)
: mozilla13
Assigned To: Masayuki Nakano [:masayuki] (Mozilla Japan)
:
Mentors:
Depends on:
Blocks: 700897
  Show dependency treegraph
 
Reported: 2011-12-27 02:43 PST by Masayuki Nakano [:masayuki] (Mozilla Japan)
Modified: 2012-02-06 00:49 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (1.28 KB, patch)
2011-12-27 02:45 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
no flags Details | Diff | Splinter Review
Patch (3.43 KB, patch)
2012-01-25 23:09 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
VYV03354: review+
Details | Diff | Splinter Review

Description Masayuki Nakano [:masayuki] (Mozilla Japan) 2011-12-27 02:43:15 PST
Currently, we're clearing composition string from editor when WM_IME_COMPOSITION indicates neither committing nor composing. We should do nothing this time.

I don't know actual case, though.
Comment 1 Masayuki Nakano [:masayuki] (Mozilla Japan) 2011-12-27 02:45:02 PST
Created attachment 584404 [details] [diff] [review]
Patch
Comment 2 Masatoshi Kimura [:emk] 2012-01-10 04:49:13 PST
This patch removes codes that are added at CVS revisions 3.219 and 3.215.
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/widget/src/windows/nsWindow.cpp&mark=&rev=3.219#3012
Are those comments no longer applied?
Comment 3 Masayuki Nakano [:masayuki] (Mozilla Japan) 2012-01-10 05:50:07 PST
Thank you, it's nice information. The change should be for bug 13494.

But looks like the change of 3.219 also fixed the bug by another approach. Even if we make our editor's composition string empty, WM_COMPOSITION_END is needed because nsEditor exits from composition mode only when it receives NS_COMPOSITION_END event. So, the change of 3.215 isn't enough for current nsEditor. The change of 3.219 makes the composition string empty before dispatching NS_COMPOSITION_END event. It is right way for current nsEditor.

On the other hand, there might still be such IME. And some of them might not send WM_IME_ENDCOMPOSITION even when composition string becomes empty (e.g., keeps composing mode until hitting Enter or ESC). If so, my patch must make regression. But I don't think the current code is using correct way because the block *assumes* the composition string must be empty at the param. I'll post another patch tomorrow.
Comment 4 Masayuki Nakano [:masayuki] (Mozilla Japan) 2012-01-25 23:09:48 PST
Created attachment 591709 [details] [diff] [review]
Patch

Sorry for the delay. I think that this is the right approach. Win7 + ATOK 2011 sends WM_IME_COMPOSITION with 0 for lParam when I delete all composing characters by BS key.

When composition string is empty, we should dispatch empty text event. Otherwise, we should dispatch text event normally.
Comment 5 Masatoshi Kimura [:emk] 2012-02-04 05:32:16 PST
Comment on attachment 591709 [details] [diff] [review]
Patch

r=me assuming it passes the test.
Comment 6 Masayuki Nakano [:masayuki] (Mozilla Japan) 2012-02-05 04:21:36 PST
Thank you, Kimura-san.

https://hg.mozilla.org/integration/mozilla-inbound/rev/9ff7a8136813
Comment 7 Marco Bonardo [::mak] (Away 6-20 Aug) 2012-02-06 00:49:00 PST
https://hg.mozilla.org/mozilla-central/rev/9ff7a8136813

Note You need to log in before you can comment on or make changes to this bug.