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

Issue 2782823002: Make InsertIncrementalTextCommand to handle surrogate pair (Closed)

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

Description

Make InsertIncrementalTextCommand to handle surrogate pair properly This patch makes |InsertIncrementalTextCommand| to handle surrogate pairs properly. Before this patch, |InsertIncrementalTextCommand| to attempt to replace trailing surrogate pairs code unit with surrogate pair then produces surrogate pairs + trailing surrogate pair. Example: Old text: replace D83D DE3A (U+1F63A) by D83D DE38 (U+1F638) Current behavior: D83D DE3A DE38 New behavior: D83D DE38 This is cause by computeCommonPrefixLength(oldString, newString) returns 1 in above example where middle of surrogate pairs. BUG=706166 TEST=run_webkit_unit_tests --gtest_filter=InsertIncrementalTextCommandTest.SurrogatePairs* Review-Url: https://codereview.chromium.org/2782823002 Cr-Commit-Position: refs/heads/master@{#461382} Committed: https://chromium.googlesource.com/chromium/src/+/1cc2c7d24ced1b58e047a4dea8a78493e32a1bf0

Patch Set 1 : 2017-03-29T16:13:30 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+80 lines, -3 lines) Patch
M third_party/WebKit/Source/core/editing/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.h View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp View 2 chunks +8 lines, -1 line 2 comments Download
A third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommandTest.cpp View 1 chunk +68 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/commands/InsertTextCommand.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 15 (10 generated)
yosin_UTC9
PTAL
3 years, 8 months ago (2017-03-29 08:04:28 UTC) #6
Changwan Ryu
lgtm https://codereview.chromium.org/2782823002/diff/20001/third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp File third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp (right): https://codereview.chromium.org/2782823002/diff/20001/third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp#newcode42 third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp:42: if (str1[length1 - index - 1] != str2[length2 ...
3 years, 8 months ago (2017-03-29 15:36:57 UTC) #9
yosin_UTC9
Thanks for reviewing! Committing... https://codereview.chromium.org/2782823002/diff/20001/third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp File third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp (right): https://codereview.chromium.org/2782823002/diff/20001/third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp#newcode42 third_party/WebKit/Source/core/editing/commands/InsertIncrementalTextCommand.cpp:42: if (str1[length1 - index - ...
3 years, 8 months ago (2017-04-03 05:27:28 UTC) #10
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/2782823002/20001
3 years, 8 months ago (2017-04-03 05:27:51 UTC) #12
commit-bot: I haz the power
3 years, 8 months ago (2017-04-03 07:33:52 UTC) #15
Message was sent while issue was closed.
Committed patchset #1 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/1cc2c7d24ced1b58e047a4dea8a7...

Powered by Google App Engine
This is Rietveld 408576698