| OLD | NEW |
| 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 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 777 updatePositionForNodeRemovalPreservingChildren(m_endingPosition,
*node); | 777 updatePositionForNodeRemovalPreservingChildren(m_endingPosition,
*node); |
| 778 | 778 |
| 779 CompositeEditCommand::removeNodePreservingChildren(node); | 779 CompositeEditCommand::removeNodePreservingChildren(node); |
| 780 node = m_endingPosition.anchorNode(); | 780 node = m_endingPosition.anchorNode(); |
| 781 } else { | 781 } else { |
| 782 node = node->parentNode(); | 782 node = node->parentNode(); |
| 783 } | 783 } |
| 784 } | 784 } |
| 785 } | 785 } |
| 786 | 786 |
| 787 void DeleteSelectionCommand::doApply() | 787 void DeleteSelectionCommand::doApply(EditingState*) |
| 788 { | 788 { |
| 789 // If selection has not been set to a custom selection when the command was
created, | 789 // If selection has not been set to a custom selection when the command was
created, |
| 790 // use the current ending selection. | 790 // use the current ending selection. |
| 791 if (!m_hasSelectionToDelete) | 791 if (!m_hasSelectionToDelete) |
| 792 m_selectionToDelete = endingSelection(); | 792 m_selectionToDelete = endingSelection(); |
| 793 | 793 |
| 794 if (!m_selectionToDelete.isNonOrphanedRange() || !m_selectionToDelete.isCont
entEditable()) | 794 if (!m_selectionToDelete.isNonOrphanedRange() || !m_selectionToDelete.isCont
entEditable()) |
| 795 return; | 795 return; |
| 796 | 796 |
| 797 // save this to later make the selection with | 797 // save this to later make the selection with |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 903 visitor->trace(m_deleteIntoBlockquoteStyle); | 903 visitor->trace(m_deleteIntoBlockquoteStyle); |
| 904 visitor->trace(m_startRoot); | 904 visitor->trace(m_startRoot); |
| 905 visitor->trace(m_endRoot); | 905 visitor->trace(m_endRoot); |
| 906 visitor->trace(m_startTableRow); | 906 visitor->trace(m_startTableRow); |
| 907 visitor->trace(m_endTableRow); | 907 visitor->trace(m_endTableRow); |
| 908 visitor->trace(m_temporaryPlaceholder); | 908 visitor->trace(m_temporaryPlaceholder); |
| 909 CompositeEditCommand::trace(visitor); | 909 CompositeEditCommand::trace(visitor); |
| 910 } | 910 } |
| 911 | 911 |
| 912 } // namespace blink | 912 } // namespace blink |
| OLD | NEW |