OLD | NEW |
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 static ReplaceSelectionCommand* create( | 51 static ReplaceSelectionCommand* create( |
52 Document& document, | 52 Document& document, |
53 DocumentFragment* fragment, | 53 DocumentFragment* fragment, |
54 CommandOptions options, | 54 CommandOptions options, |
55 InputEvent::InputType inputType = InputEvent::InputType::None) { | 55 InputEvent::InputType inputType = InputEvent::InputType::None) { |
56 return new ReplaceSelectionCommand(document, fragment, options, inputType); | 56 return new ReplaceSelectionCommand(document, fragment, options, inputType); |
57 } | 57 } |
58 | 58 |
59 EphemeralRange insertedRange() const; | 59 EphemeralRange insertedRange() const; |
60 | 60 |
| 61 InputEvent::InputType inputType() const final; |
| 62 String textDataForInputEvent() const final; |
| 63 DataTransfer* dataTransferForInputEvent() const final; |
| 64 |
61 DECLARE_VIRTUAL_TRACE(); | 65 DECLARE_VIRTUAL_TRACE(); |
62 | 66 |
63 private: | 67 private: |
64 ReplaceSelectionCommand(Document&, | 68 ReplaceSelectionCommand(Document&, |
65 DocumentFragment*, | 69 DocumentFragment*, |
66 CommandOptions, | 70 CommandOptions, |
67 InputEvent::InputType); | 71 InputEvent::InputType); |
68 | 72 |
69 void doApply(EditingState*) override; | 73 void doApply(EditingState*) override; |
70 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(); |
75 | 78 |
76 public: | 79 public: |
77 void respondToNodeInsertion(Node&); | 80 void respondToNodeInsertion(Node&); |
78 void willRemoveNodePreservingChildren(Node&); | 81 void willRemoveNodePreservingChildren(Node&); |
79 void willRemoveNode(Node&); | 82 void willRemoveNode(Node&); |
80 void didReplaceNode(Node&, Node& newNode); | 83 void didReplaceNode(Node&, Node& newNode); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |