Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Issue 2741007: Fix unicode bidi mirroring characters are not correctly mirrored in textfield (Closed)

Created:
10 years, 6 months ago by xji
Modified:
9 years, 6 months ago
CC:
chromium-reviews, ben+cc_chromium.org
Visibility:
Public.

Description

Unicode bidi mirroring characters are not correctly mirrored in textfield and omnibox (which use CRichEditCtrl) while *inputting*. Since bidi mirroring characters are correctly mirrored when rendering the whole text, fix it by re-rendering the whole text every time the text changes. NOTE: this change will mess up the undo queue. The continuous keystroke wont be treated as one undo event. Every single keystroke is treated as a undo state. Using the following as example: 1. paste string "abcd " into find-in-page; 2. type in 'e', 'f', and ' '. 3. paste string "xyz". When undo, the string sequence will be: "abcd ef xyz" => "abcd ef " ==> "abcd ef" ==> "abcd e" ==> "abcd " =>"". Without the change, the string sequence is: "abcd ef xyz" => "abcd ef " => "abcd " =>"". BUG=46298 TEST=follow the steps described in the bug. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=49811

Patch Set 1 #

Total comments: 5

Patch Set 2 : '' #

Total comments: 2

Patch Set 3 : '' #

Total comments: 1

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -12 lines) Patch
M views/controls/textfield/native_textfield_win.h View 1 2 3 chunks +27 lines, -2 lines 0 comments Download
M views/controls/textfield/native_textfield_win.cc View 1 2 3 12 chunks +47 lines, -10 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
xji
Some background: I was trying to change textfield and omnibox layout to RTL when UI ...
10 years, 6 months ago (2010-06-10 23:55:20 UTC) #1
Peter Kasting
There are COM APIs you can use to mess with the Undo state. See for ...
10 years, 6 months ago (2010-06-11 00:14:40 UTC) #2
xji
On 2010/06/11 00:14:40, Peter Kasting wrote: > There are COM APIs you can use to ...
10 years, 6 months ago (2010-06-12 00:44:22 UTC) #3
jeremy
lgtm
10 years, 6 months ago (2010-06-13 05:57:08 UTC) #4
Peter Kasting
LGTM http://codereview.chromium.org/2741007/diff/6001/7001 File views/controls/textfield/native_textfield_win.cc (right): http://codereview.chromium.org/2741007/diff/6001/7001#newcode863 views/controls/textfield/native_textfield_win.cc:863: // Save the original selection. Nit: Remove this ...
10 years, 6 months ago (2010-06-14 19:34:03 UTC) #5
xji
On Mon, Jun 14, 2010 at 12:34 PM, <pkasting@chromium.org> wrote: > LGTM > > > ...
10 years, 6 months ago (2010-06-14 20:21:57 UTC) #6
Peter Kasting
On 2010/06/14 20:21:57, xji wrote: > It is the latter: setting the text explicitly would ...
10 years, 6 months ago (2010-06-14 20:24:32 UTC) #7
xji
Done. On 2010/06/14 20:24:32, Peter Kasting wrote: > On 2010/06/14 20:21:57, xji wrote: > > ...
10 years, 6 months ago (2010-06-14 22:11:36 UTC) #8
Peter Kasting
LGTM http://codereview.chromium.org/2741007/diff/13001/14001 File views/controls/textfield/native_textfield_win.cc (right): http://codereview.chromium.org/2741007/diff/13001/14001#newcode436 views/controls/textfield/native_textfield_win.cc:436: // indicating text in IME composition mode disappear. ...
10 years, 6 months ago (2010-06-14 22:16:44 UTC) #9
xji
10 years, 6 months ago (2010-06-14 22:32:34 UTC) #10
On Mon, Jun 14, 2010 at 3:16 PM, <pkasting@chromium.org> wrote:

> LGTM
>
>
> http://codereview.chromium.org/2741007/diff/13001/14001
>
> File views/controls/textfield/native_textfield_win.cc (right):
>
> http://codereview.chromium.org/2741007/diff/13001/14001#newcode436
> views/controls/textfield/native_textfield_win.cc:436: // indicating text
> in IME composition mode disappear.
> Nit: How about:
>
> // If we allow OnAfterPossibleChange() to redraw the text, it will do
> this by setting the edit's text directly, which can cancel the current
> IME composition or cause other adverse affects.  So we set
> |should_redraw_text| to false.


comments fine with me.

But more accurately, from the Chinese IME I tested, it actually does not
kill the IME composition. Instead, the underline, which appears under the
text in IME composition and which indicates the IME is in composition phase,
disappears. So, user might think the mode is not composition mode, and the
text is committed. But actually, you can still use left arrow to show other
character candidates, which means it is still in IME composition mode (just
the indicator is gone).

But it causes adverse affects for sure.


>
>
> http://codereview.chromium.org/2741007/show
>

Powered by Google App Engine
This is Rietveld 408576698