Chromium Code Reviews
DescriptionMake 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
Messages
Total messages: 15 (10 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||