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

Side by Side Diff: third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.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, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 if (m_firstNodeInserted.get() == node) 431 if (m_firstNodeInserted.get() == node)
432 m_firstNodeInserted = &newNode; 432 m_firstNodeInserted = &newNode;
433 if (m_lastNodeInserted.get() == node) 433 if (m_lastNodeInserted.get() == node)
434 m_lastNodeInserted = &newNode; 434 m_lastNodeInserted = &newNode;
435 if (m_refNode.get() == node) 435 if (m_refNode.get() == node)
436 m_refNode = &newNode; 436 m_refNode = &newNode;
437 } 437 }
438 438
439 ReplaceSelectionCommand::ReplaceSelectionCommand( 439 ReplaceSelectionCommand::ReplaceSelectionCommand(
440 Document& document, 440 Document& document,
441 EditCommandSource source,
441 DocumentFragment* fragment, 442 DocumentFragment* fragment,
442 CommandOptions options, 443 CommandOptions options,
443 InputEvent::InputType inputType) 444 InputEvent::InputType inputType)
444 : CompositeEditCommand(document), 445 : CompositeEditCommand(document, source),
445 m_selectReplacement(options & SelectReplacement), 446 m_selectReplacement(options & SelectReplacement),
446 m_smartReplace(options & SmartReplace), 447 m_smartReplace(options & SmartReplace),
447 m_matchStyle(options & MatchStyle), 448 m_matchStyle(options & MatchStyle),
448 m_documentFragment(fragment), 449 m_documentFragment(fragment),
449 m_preventNesting(options & PreventNesting), 450 m_preventNesting(options & PreventNesting),
450 m_movingParagraph(options & MovingParagraph), 451 m_movingParagraph(options & MovingParagraph),
451 m_inputType(inputType), 452 m_inputType(inputType),
452 m_sanitizeFragment(options & SanitizeFragment), 453 m_sanitizeFragment(options & SanitizeFragment),
453 m_shouldMergeEnd(false) {} 454 m_shouldMergeEnd(false) {}
454 455
(...skipping 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after
2130 visitor->trace(m_startOfInsertedContent); 2131 visitor->trace(m_startOfInsertedContent);
2131 visitor->trace(m_endOfInsertedContent); 2132 visitor->trace(m_endOfInsertedContent);
2132 visitor->trace(m_insertionStyle); 2133 visitor->trace(m_insertionStyle);
2133 visitor->trace(m_documentFragment); 2134 visitor->trace(m_documentFragment);
2134 visitor->trace(m_startOfInsertedRange); 2135 visitor->trace(m_startOfInsertedRange);
2135 visitor->trace(m_endOfInsertedRange); 2136 visitor->trace(m_endOfInsertedRange);
2136 CompositeEditCommand::trace(visitor); 2137 CompositeEditCommand::trace(visitor);
2137 } 2138 }
2138 2139
2139 } // namespace blink 2140 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698