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

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

Issue 2574793002: [Editing] Store |CommandSource| in |CompositeEditCommand| (Closed)
Patch Set: Created 4 years 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
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 MatchStyle = 1 << 2, 43 MatchStyle = 1 << 2,
44 PreventNesting = 1 << 3, 44 PreventNesting = 1 << 3,
45 MovingParagraph = 1 << 4, 45 MovingParagraph = 1 << 4,
46 SanitizeFragment = 1 << 5 46 SanitizeFragment = 1 << 5
47 }; 47 };
48 48
49 typedef unsigned CommandOptions; 49 typedef unsigned CommandOptions;
50 50
51 static ReplaceSelectionCommand* create( 51 static ReplaceSelectionCommand* create(
52 Document& document, 52 Document& document,
53 CommandSource source,
53 DocumentFragment* fragment, 54 DocumentFragment* fragment,
54 CommandOptions options, 55 CommandOptions options,
55 InputEvent::InputType inputType = InputEvent::InputType::None) { 56 InputEvent::InputType inputType = InputEvent::InputType::None) {
56 return new ReplaceSelectionCommand(document, fragment, options, inputType); 57 return new ReplaceSelectionCommand(document, source, fragment, options,
58 inputType);
57 } 59 }
58 60
59 EphemeralRange insertedRange() const; 61 EphemeralRange insertedRange() const;
60 62
61 DECLARE_VIRTUAL_TRACE(); 63 DECLARE_VIRTUAL_TRACE();
62 64
63 private: 65 private:
64 ReplaceSelectionCommand(Document&, 66 ReplaceSelectionCommand(Document&,
67 CommandSource,
65 DocumentFragment*, 68 DocumentFragment*,
66 CommandOptions, 69 CommandOptions,
67 InputEvent::InputType); 70 InputEvent::InputType);
68 71
69 void doApply(EditingState*) override; 72 void doApply(EditingState*) override;
70 InputEvent::InputType inputType() const override; 73 InputEvent::InputType inputType() const override;
71 bool isReplaceSelectionCommand() const override; 74 bool isReplaceSelectionCommand() const override;
72 75
73 class InsertedNodes { 76 class InsertedNodes {
74 STACK_ALLOCATED(); 77 STACK_ALLOCATED();
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 160
158 DEFINE_TYPE_CASTS(ReplaceSelectionCommand, 161 DEFINE_TYPE_CASTS(ReplaceSelectionCommand,
159 CompositeEditCommand, 162 CompositeEditCommand,
160 command, 163 command,
161 command->isReplaceSelectionCommand(), 164 command->isReplaceSelectionCommand(),
162 command.isReplaceSelectionCommand()); 165 command.isReplaceSelectionCommand());
163 166
164 } // namespace blink 167 } // namespace blink
165 168
166 #endif // ReplaceSelectionCommand_h 169 #endif // ReplaceSelectionCommand_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698