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

Issue 2816683004: Put the caret on the right side of the composition string

Created:
3 years, 8 months ago by Sungmann Cho
Modified:
3 years, 8 months ago
Reviewers:
Shu Chen, James Su, yukawa
CC:
chromium-reviews, nona+watch_chromium.org, James Su, shuchen+watch_chromium.org, yusukes+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Put the caret on the right side of the composition string On Windows, when a user writes sentences in Korean, we put the caret on the left side of the composition string, but this behavior is exactly opposite to that of other environments. This CL ensures that the caret is always positioned at the right side of the composition string on all environments for consistency. BUG=653160

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M ui/base/ime/win/imm32_manager.cc View 1 chunk +1 line, -1 line 2 comments Download

Messages

Total messages: 6 (2 generated)
Sungmann Cho
Please take a look. Thanks!
3 years, 8 months ago (2017-04-13 07:44:41 UTC) #2
Sungmann Cho
ping...
3 years, 8 months ago (2017-04-17 02:05:35 UTC) #3
yukawa
Thank you for the patch. My concern of making this change is that even if ...
3 years, 8 months ago (2017-04-17 03:01:06 UTC) #5
yukawa
3 years, 8 months ago (2017-04-17 04:12:00 UTC) #6
https://codereview.chromium.org/2816683004/diff/1/ui/base/ime/win/imm32_manag...
File ui/base/ime/win/imm32_manager.cc (right):

https://codereview.chromium.org/2816683004/diff/1/ui/base/ime/win/imm32_manag...
ui/base/ime/win/imm32_manager.cc:314: if (!(lparam & CS_NOMOVECARET) && (lparam
& GCS_CURSORPOS)) {
As far as I've tested with the stock MS-IME Korean on Windows 7 SP1, the
following flags are specified in |lparam|.
 - GCS_COMPATTR
 - GCS_COMPSTR
 - CS_NOMOVECARET
 - CS_INSERTCHAR

https://msdn.microsoft.com/en-us/library/windows/desktop/dd374133.aspx

Here is the important part:
  CS_NOMOVECARET:
    Do not move the caret position as a result of processing the
    message. For example, if an IME specifies a combination of
    CS_INSERTCHAR and CS_NOMOVECARET, the application should insert
    the specified character at the current caret position but should
    not move the caret to the next position. A subsequent
    WM_IME_COMPOSITION message with GCS_RESULTSTR will replace this
    character.

So as far as the API spec is concerned, I think the current Chromium's code
actually makes sense because those flags are intentionally specified by MS-IME
Korean (or Cicero Unaware Application Support).

I don't say that we should give up to fix crbug.com/653160, but if we would
decide to violate the spec requested by the API intentionally, we should try to
minimize the impact so as not to break other IMEs that expect Chromium to
support these flags correctly.

Powered by Google App Engine
This is Rietveld 408576698