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

Unified Diff: third_party/WebKit/Source/core/editing/state_machines/BackspaceStateMachine.cpp

Issue 2118083003: Emoji modifier should be deleted at the same time in ZWJ sequence. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/state_machines/BackspaceStateMachineTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/state_machines/BackspaceStateMachine.cpp
diff --git a/third_party/WebKit/Source/core/editing/state_machines/BackspaceStateMachine.cpp b/third_party/WebKit/Source/core/editing/state_machines/BackspaceStateMachine.cpp
index 0f0a2625476b2b1f40424b897324584b82794ee6..f92beaa7d0b89b09a32dc9a3460b8068a6ad1009 100644
--- a/third_party/WebKit/Source/core/editing/state_machines/BackspaceStateMachine.cpp
+++ b/third_party/WebKit/Source/core/editing/state_machines/BackspaceStateMachine.cpp
@@ -163,7 +163,9 @@ BackspaceStateMachine::feedPrecedingCodeUnit(UChar codeUnit)
case BackspaceState::BeforeZWJ:
if (Character::isEmoji(codePoint)) {
m_codeUnitsToBeDeleted += U16_LENGTH(codePoint) + 1; // +1 for ZWJ
- return moveToNextState(BackspaceState::BeforeZWJEmoji);
+ return Character::isModifier(codePoint) ?
+ moveToNextState(BackspaceState::BeforeEmojiModifier) :
+ moveToNextState(BackspaceState::BeforeZWJEmoji);
}
if (u_hasBinaryProperty(codePoint, UCHAR_VARIATION_SELECTOR)) {
DCHECK_EQ(m_lastSeenVSCodeUnits, 0);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/state_machines/BackspaceStateMachineTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698