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

Issue 2530843003: Introduce InsertIncrementalTextCommand to respect existing style for composition (Closed)

Created:
4 years ago by yabinh
Modified:
4 years ago
CC:
blink-reviews, chromium-reviews, darin-cc_chromium.org, dtapuska, jam, kinuko+watch
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce InsertIncrementalTextCommand to respect existing style for composition In order to keep the previous text formatting when continuing typing on the word, confirming the ongoing composition, or inserting new text, this CL introduces InsertIncrementalTextCommand for insertion. The command detects what was there already, and restricts the write to the character(s) that actually changed. Note that this CL doesn't change the behavior of events, i.e., it still sends 'beforeinput', 'input', and 'textInput' events with the entire text. BUG=620549 Committed: https://crrev.com/ef5c846a3e5d3c994d962ddca7d40f4bc1476044 Cr-Commit-Position: refs/heads/master@{#438490}

Patch Set 1 #

Total comments: 14

Patch Set 2 : Add a test for commitText() #

Total comments: 7

Patch Set 3 : Experiment: for textInput event #

Patch Set 4 : Introduce InsertIncrementalTextCommand #

Total comments: 11

Patch Set 5 : Address chongz@'s review #

Total comments: 5

Patch Set 6 : A little change #

Total comments: 40

Patch Set 7 : Address yosin@'s and xiaochengh@'s review #

Patch Set 8 : A little change #

Total comments: 15

