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

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

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 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2005 Apple Computer, 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 row->document().updateStyleAndLayoutIgnorePendingStylesheets(); 59 row->document().updateStyleAndLayoutIgnorePendingStylesheets();
60 for (Node* child = row->firstChild(); child; child = child->nextSibling()) { 60 for (Node* child = row->firstChild(); child; child = child->nextSibling()) {
61 if (isTableCell(child) && !isTableCellEmpty(child)) 61 if (isTableCell(child) && !isTableCellEmpty(child))
62 return false; 62 return false;
63 } 63 }
64 return true; 64 return true;
65 } 65 }
66 66
67 DeleteSelectionCommand::DeleteSelectionCommand( 67 DeleteSelectionCommand::DeleteSelectionCommand(
68 Document& document, 68 Document& document,
69 EditCommandSource source,
69 bool smartDelete, 70 bool smartDelete,
70 bool mergeBlocksAfterDelete, 71 bool mergeBlocksAfterDelete,
71 bool expandForSpecialElements, 72 bool expandForSpecialElements,
72 bool sanitizeMarkup, 73 bool sanitizeMarkup,
73 InputEvent::InputType inputType, 74 InputEvent::InputType inputType,
74 const Position& referenceMovePosition) 75 const Position& referenceMovePosition)
75 : CompositeEditCommand(document), 76 : CompositeEditCommand(document, source),
76 m_hasSelectionToDelete(false), 77 m_hasSelectionToDelete(false),
77 m_smartDelete(smartDelete), 78 m_smartDelete(smartDelete),
78 m_mergeBlocksAfterDelete(mergeBlocksAfterDelete), 79 m_mergeBlocksAfterDelete(mergeBlocksAfterDelete),
79 m_needPlaceholder(false), 80 m_needPlaceholder(false),
80 m_expandForSpecialElements(expandForSpecialElements), 81 m_expandForSpecialElements(expandForSpecialElements),
81 m_pruneStartBlockIfNecessary(false), 82 m_pruneStartBlockIfNecessary(false),
82 m_startsAtEmptyLine(false), 83 m_startsAtEmptyLine(false),
83 m_sanitizeMarkup(sanitizeMarkup), 84 m_sanitizeMarkup(sanitizeMarkup),
84 m_inputType(inputType), 85 m_inputType(inputType),
85 m_referenceMovePosition(referenceMovePosition), 86 m_referenceMovePosition(referenceMovePosition),
(...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 visitor->trace(m_deleteIntoBlockquoteStyle); 1228 visitor->trace(m_deleteIntoBlockquoteStyle);
1228 visitor->trace(m_startRoot); 1229 visitor->trace(m_startRoot);
1229 visitor->trace(m_endRoot); 1230 visitor->trace(m_endRoot);
1230 visitor->trace(m_startTableRow); 1231 visitor->trace(m_startTableRow);
1231 visitor->trace(m_endTableRow); 1232 visitor->trace(m_endTableRow);
1232 visitor->trace(m_temporaryPlaceholder); 1233 visitor->trace(m_temporaryPlaceholder);
1233 CompositeEditCommand::trace(visitor); 1234 CompositeEditCommand::trace(visitor);
1234 } 1235 }
1235 1236
1236 } // namespace blink 1237 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698