| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006 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 12 matching lines...) Expand all Loading... |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #include "core/editing/commands/MoveSelectionCommand.h" | 26 #include "core/editing/commands/MoveSelectionCommand.h" |
| 27 | 27 |
| 28 #include "core/dom/DocumentFragment.h" | 28 #include "core/dom/DocumentFragment.h" |
| 29 #include "core/editing/commands/ReplaceSelectionCommand.h" | 29 #include "core/editing/commands/ReplaceSelectionCommand.h" |
| 30 | 30 |
| 31 namespace blink { | 31 namespace blink { |
| 32 | 32 |
| 33 MoveSelectionCommand::MoveSelectionCommand(PassRefPtrWillBeRawPtr<DocumentFragme
nt> fragment, const Position& position, bool smartInsert, bool smartDelete) | 33 MoveSelectionCommand::MoveSelectionCommand(RawPtr<DocumentFragment> fragment, co
nst Position& position, bool smartInsert, bool smartDelete) |
| 34 : CompositeEditCommand(*position.document()), m_fragment(fragment), m_positi
on(position), m_smartInsert(smartInsert), m_smartDelete(smartDelete) | 34 : CompositeEditCommand(*position.document()), m_fragment(fragment), m_positi
on(position), m_smartInsert(smartInsert), m_smartDelete(smartDelete) |
| 35 { | 35 { |
| 36 ASSERT(m_fragment); | 36 ASSERT(m_fragment); |
| 37 } | 37 } |
| 38 | 38 |
| 39 void MoveSelectionCommand::doApply(EditingState* editingState) | 39 void MoveSelectionCommand::doApply(EditingState* editingState) |
| 40 { | 40 { |
| 41 ASSERT(endingSelection().isNonOrphanedRange()); | 41 ASSERT(endingSelection().isNonOrphanedRange()); |
| 42 | 42 |
| 43 Position pos = m_position; | 43 Position pos = m_position; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 } | 87 } |
| 88 | 88 |
| 89 DEFINE_TRACE(MoveSelectionCommand) | 89 DEFINE_TRACE(MoveSelectionCommand) |
| 90 { | 90 { |
| 91 visitor->trace(m_fragment); | 91 visitor->trace(m_fragment); |
| 92 visitor->trace(m_position); | 92 visitor->trace(m_position); |
| 93 CompositeEditCommand::trace(visitor); | 93 CompositeEditCommand::trace(visitor); |
| 94 } | 94 } |
| 95 | 95 |
| 96 } // namespace blink | 96 } // namespace blink |
| OLD | NEW |