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

Issue 2143883002: Fix the bug that matras are input twice for Indian languages. (Closed)

Created:
4 years, 5 months ago by yabinh
Modified:
3 years, 9 months ago
CC:
blink-reviews, chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix the bug that matras are input twice for Indian languages. When we input an Indian matra after English letters, we will get 2 matras. When we call InputMethodController::confirmComposition(), we will call VisibleSelectionTemplate<Strategy>::updateIfNeeded(). The latter will adjust the selection for grapheme boundary. In this case, the adjustment is wrong. As a workaround, we can change InputMethodController::confirmComposition() to call TypingCommand::insertText(), because insertText() doesn’t adjust selection for grapheme boundary. Since insertText() doesn't dispatch TextInputEvent, we should add it because it's needed for confirmComposition(). Note that cancelComposition() and confirmComposition() share the same tag "TextCompositionConfirm". We only want to change the behavior of confirmComposition(), and keep cancelComposition() unchanged, so we introduce TextCompositionType::TextCompositionCancel for cancelComposition() BUG=620690

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -10 lines) Patch
M content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java View 1 chunk +16 lines, -0 lines 1 comment Download
M third_party/WebKit/Source/core/editing/InputMethodController.cpp View 3 chunks +5 lines, -4 lines 1 comment Download
M third_party/WebKit/Source/core/editing/commands/TypingCommand.h View 1 chunk +2 lines, -1 line 1 comment Download
M third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp View 4 chunks +21 lines, -5 lines 0 comments Download

Messages

Total messages: 20 (15 generated)
yabinh
changwan@, can you take a look at this cl?
4 years, 5 months ago (2016-07-13 07:16:04 UTC) #2
yosin_UTC9
It seems description and changes aren't matched. Could you update description? https://codereview.chromium.org/2143883002/diff/1/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java File content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java (right): ...
4 years, 5 months ago (2016-07-13 07:56:07 UTC) #5
yabinh
On 2016/07/13 07:56:07, Yosi_UTC9 wrote: > It seems description and changes aren't matched. > Could ...
4 years, 5 months ago (2016-07-13 08:06:02 UTC) #6
yosin_UTC9
On 2016/07/13 at 08:06:02, yabinh wrote: > On 2016/07/13 07:56:07, Yosi_UTC9 wrote: > > It ...
4 years, 5 months ago (2016-07-13 08:18:01 UTC) #7
Changwan Ryu
4 years, 5 months ago (2016-07-14 02:11:08 UTC) #18
https://codereview.chromium.org/2143883002/diff/1/third_party/WebKit/Source/c...
File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right):

https://codereview.chromium.org/2143883002/diff/1/third_party/WebKit/Source/c...
third_party/WebKit/Source/core/editing/InputMethodController.cpp:277:
insertTextDuringCompositionWithEvents(frame(), emptyString(), 0,
TypingCommand::TextCompositionType::TextCompositionCancel);
any chance that we incorrectly adjust selection for composition cancel? do we
still need to fix something?

Powered by Google App Engine
This is Rietveld 408576698