Last Comment Bug 725233 - [TSF] Remove text event hack for the nsEditor's hack which will be removed by bug 622247
: [TSF] Remove text event hack for the nsEditor's hack which will be removed by...
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]
:
: Jim Mathies [:jimm]
Mentors:
Depends on: 622247
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-08 01:32 PST by Masayuki Nakano [:masayuki]
Modified: 2012-02-21 16:19 PST (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (3.05 KB, patch)
2012-02-14 18:12 PST, Masayuki Nakano [:masayuki]
jmathies: review+
Details | Diff | Splinter Review

Description User image Masayuki Nakano [:masayuki] 2012-02-08 01:32:43 PST
When nsTextStore needs to dispatch empty text event immediately after compositionstart, it dispatches two text events. One has a whitespace and the other has empty string.

If there is no composition string, nsEditor does nothing if empty text event comes. But of course, it should replace selected text with empty string. Therefore, nsTextEditor dispatches the hacky first event.

The nsEditor's behavior will be fixed by bug 622247. After that, we should remove the hacky event dispatchers.
Comment 1 User image Masayuki Nakano [:masayuki] 2012-02-14 18:12:44 PST
Created attachment 597269 [details] [diff] [review]
Patch

I'm not sure how to test these cases actually, however, our internal code is tested by automated tests which will be landed by bug 622247. So, this patch must be safe.
Comment 2 User image Masayuki Nakano [:masayuki] 2012-02-19 21:27:35 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/f444ebecc91f
Comment 3 User image Ed Morley [:emorley] 2012-02-21 08:44:51 PST
https://hg.mozilla.org/mozilla-central/rev/f444ebecc91f

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