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

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

Issue 2692093003: Rewrite DocumentMarkerController to use SynchronousMutationObserver (Closed)
Patch Set: Introduce SetCharacterDataCommand Created 3 years, 10 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.
yosin_UTC9 2017/02/20 07:26:27 Could you move SetCharacterDataCommand in another
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 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
yosin_UTC9 2017/02/20 07:26:27 Could add a comment to note |doApply()| and |doUna
29 void doApply(EditingState*) override;
yosin_UTC9 2017/02/20 07:26:27 nit: s/override/final/
30 void doUnapply() override;
yosin_UTC9 2017/02/20 07:26:27 nit: s/override/final/
31
32 Member<Text> m_node;
yosin_UTC9 2017/02/20 07:26:27 nit: Could you add |const| to all member variables
rlanday 2017/02/21 21:16:55 m_previousTextForUndo can't be const since it gets
33 unsigned m_offset;
34 unsigned m_count;
35 String m_previousTextForUndo;
36 String m_newText;
37 };
38
39 } // namespace blink
40
41 #endif // SetCharacterDataCommand_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698