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

Side by Side Diff: third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.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 19 matching lines...) Expand all
30 30
31 namespace blink { 31 namespace blink {
32 32
33 class EditingStyle; 33 class EditingStyle;
34 class HTMLTableRowElement; 34 class HTMLTableRowElement;
35 35
36 class CORE_EXPORT DeleteSelectionCommand final : public CompositeEditCommand { 36 class CORE_EXPORT DeleteSelectionCommand final : public CompositeEditCommand {
37 public: 37 public:
38 static DeleteSelectionCommand* create( 38 static DeleteSelectionCommand* create(
39 Document& document, 39 Document& document,
40 CommandSource source,
40 bool smartDelete = false, 41 bool smartDelete = false,
41 bool mergeBlocksAfterDelete = true, 42 bool mergeBlocksAfterDelete = true,
42 bool expandForSpecialElements = false, 43 bool expandForSpecialElements = false,
43 bool sanitizeMarkup = true, 44 bool sanitizeMarkup = true,
44 InputEvent::InputType inputType = InputEvent::InputType::None, 45 InputEvent::InputType inputType = InputEvent::InputType::None,
45 const Position& referenceMovePosition = Position()) { 46 const Position& referenceMovePosition = Position()) {
46 return new DeleteSelectionCommand( 47 return new DeleteSelectionCommand(document, source, smartDelete,
47 document, smartDelete, mergeBlocksAfterDelete, expandForSpecialElements, 48 mergeBlocksAfterDelete,
48 sanitizeMarkup, inputType, referenceMovePosition); 49 expandForSpecialElements, sanitizeMarkup,
50 inputType, referenceMovePosition);
49 } 51 }
50 static DeleteSelectionCommand* create( 52 static DeleteSelectionCommand* create(
53 CommandSource source,
51 const VisibleSelection& selection, 54 const VisibleSelection& selection,
52 bool smartDelete = false, 55 bool smartDelete = false,
53 bool mergeBlocksAfterDelete = true, 56 bool mergeBlocksAfterDelete = true,
54 bool expandForSpecialElements = false, 57 bool expandForSpecialElements = false,
55 bool sanitizeMarkup = true, 58 bool sanitizeMarkup = true,
56 InputEvent::InputType inputType = InputEvent::InputType::None) { 59 InputEvent::InputType inputType = InputEvent::InputType::None) {
57 return new DeleteSelectionCommand( 60 return new DeleteSelectionCommand(
58 selection, smartDelete, mergeBlocksAfterDelete, 61 source, selection, smartDelete, mergeBlocksAfterDelete,
59 expandForSpecialElements, sanitizeMarkup, inputType); 62 expandForSpecialElements, sanitizeMarkup, inputType);
60 } 63 }
61 64
62 DECLARE_VIRTUAL_TRACE(); 65 DECLARE_VIRTUAL_TRACE();
63 66
64 private: 67 private:
65 DeleteSelectionCommand(Document&, 68 DeleteSelectionCommand(Document&,
69 CommandSource,
66 bool smartDelete, 70 bool smartDelete,
67 bool mergeBlocksAfterDelete, 71 bool mergeBlocksAfterDelete,
68 bool expandForSpecialElements, 72 bool expandForSpecialElements,
69 bool santizeMarkup, 73 bool santizeMarkup,
70 InputEvent::InputType, 74 InputEvent::InputType,
71 const Position& referenceMovePosition); 75 const Position& referenceMovePosition);
72 DeleteSelectionCommand(const VisibleSelection&, 76 DeleteSelectionCommand(CommandSource,
77 const VisibleSelection&,
73 bool smartDelete, 78 bool smartDelete,
74 bool mergeBlocksAfterDelete, 79 bool mergeBlocksAfterDelete,
75 bool expandForSpecialElements, 80 bool expandForSpecialElements,
76 bool sanitizeMarkup, 81 bool sanitizeMarkup,
77 InputEvent::InputType); 82 InputEvent::InputType);
78 83
79 void doApply(EditingState*) override; 84 void doApply(EditingState*) override;
80 InputEvent::InputType inputType() const override; 85 InputEvent::InputType inputType() const override;
81 86
82 bool preservesTypingStyle() const override; 87 bool preservesTypingStyle() const override;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 Member<Element> m_startRoot; 134 Member<Element> m_startRoot;
130 Member<Element> m_endRoot; 135 Member<Element> m_endRoot;
131 Member<HTMLTableRowElement> m_startTableRow; 136 Member<HTMLTableRowElement> m_startTableRow;
132 Member<HTMLTableRowElement> m_endTableRow; 137 Member<HTMLTableRowElement> m_endTableRow;
133 Member<Node> m_temporaryPlaceholder; 138 Member<Node> m_temporaryPlaceholder;
134 }; 139 };
135 140
136 } // namespace blink 141 } // namespace blink
137 142
138 #endif // DeleteSelectionCommand_h 143 #endif // DeleteSelectionCommand_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698