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

Side by Side Diff: third_party/WebKit/Source/core/editing/BackspaceStateMachine.h

Issue 1832343002: Introduce BackspaceStateMachine (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary includes. Created 4 years, 8 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef BackspaceStateMachine_h
6 #define BackspaceStateMachine_h
7
8 #include "core/CoreExport.h"
9 #include "wtf/Allocator.h"
10 #include "wtf/Noncopyable.h"
11 #include "wtf/text/Unicode.h"
12
13 namespace blink {
14
15 class CORE_EXPORT BackspaceStateMachine {
16 STACK_ALLOCATED();
17 WTF_MAKE_NONCOPYABLE(BackspaceStateMachine);
18 public:
19 BackspaceStateMachine() = default;
20
21 // Returns true when the state machine has stopped.
22 bool updateState(UChar codeUnit);
23
24 // Finalize the state machine and returns the code unit count to be deleted.
25 // If the state machine hasn't finished, this method finishes the state
26 // machine first.
27 int finalizeAndGetCodeUnitCountToBeDeleted();
28
29 // Resets the internal state to the initial state.
30 void reset();
31
32 private:
33 int m_codeUnitsToBeDeleted = 0;
34
35 // Used for composing supplementary code point with surrogate pairs.
36 UChar m_trailSurrogate = 0;
37 };
38
39 } // namespace blink
40
41 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/editing/BackspaceStateMachine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698