| Index: Source/core/editing/DeleteSelectionCommand.cpp
|
| diff --git a/Source/core/editing/DeleteSelectionCommand.cpp b/Source/core/editing/DeleteSelectionCommand.cpp
|
| index 40c1bb9f8b1468d833a3d0031cf9891948dc6d01..1d09b23b815199d2d16e5b03efaf466ede34bbcf 100644
|
| --- a/Source/core/editing/DeleteSelectionCommand.cpp
|
| +++ b/Source/core/editing/DeleteSelectionCommand.cpp
|
| @@ -624,7 +624,7 @@ void DeleteSelectionCommand::mergeParagraphs()
|
| }
|
|
|
| // We need to merge into m_upstreamStart's block, but it's been emptied out and collapsed by deletion.
|
| - if (!mergeDestination.deepEquivalent().deprecatedNode() || !mergeDestination.deepEquivalent().deprecatedNode()->isDescendantOf(enclosingBlock(m_upstreamStart.containerNode())) || m_startsAtEmptyLine) {
|
| + if (!mergeDestination.deepEquivalent().deprecatedNode() || (!mergeDestination.deepEquivalent().deprecatedNode()->isDescendantOf(enclosingBlock(m_upstreamStart.containerNode())) && (!mergeDestination.deepEquivalent().anchorNode()->firstChild() || !m_upstreamStart.containerNode()->firstChild())) || (m_startsAtEmptyLine && mergeDestination != startOfParagraphToMove)) {
|
| insertNodeAt(createBreakElement(document()).get(), m_upstreamStart);
|
| mergeDestination = VisiblePosition(m_upstreamStart);
|
| }
|
|
|