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

Issue 2372493002: Workaround for setComposition styling clobber (Closed)

Created:
4 years, 2 months ago by yabinh
Modified:
4 years, 2 months ago
CC:
blink-reviews, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Workaround for setComposition styling clobber In order to keep the previous text formatting when continuing typing on the word, this CL detects when the beginning of the IME commit is the same at what was there already, and restricts the write to only the character(s) at the end that actually changed. (This CL is based on aelias@'s CL: https://codereview.chromium.org/2073863003) BUG=620549 Committed: https://crrev.com/993074d17afee685ced99283d7ffbe809fdb6f99 Cr-Commit-Position: refs/heads/master@{#424716}

Patch Set 1 #

Patch Set 2 : Fix a test #

Patch Set 3 : Fix a layout test #

Total comments: 6

Patch Set 4 : test #

Total comments: 6

Patch Set 5 : Avoid duplicate events, and deal with multi-code text #

Patch Set 6 : Change a test for multi-node text #

Total comments: 6

Patch Set 7 : Address changwan@'s review #

Total comments: 27

Patch Set 8 : Deal with both prefix and suffix. #

Total comments: 20

Patch Set 9 : Address yosin@'s review #

Patch Set 10 #

Total comments: 18

Patch Set 11 : Address yosin@'s review #

Total comments: 30

Patch Set 12 : Address yosin@'s review #

Total comments: 3

Patch Set 13 #

Patch Set 14 : refactor #

Patch Set 15 : Remove a DCHECK. #

Total comments: 8

Patch Set 16 : Add some DCHECK. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+266 lines, -6 lines) Patch
M third_party/WebKit/Source/core/editing/InputMethodController.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/InputMethodController.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +188 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp View 1 2 3 4 5 6 7 2 chunks +70 lines, -1 line 0 comments Download

Messages

