| Index: third_party/WebKit/Source/core/editing/BackspaceStateMachine.h
|
| diff --git a/third_party/WebKit/Source/core/editing/BackspaceStateMachine.h b/third_party/WebKit/Source/core/editing/BackspaceStateMachine.h
|
| index 7043af79e44818985efc51dfe50941d26b5893eb..a8184a3138bcd5d0ef26473197ffb98de8fdb3be 100644
|
| --- a/third_party/WebKit/Source/core/editing/BackspaceStateMachine.h
|
| +++ b/third_party/WebKit/Source/core/editing/BackspaceStateMachine.h
|
| @@ -39,10 +39,30 @@ public:
|
| void reset();
|
|
|
| private:
|
| - int m_codeUnitsToBeDeleted = 0;
|
| + enum class BackspaceState {
|
| + Start, // Initial state
|
| + BeforeLF, // Indicates the current offset is just before line feed.
|
| + BeforeKeycap, // Indicates the current offset is just before keycap.
|
| + BeforeVSAndKeycap, // Indicates the current offset is just before variation selector and keycap.
|
| + BeforeEmojiModifier, // Indicates the current offset is just before emoji modifier.
|
| + BeforeVSAndEmojiModifier, // Indicates the current offset is just before variation selector and emoji modifier.
|
| + BeforeVS, // Indicates the current offset is just before variation sequence.
|
| + BeforeZWJEmoji, // Indicates the current offset is just before ZWJ emoji.
|
| + BeforeZWJ, // Indicates the current offset is just before ZWJ.
|
| + BeforeVSAndZWJ, // Indicates the current offset is just before variation selector and ZWJ.
|
| + OddNumberedRIS, // Indicates that there are odd numbered RIS from the beggining.
|
| + EvenNumberedRIS, // Indicates that there are even numbered RIS from the begging.
|
| + Finished, // Indicates this state machine has finished.
|
| + } m_state = BackspaceState::Start;
|
|
|
| // Used for composing supplementary code point with surrogate pairs.
|
| UChar m_trailSurrogate = 0;
|
| +
|
| + // The number of code units to be deleted.
|
| + int m_codeUnitsToBeDeleted = 0;
|
| +
|
| + // The length of the previously seen variation selector.
|
| + int m_lastSeenVSCodeUnits = 0;
|
| };
|
|
|
| } // namespace blink
|
|
|