| 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 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 // See https://bugs.webkit.org/show_bug.cgi?id=25439 | 700 // See https://bugs.webkit.org/show_bug.cgi?id=25439 |
| 701 if (isRenderedAsNonInlineTableImageOrHR(startOfParagraphToMove.deepEquivalen
t().anchorNode()) && !isStartOfParagraph(mergeDestination)) { | 701 if (isRenderedAsNonInlineTableImageOrHR(startOfParagraphToMove.deepEquivalen
t().anchorNode()) && !isStartOfParagraph(mergeDestination)) { |
| 702 m_endingPosition = m_upstreamStart; | 702 m_endingPosition = m_upstreamStart; |
| 703 return; | 703 return; |
| 704 } | 704 } |
| 705 | 705 |
| 706 // moveParagraphs will insert placeholders if it removes blocks that would r
equire their use, don't let block | 706 // moveParagraphs will insert placeholders if it removes blocks that would r
equire their use, don't let block |
| 707 // removals that it does cause the insertion of *another* placeholder. | 707 // removals that it does cause the insertion of *another* placeholder. |
| 708 bool needPlaceholder = m_needPlaceholder; | 708 bool needPlaceholder = m_needPlaceholder; |
| 709 bool paragraphToMergeIsEmpty = startOfParagraphToMove.deepEquivalent() == en
dOfParagraphToMove.deepEquivalent(); | 709 bool paragraphToMergeIsEmpty = startOfParagraphToMove.deepEquivalent() == en
dOfParagraphToMove.deepEquivalent(); |
| 710 moveParagraph(startOfParagraphToMove, endOfParagraphToMove, mergeDestination
, editingState, false, !paragraphToMergeIsEmpty); | 710 moveParagraph(startOfParagraphToMove, endOfParagraphToMove, mergeDestination
, editingState, DoNotPreserveSelection, paragraphToMergeIsEmpty ? DoNotPreserveS
tyle : PreserveStyle); |
| 711 if (editingState->isAborted()) | 711 if (editingState->isAborted()) |
| 712 return; | 712 return; |
| 713 m_needPlaceholder = needPlaceholder; | 713 m_needPlaceholder = needPlaceholder; |
| 714 // The endingPosition was likely clobbered by the move, so recompute it (mov
eParagraph selects the moved paragraph). | 714 // The endingPosition was likely clobbered by the move, so recompute it (mov
eParagraph selects the moved paragraph). |
| 715 m_endingPosition = endingSelection().start(); | 715 m_endingPosition = endingSelection().start(); |
| 716 } | 716 } |
| 717 | 717 |
| 718 void DeleteSelectionCommand::removePreviouslySelectedEmptyTableRows(EditingState
* editingState) | 718 void DeleteSelectionCommand::removePreviouslySelectedEmptyTableRows(EditingState
* editingState) |
| 719 { | 719 { |
| 720 if (m_endTableRow && m_endTableRow->inShadowIncludingDocument() && m_endTabl
eRow != m_startTableRow) { | 720 if (m_endTableRow && m_endTableRow->inShadowIncludingDocument() && m_endTabl
eRow != m_startTableRow) { |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 961 visitor->trace(m_deleteIntoBlockquoteStyle); | 961 visitor->trace(m_deleteIntoBlockquoteStyle); |
| 962 visitor->trace(m_startRoot); | 962 visitor->trace(m_startRoot); |
| 963 visitor->trace(m_endRoot); | 963 visitor->trace(m_endRoot); |
| 964 visitor->trace(m_startTableRow); | 964 visitor->trace(m_startTableRow); |
| 965 visitor->trace(m_endTableRow); | 965 visitor->trace(m_endTableRow); |
| 966 visitor->trace(m_temporaryPlaceholder); | 966 visitor->trace(m_temporaryPlaceholder); |
| 967 CompositeEditCommand::trace(visitor); | 967 CompositeEditCommand::trace(visitor); |
| 968 } | 968 } |
| 969 | 969 |
| 970 } // namespace blink | 970 } // namespace blink |
| OLD | NEW |