Chromium Code Reviews| 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 |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e875bb02e5bd4a7610e1f5de2da2b8ef0db2415d |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/core/editing/BackspaceStateMachine.h |
| @@ -0,0 +1,33 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef BackspaceStateMachine_h |
| +#define BackspaceStateMachine_h |
| + |
| +#include <stdint.h> |
| + |
| +namespace blink { |
| + |
| +class BackspaceStateMachine { |
|
yosin_UTC9
2016/03/25 04:37:23
Could you write unit test for |BackspaceStateMachi
Seigo Nonaka
2016/03/25 06:59:06
Done.
|
| +public: |
|
yosin_UTC9
2016/03/25 04:37:23
Please insert a following line before |public:|
Seigo Nonaka
2016/03/25 06:59:06
Done.
|
| + BackspaceStateMachine(); |
| + |
| + // Returns true when the state machine has stopped. |
| + bool ComputeNextState(uint16_t codeUnit); |
|
yosin_UTC9
2016/03/25 04:37:23
Could you use |camelCase| for member function?
We'
Seigo Nonaka
2016/03/25 06:59:06
Done.
|
| + |
| + // Finalize the state machine and returns the code unit count to be deleted. |
| + // If the state machine hasn't finished, this method finishes the state |
| + // machine first. |
| + int FinalizeAndGetCodeUnitCountToBeDeleted(); |
| + |
| +private: |
| + int mCodeUnitsToBeDeleted; |
|
yosin_UTC9
2016/03/25 04:37:23
Blink uses |m_camelCase| for member variable.
Let
Seigo Nonaka
2016/03/25 06:59:06
Done.
|
| + |
| + // Used for composing supplementary code point with surrogate pairs. |
| + uint16_t mTrailSurrogate; |
|
yosin_UTC9
2016/03/25 04:37:23
s/;/=0/
Seigo Nonaka
2016/03/25 06:59:06
Done.
|
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif |