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

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

Issue 2627103003: [EditCommandSource] Pass source through |CompositeEditCommand| ctor instead of |apply(source)| (Closed)
Patch Set: Created 3 years, 11 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
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 EditCommandSource 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(
51 const VisibleSelection& selection, 53 const VisibleSelection& selection,
52 bool smartDelete = false, 54 bool smartDelete = false,
53 bool mergeBlocksAfterDelete = true, 55 bool mergeBlocksAfterDelete = true,
54 bool expandForSpecialElements = false, 56 bool expandForSpecialElements = false,
55 bool sanitizeMarkup = true, 57 bool sanitizeMarkup = true,
56 InputEvent::InputType inputType = InputEvent::InputType::None) { 58 InputEvent::InputType inputType = InputEvent::InputType::None) {
57 return new DeleteSelectionCommand( 59 return new DeleteSelectionCommand(
58 selection, smartDelete, mergeBlocksAfterDelete, 60 selection, smartDelete, mergeBlocksAfterDelete,
59 expandForSpecialElements, sanitizeMarkup, inputType); 61 expandForSpecialElements, sanitizeMarkup, inputType);
60 } 62 }
61 63
62 DECLARE_VIRTUAL_TRACE(); 64 DECLARE_VIRTUAL_TRACE();
63 65
64 private: 66 private:
65 DeleteSelectionCommand(Document&, 67 DeleteSelectionCommand(Document&,
68 EditCommandSource,
66 bool smartDelete, 69 bool smartDelete,
67 bool mergeBlocksAfterDelete, 70 bool mergeBlocksAfterDelete,
68 bool expandForSpecialElements, 71 bool expandForSpecialElements,
69 bool santizeMarkup, 72 bool santizeMarkup,
70 InputEvent::InputType, 73 InputEvent::InputType,
71 const Position& referenceMovePosition); 74 const Position& referenceMovePosition);
72 DeleteSelectionCommand(const VisibleSelection&, 75 DeleteSelectionCommand(const VisibleSelection&,
73 bool smartDelete, 76 bool smartDelete,
74 bool mergeBlocksAfterDelete, 77 bool mergeBlocksAfterDelete,
75 bool expandForSpecialElements, 78 bool expandForSpecialElements,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 Member<Element> m_startRoot; 132 Member<Element> m_startRoot;
130 Member<Element> m_endRoot; 133 Member<Element> m_endRoot;
131 Member<HTMLTableRowElement> m_startTableRow; 134 Member<HTMLTableRowElement> m_startTableRow;
132 Member<HTMLTableRowElement> m_endTableRow; 135 Member<HTMLTableRowElement> m_endTableRow;
133 Member<Node> m_temporaryPlaceholder; 136 Member<Node> m_temporaryPlaceholder;
134 }; 137 };
135 138
136 } // namespace blink 139 } // namespace blink
137 140
138 #endif // DeleteSelectionCommand_h 141 #endif // DeleteSelectionCommand_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698