| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/editing/state_machines/BackspaceStateMachine.h" | 5 #include "core/editing/state_machines/BackspaceStateMachine.h" |
| 6 | 6 |
| 7 #include <ostream> // NOLINT |
| 7 #include "platform/text/Character.h" | 8 #include "platform/text/Character.h" |
| 8 #include "wtf/text/CharacterNames.h" | 9 #include "wtf/text/CharacterNames.h" |
| 9 #include "wtf/text/Unicode.h" | 10 #include "wtf/text/Unicode.h" |
| 10 #include <ostream> // NOLINT | |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 #define FOR_EACH_BACKSPACE_STATE_MACHINE_STATE(V) \ | 14 #define FOR_EACH_BACKSPACE_STATE_MACHINE_STATE(V) \ |
| 15 /* Initial state */ \ | 15 /* Initial state */ \ |
| 16 V(Start) \ | 16 V(Start) \ |
| 17 /* The current offset is just before line feed. */ \ | 17 /* The current offset is just before line feed. */ \ |
| 18 V(BeforeLF) \ | 18 V(BeforeLF) \ |
| 19 /* The current offset is just before keycap. */ \ | 19 /* The current offset is just before keycap. */ \ |
| 20 V(BeforeKeycap) \ | 20 V(BeforeKeycap) \ |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 return TextSegmentationMachineState::NeedMoreCodeUnit; | 243 return TextSegmentationMachineState::NeedMoreCodeUnit; |
| 244 } | 244 } |
| 245 | 245 |
| 246 TextSegmentationMachineState BackspaceStateMachine::finish() { | 246 TextSegmentationMachineState BackspaceStateMachine::finish() { |
| 247 DCHECK_NE(BackspaceState::Finished, m_state); | 247 DCHECK_NE(BackspaceState::Finished, m_state); |
| 248 m_state = BackspaceState::Finished; | 248 m_state = BackspaceState::Finished; |
| 249 return TextSegmentationMachineState::Finished; | 249 return TextSegmentationMachineState::Finished; |
| 250 } | 250 } |
| 251 | 251 |
| 252 } // namespace blink | 252 } // namespace blink |
| OLD | NEW |