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

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

Issue 2706033007: Add SetCharacterDataCommand (Closed)
Patch Set: Remove updateStyleAndLayout(), add DCHECK, add more tests Created 3 years, 9 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 2017 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 SetCharacterDataCommand_h
6 #define SetCharacterDataCommand_h
7
8 #include "core/editing/commands/EditCommand.h"
9
10 namespace blink {
11
12 class CORE_EXPORT SetCharacterDataCommand final : public SimpleEditCommand {
13 public:
14 static SetCharacterDataCommand* create(Text* node,
15 unsigned offset,
16 unsigned count,
17 const String& text) {
18 return new SetCharacterDataCommand(node, offset, count, text);
19 }
20
21 DECLARE_VIRTUAL_TRACE();
22
23 private:
24 SetCharacterDataCommand(Text* node,
25 unsigned offset,
26 unsigned count,
27 const String& text);
28
29 // EditCommand implementation
30 void doApply(EditingState*) final;
31 void doUnapply() final;
32
33 const Member<Text> m_node;
34 const unsigned m_offset;
35 const unsigned m_count;
36 String m_previousTextForUndo;
37 const String m_newText;
38 };
39
40 } // namespace blink
41
42 #endif // SetCharacterDataCommand_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698