Total messages: 96 (64 generated)
yabinh
https://codereview.chromium.org/2372493002/diff/40001/third_party/WebKit/LayoutTests/fast/events/ime-composition-events-001-expected.txt File third_party/WebKit/LayoutTests/fast/events/ime-composition-events-001-expected.txt (right): https://codereview.chromium.org/2372493002/diff/40001/third_party/WebKit/LayoutTests/fast/events/ime-composition-events-001-expected.txt#newcode9 third_party/WebKit/LayoutTests/fast/events/ime-composition-events-001-expected.txt:9: PASS event.data is "1" Note that we call commitText() ...
4 years, 2 months ago (2016-09-26 10:10:33 UTC) #15
Changwan Ryu
https://codereview.chromium.org/2372493002/diff/40001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2372493002/diff/40001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode355 third_party/WebKit/Source/core/editing/InputMethodController.cpp:355: size_t commonPrefixLength = 0; On 2016/09/26 10:10:32, yabinh wrote: ...
4 years, 2 months ago (2016-09-26 13:51:36 UTC) #19
aelias_OOO_until_Jul13
Thanks for picking this up! https://codereview.chromium.org/2372493002/diff/40001/third_party/WebKit/LayoutTests/fast/events/ime-composition-events-001-expected.txt File third_party/WebKit/LayoutTests/fast/events/ime-composition-events-001-expected.txt (right): https://codereview.chromium.org/2372493002/diff/40001/third_party/WebKit/LayoutTests/fast/events/ime-composition-events-001-expected.txt#newcode9 third_party/WebKit/LayoutTests/fast/events/ime-composition-events-001-expected.txt:9: PASS event.data is "1" ...
4 years, 2 months ago (2016-09-26 22:05:40 UTC) #20
yabinh
https://codereview.chromium.org/2372493002/diff/40001/third_party/WebKit/LayoutTests/fast/events/ime-composition-events-001-expected.txt File third_party/WebKit/LayoutTests/fast/events/ime-composition-events-001-expected.txt (right): https://codereview.chromium.org/2372493002/diff/40001/third_party/WebKit/LayoutTests/fast/events/ime-composition-events-001-expected.txt#newcode9 third_party/WebKit/LayoutTests/fast/events/ime-composition-events-001-expected.txt:9: PASS event.data is "1" On 2016/09/26 22:05:40, aelias wrote: ...
4 years, 2 months ago (2016-09-27 04:30:22 UTC) #23
aelias_OOO_until_Jul13
https://codereview.chromium.org/2372493002/diff/60001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2372493002/diff/60001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode388 third_party/WebKit/Source/core/editing/InputMethodController.cpp:388: extendSelectionAndDelete(composing.length() - commonPrefixLength, 0); Hmm, this has the same ...
4 years, 2 months ago (2016-09-27 04:55:58 UTC) #24
Changwan Ryu
https://codereview.chromium.org/2372493002/diff/60001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2372493002/diff/60001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode346 third_party/WebKit/Source/core/editing/InputMethodController.cpp:346: while (commonPrefixLength < length1 && commonPrefixLength < length2 && ...
4 years, 2 months ago (2016-09-27 05:23:04 UTC) #25
yabinh
https://codereview.chromium.org/2372493002/diff/60001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2372493002/diff/60001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode346 third_party/WebKit/Source/core/editing/InputMethodController.cpp:346: while (commonPrefixLength < length1 && commonPrefixLength < length2 && ...
4 years, 2 months ago (2016-09-27 08:47:20 UTC) #32
Changwan Ryu
https://codereview.chromium.org/2372493002/diff/100001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2372493002/diff/100001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode341 third_party/WebKit/Source/core/editing/InputMethodController.cpp:341: size_t InputMethodController::computeUTF16CommonPrefixLength(const String& str1, const String& str2) const could ...
4 years, 2 months ago (2016-09-27 09:17:11 UTC) #33
yabinh
https://codereview.chromium.org/2372493002/diff/100001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2372493002/diff/100001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode341 third_party/WebKit/Source/core/editing/InputMethodController.cpp:341: size_t InputMethodController::computeUTF16CommonPrefixLength(const String& str1, const String& str2) const On ...
4 years, 2 months ago (2016-09-27 12:46:48 UTC) #40
aelias_OOO_until_Jul13
lgtm, you can add yosin@ for OWNERS once changwan@ is happy with the CL. https://codereview.chromium.org/2372493002/diff/120001/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp ...
4 years, 2 months ago (2016-09-28 23:58:29 UTC) #41
Changwan Ryu
non-owner lgtm adding yosin@ as reviewer
4 years, 2 months ago (2016-09-29 02:06:32 UTC) #44
yosin_UTC9
Should we also check common suffix? WDYT? Before: Hel<b>loWo</b>rld After: abcde<b>loWo</b>rld Replace "Hel" by "abcde". ...
4 years, 2 months ago (2016-10-04 09:00:05 UTC) #45
aelias_OOO_until_Jul13
On 2016/10/04 at 09:00:05, yosin wrote: > Should we also check common suffix? WDYT? > ...
4 years, 2 months ago (2016-10-04 21:23:38 UTC) #46
aelias_OOO_until_Jul13
On 2016/10/04 at 21:23:38, aelias wrote: > On 2016/10/04 at 09:00:05, yosin wrote: > > ...
4 years, 2 months ago (2016-10-04 21:31:45 UTC) #47
Changwan Ryu
On 2016/10/04 21:31:45, aelias wrote: > On 2016/10/04 at 21:23:38, aelias wrote: > > On ...
4 years, 2 months ago (2016-10-05 02:33:56 UTC) #48
yabinh
On 2016/10/05 02:33:56, Changwan Ryu wrote: > On 2016/10/04 21:31:45, aelias wrote: > > On ...
4 years, 2 months ago (2016-10-05 02:54:33 UTC) #49
yabinh
https://codereview.chromium.org/2372493002/diff/120001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2372493002/diff/120001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode348 third_party/WebKit/Source/core/editing/InputMethodController.cpp:348: while (commonPrefixLength < oldLength && commonPrefixLength < newLength && ...
4 years, 2 months ago (2016-10-11 01:42:25 UTC) #52
yabinh
> I think we should also deal with the suffix. Here is a test case ...
4 years, 2 months ago (2016-10-11 03:48:12 UTC) #55
yosin_UTC9
https://codereview.chromium.org/2372493002/diff/140001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2372493002/diff/140001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode364 third_party/WebKit/Source/core/editing/InputMethodController.cpp:364: size_t commonPrefixLength = 0; for-loop is better const size_t ...
4 years, 2 months ago (2016-10-11 03:58:11 UTC) #56
yabinh
https://codereview.chromium.org/2372493002/diff/140001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2372493002/diff/140001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode364 third_party/WebKit/Source/core/editing/InputMethodController.cpp:364: size_t commonPrefixLength = 0; On 2016/10/11 03:58:10, Yosi_UTC9 wrote: ...
4 years, 2 months ago (2016-10-11 05:07:55 UTC) #59
yosin_UTC9
Let's add |const| as much as possible we can. https://codereview.chromium.org/2372493002/diff/180001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2372493002/diff/180001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode365 third_party/WebKit/Source/core/editing/InputMethodController.cpp:365: ...
4 years, 2 months ago (2016-10-11 08:32:41 UTC) #64
yabinh
https://codereview.chromium.org/2372493002/diff/180001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2372493002/diff/180001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode365 third_party/WebKit/Source/core/editing/InputMethodController.cpp:365: for (commonPrefixLength = 0; commonPrefixLength < maxCommonPrefixLength; On 2016/10/11 ...
4 years, 2 months ago (2016-10-11 08:55:01 UTC) #67
yosin_UTC9
https://codereview.chromium.org/2372493002/diff/200001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2372493002/diff/200001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode367 third_party/WebKit/Source/core/editing/InputMethodController.cpp:367: nit: Please remove an extra blank line. https://codereview.chromium.org/2372493002/diff/200001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode380 third_party/WebKit/Source/core/editing/InputMethodController.cpp:380: ...
4 years, 2 months ago (2016-10-12 06:35:38 UTC) #70
yabinh
https://codereview.chromium.org/2372493002/diff/200001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2372493002/diff/200001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode367 third_party/WebKit/Source/core/editing/InputMethodController.cpp:367: On 2016/10/12 06:35:37, Yosi_UTC9 wrote: > nit: Please remove ...
4 years, 2 months ago (2016-10-12 07:32:33 UTC) #73
yosin_UTC9
lgtm w/ small nit https://codereview.chromium.org/2372493002/diff/220001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2372493002/diff/220001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode434 third_party/WebKit/Source/core/editing/InputMethodController.cpp:434: Element* editable = frame().selection().rootEditableElement(); Just ...
4 years, 2 months ago (2016-10-12 08:12:52 UTC) #74
yabinh
Thanks~ https://codereview.chromium.org/2372493002/diff/220001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2372493002/diff/220001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode434 third_party/WebKit/Source/core/editing/InputMethodController.cpp:434: Element* editable = frame().selection().rootEditableElement(); On 2016/10/12 08:12:52, Yosi_UTC9 ...
4 years, 2 months ago (2016-10-12 08:18:40 UTC) #77
yabinh
https://codereview.chromium.org/2372493002/diff/220001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2372493002/diff/220001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode434 third_party/WebKit/Source/core/editing/InputMethodController.cpp:434: Element* editable = frame().selection().rootEditableElement(); On 2016/10/12 08:18:40, yabinh wrote: ...
4 years, 2 months ago (2016-10-12 09:14:08 UTC) #84
yosin_UTC9
https://codereview.chromium.org/2372493002/diff/280001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2372493002/diff/280001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode408 third_party/WebKit/Source/core/editing/InputMethodController.cpp:408: nit: Remove an extra blank line. https://codereview.chromium.org/2372493002/diff/280001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode409 third_party/WebKit/Source/core/editing/InputMethodController.cpp:409: return ...
4 years, 2 months ago (2016-10-12 09:49:32 UTC) #85
yabinh
https://codereview.chromium.org/2372493002/diff/280001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2372493002/diff/280001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode408 third_party/WebKit/Source/core/editing/InputMethodController.cpp:408: On 2016/10/12 09:49:32, Yosi_UTC9 wrote: > nit: Remove an ...
4 years, 2 months ago (2016-10-12 09:56:43 UTC) #88
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/2372493002/300001
4 years, 2 months ago (2016-10-12 11:27:45 UTC) #93
commit-bot: I haz the power
Committed patchset #16 (id:300001)
4 years, 2 months ago (2016-10-12 11:33:38 UTC) #94
commit-bot: I haz the power
4 years, 2 months ago (2016-10-12 11:35:56 UTC) #96
Message was sent while issue was closed.
Patchset 16 (id:??) landed as
https://crrev.com/993074d17afee685ced99283d7ffbe809fdb6f99
Cr-Commit-Position: refs/heads/master@{#424716}

Powered by Google App Engine
This is Rietveld 408576698