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

Issue 2763873003: Adjust common prefix/suffix correctly for InsertIncrementalTextCommand (Closed)

Created:
3 years, 9 months ago by yabinh
Modified:
3 years, 9 months ago
CC:
aelias_OOO_until_Jul13, blink-reviews, Changwan Ryu, chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Adjust common prefix/suffix correctly for InsertIncrementalTextCommand In InsertIncrementalTextCommand, when adjusting common prefix/suffix for grapheme clusters, the old implementation used mismatched offset and node for the selection. This CL makes them matched. Besides, this CL replaces wrong DCHECK with truncation when computing common suffix. BUG=702082 TEST=run_webkit_unit_tests --gtest_filter= InputMethodControllerTest.SetCompositionWithGraphemeCluster* Review-Url: https://codereview.chromium.org/2763873003 Cr-Commit-Position: refs/heads/master@{#458669} Committed: https://chromium.googlesource.com/chromium/src/+/195221de391ce3bf00fb70a7e64995648e535feb

Patch Set 1 #

Patch Set 2 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -19 lines) Patch
M third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp View 1 chunk +58 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp View 1 3 chunks +21 lines, -19 lines 6 comments Download

Messages

Total messages: 27 (19 generated)
yabinh
yosin@, PTAL, thanks! https://codereview.chromium.org/2763873003/diff/20001/third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp File third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp (left): https://codereview.chromium.org/2763873003/diff/20001/third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp#oldcode100 third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp:100: const size_t diff = computeDistanceToRightGraphemeBoundary(position); BTW, ...
3 years, 9 months ago (2017-03-21 10:13:44 UTC) #8
yosin_UTC9
https://codereview.chromium.org/2763873003/diff/20001/third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp File third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp (left): https://codereview.chromium.org/2763873003/diff/20001/third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp#oldcode100 third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp:100: const size_t diff = computeDistanceToRightGraphemeBoundary(position); On 2017/03/21 at 10:13:44, ...
3 years, 9 months ago (2017-03-22 02:22:40 UTC) #16
yabinh
https://codereview.chromium.org/2763873003/diff/20001/third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp File third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp (left): https://codereview.chromium.org/2763873003/diff/20001/third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp#oldcode100 third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp:100: const size_t diff = computeDistanceToRightGraphemeBoundary(position); On 2017/03/22 02:22:39, yosin_UTC9 ...
3 years, 9 months ago (2017-03-22 02:35:34 UTC) #17
yabinh
https://codereview.chromium.org/2763873003/diff/20001/third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp File third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp (left): https://codereview.chromium.org/2763873003/diff/20001/third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp#oldcode68 third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp:68: const size_t diff = computeDistanceToLeftGraphemeBoundary(position); We don't need replace ...
3 years, 9 months ago (2017-03-22 02:38:32 UTC) #18
yosin_UTC9
lgtm
3 years, 9 months ago (2017-03-22 05:20:24 UTC) #19
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/2763873003/20001
3 years, 9 months ago (2017-03-22 05:46:41 UTC) #21
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/195221de391ce3bf00fb70a7e64995648e535feb
3 years, 9 months ago (2017-03-22 07:36:31 UTC) #25
Changwan Ryu
3 years, 9 months ago (2017-03-23 21:20:17 UTC) #27
Message was sent while issue was closed.
Hi, we are considering merging this to M57 in a couple of hours. Are we
confident that this is safe? I left some question and comment inline.

https://codereview.chromium.org/2763873003/diff/20001/third_party/WebKit/Sour...
File
third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp
(right):

https://codereview.chromium.org/2763873003/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp:60:
selectionStart.computeContainerNode()->parentNode();
Is it safe not to have a null check here? I mean, both for containernode and
parent node. BTW, it seems that selectionNode here just means rootEditable, not
the selection itself.

https://codereview.chromium.org/2763873003/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp:93:
selectionStart.computeContainerNode()->parentNode();
Same comment applies here.

Powered by Google App Engine
This is Rietveld 408576698