Patch Set 9 : Address xiaochengh@'s review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+519 lines, -245 lines) Patch
M content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java View 1 2 3 1 chunk +22 lines, -18 lines 0 comments Download
M third_party/WebKit/Source/core/editing/BUILD.gn View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/Editor.cpp View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/InputMethodController.h View 1 2 3 4 2 chunks +0 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/editing/InputMethodController.cpp View 1 2 3 4 7 8 10 chunks +23 lines, -166 lines 0 comments Download
M third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp View 1 2 3 4 5 6 5 chunks +69 lines, -6 lines 0 comments Download
A third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.h View 1 2 3 4 5 6 1 chunk +30 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp View 1 2 3 4 5 6 7 8 1 chunk +178 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/commands/InsertTextCommand.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/commands/TypingCommand.h View 1 2 3 4 5 6 4 chunks +12 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp View 1 2 3 4 5 6 7 8 8 chunks +171 lines, -45 lines 0 comments Download
M third_party/WebKit/Source/core/events/TextEvent.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/events/TextEventInputType.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebViewTest.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 95 (62 generated)
yabinh
PTAL~
4 years ago (2016-11-25 04:23:57 UTC) #3
yabinh
https://codereview.chromium.org/2530843003/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): https://codereview.chromium.org/2530843003/diff/1/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java#newcode1277 content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java:1277: + "compositionupdate(a),input,compositionend(a),selectionchange,selectionchange," Selection change events are more than expected ...
4 years ago (2016-11-25 04:36:27 UTC) #5
yabinh
https://codereview.chromium.org/2530843003/diff/1/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp (left): https://codereview.chromium.org/2530843003/diff/1/third_party/WebKit/Source/core/editing/InputMethodController.cpp#oldcode687 third_party/WebKit/Source/core/editing/InputMethodController.cpp:687: Node* extentNode = extent.anchorNode(); baseNode and extentNode could be ...
4 years ago (2016-11-25 04:49:29 UTC) #7
Changwan Ryu
This is mostly Blink change, adding yosin@ for Blink side changes. ImeTest.java lgtm
4 years ago (2016-11-28 08:05:54 UTC) #17
chongz
Non-owner comments. https://codereview.chromium.org/2530843003/diff/1/third_party/WebKit/LayoutTests/fast/events/ime-composition-events-001.html File third_party/WebKit/LayoutTests/fast/events/ime-composition-events-001.html (right): https://codereview.chromium.org/2530843003/diff/1/third_party/WebKit/LayoutTests/fast/events/ime-composition-events-001.html#newcode26 third_party/WebKit/LayoutTests/fast/events/ime-composition-events-001.html:26: On 2016/11/25 04:36:27, yabinh wrote: > Replacing ...
4 years ago (2016-11-28 16:01:04 UTC) #26
chongz
On 2016/11/28 16:01:04, chongz wrote: > Non-owner comments. > > https://codereview.chromium.org/2530843003/diff/1/third_party/WebKit/LayoutTests/fast/events/ime-composition-events-001.html > File third_party/WebKit/LayoutTests/fast/events/ime-composition-events-001.html > ...
4 years ago (2016-11-28 16:29:51 UTC) #27
yosin_UTC9
https://codereview.chromium.org/2530843003/diff/20001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2530843003/diff/20001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode140 third_party/WebKit/Source/core/editing/InputMethodController.cpp:140: break; On 2016/11/28 at 16:01:04, chongz wrote: > We ...
4 years ago (2016-11-29 02:10:16 UTC) #28
yabinh
https://codereview.chromium.org/2530843003/diff/1/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp File third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp (right): https://codereview.chromium.org/2530843003/diff/1/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp#newcode252 third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp:252: On 2016/11/28 16:01:04, chongz wrote: > On 2016/11/25 04:36:27, ...
4 years ago (2016-11-29 02:15:21 UTC) #29
yosin_UTC9
https://codereview.chromium.org/2530843003/diff/1/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp File third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp (right): https://codereview.chromium.org/2530843003/diff/1/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp#newcode252 third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp:252: On 2016/11/29 at 02:15:21, yabinh wrote: > On 2016/11/28 ...
4 years ago (2016-11-29 03:31:33 UTC) #30
chongz
foolip@ can we have some help on the status of |TextEvent| please? Thanks! https://codereview.chromium.org/2530843003/diff/20001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File ...
4 years ago (2016-11-29 22:20:59 UTC) #32
foolip
https://codereview.chromium.org/2530843003/diff/20001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2530843003/diff/20001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode140 third_party/WebKit/Source/core/editing/InputMethodController.cpp:140: break; On 2016/11/29 22:20:58, chongz wrote: > On 2016/11/29 ...
4 years ago (2016-11-30 13:05:28 UTC) #37
yabinh
> I can't quite see how TextEvent is affected in this CL, can someone spell ...
4 years ago (2016-11-30 13:19:16 UTC) #38
yabinh
PTAL~ Note that this CL depends on another CL: https://codereview.chromium.org/2143923002/ https://codereview.chromium.org/2530843003/diff/1/third_party/WebKit/LayoutTests/fast/events/ime-composition-events-001.html File third_party/WebKit/LayoutTests/fast/events/ime-composition-events-001.html (right): https://codereview.chromium.org/2530843003/diff/1/third_party/WebKit/LayoutTests/fast/events/ime-composition-events-001.html#newcode26 ...
4 years ago (2016-12-02 08:41:55 UTC) #44
chongz
Thanks for the update and sorry for the delay. Here are my comments: https://codereview.chromium.org/2530843003/diff/60001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File ...
4 years ago (2016-12-02 20:34:44 UTC) #49
yabinh
PTAL https://codereview.chromium.org/2530843003/diff/60001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2530843003/diff/60001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode71 third_party/WebKit/Source/core/editing/InputMethodController.cpp:71: bool static needsIncrementalInsertion(const LocalFrame& frame, On 2016/12/02 20:34:44, ...
4 years ago (2016-12-05 08:09:39 UTC) #52
chongz
Thanks for the update! |TextEvent| lgtm with nits, will defer other reviews to yosin@. https://codereview.chromium.org/2530843003/diff/60001/third_party/WebKit/Source/core/editing/InputMethodController.cpp ...
4 years ago (2016-12-05 09:01:46 UTC) #54
yabinh
Thanks! yosin@, PTAL. https://codereview.chromium.org/2530843003/diff/80001/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp File third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp (right): https://codereview.chromium.org/2530843003/diff/80001/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp#newcode188 third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp:188: TextEvent::create(frame->domWindow(), text, TextEventInputDrop); On 2016/12/05 09:01:46, ...
4 years ago (2016-12-05 10:51:09 UTC) #59
yosin_UTC9
+xiaochengh@, since I'm slow for reviewing... https://codereview.chromium.org/2530843003/diff/100001/third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp File third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp (right): https://codereview.chromium.org/2530843003/diff/100001/third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp#newcode132 third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp:132: Element* element = ...
4 years ago (2016-12-07 05:23:34 UTC) #63
yosin_UTC9
lgtm https://codereview.chromium.org/2530843003/diff/100001/third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp File third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp (right): https://codereview.chromium.org/2530843003/diff/100001/third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp#newcode26 third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp:26: static size_t computeCommonPrefixLength(const String& str1, Let's use unnamed ...
4 years ago (2016-12-07 05:36:22 UTC) #64
yosin_UTC9
4 years ago (2016-12-07 05:36:23 UTC) #65
yosin_UTC9
On 2016/12/07 at 05:36:22, Yosi_UTC9 wrote: > lgtm > > https://codereview.chromium.org/2530843003/diff/100001/third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp > File third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp (right): ...
4 years ago (2016-12-07 05:37:03 UTC) #66
Xiaocheng
Please eliminate all access to FrameSelection from InsertIncrementalTextCommand. https://codereview.chromium.org/2530843003/diff/100001/third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp File third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp (right): https://codereview.chromium.org/2530843003/diff/100001/third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp#newcode69 third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp:69: PlainTextRange(0, ...
4 years ago (2016-12-07 10:23:26 UTC) #67
yabinh
PTAL https://codereview.chromium.org/2530843003/diff/100001/third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp File third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp (right): https://codereview.chromium.org/2530843003/diff/100001/third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp#newcode26 third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp:26: static size_t computeCommonPrefixLength(const String& str1, On 2016/12/07 05:36:22, ...
4 years ago (2016-12-08 07:54:58 UTC) #72
Xiaocheng
I'm almost OK with changes in editing/. Just a few minor comments. https://codereview.chromium.org/2530843003/diff/140001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp ...
4 years ago (2016-12-09 05:10:30 UTC) #75
yabinh
PTAL https://codereview.chromium.org/2530843003/diff/140001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2530843003/diff/140001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode534 third_party/WebKit/Source/core/editing/InputMethodController.cpp:534: On 2016/12/09 05:10:30, Xiaocheng wrote: > No need ...
4 years ago (2016-12-09 06:16:47 UTC) #78
Xiaocheng
lgtm
4 years ago (2016-12-09 06:32:21 UTC) #79
yabinh
On 2016/12/09 06:32:21, Xiaocheng wrote: > lgtm Thanks. foolip@, can you take a look at ...
4 years ago (2016-12-09 06:39:52 UTC) #80
aelias_OOO_until_Jul13
Seems foolip@ is not available, adding bokan@ for review of tiny change in Source/core/events/
4 years ago (2016-12-14 01:37:12 UTC) #85
foolip
Sorry, after the earlier question I assumed I was no longer needed and starting marking ...
4 years ago (2016-12-14 09:15:20 UTC) #86
yabinh
On 2016/12/14 09:15:20, foolip wrote: > Sorry, after the earlier question I assumed I was ...
4 years ago (2016-12-14 10:49:41 UTC) #87
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2530843003/160001
4 years ago (2016-12-14 10:50:06 UTC) #90
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years ago (2016-12-14 12:39:23 UTC) #93
commit-bot: I haz the power
4 years ago (2016-12-14 12:41:15 UTC) #95
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/ef5c846a3e5d3c994d962ddca7d40f4bc1476044
Cr-Commit-Position: refs/heads/master@{#438490}

Powered by Google App Engine
This is Rietveld 408576698