| Index: Source/WebCore/editing/DeleteSelectionCommand.cpp
|
| diff --git a/Source/WebCore/editing/DeleteSelectionCommand.cpp b/Source/WebCore/editing/DeleteSelectionCommand.cpp
|
| index 6e7f44aa4e64f7268edb7a86c1de52f98bb54ba8..a5a3e2fdf3ec194df333bac960b812b2e9455a85 100644
|
| --- a/Source/WebCore/editing/DeleteSelectionCommand.cpp
|
| +++ b/Source/WebCore/editing/DeleteSelectionCommand.cpp
|
| @@ -83,7 +83,6 @@ DeleteSelectionCommand::DeleteSelectionCommand(Document *document, bool smartDel
|
| , m_startBlock(0)
|
| , m_endBlock(0)
|
| , m_typingStyle(0)
|
| - , m_deleteIntoBlockquoteStyle(0)
|
| {
|
| }
|
|
|
| @@ -102,7 +101,6 @@ DeleteSelectionCommand::DeleteSelectionCommand(const VisibleSelection& selection
|
| , m_startBlock(0)
|
| , m_endBlock(0)
|
| , m_typingStyle(0)
|
| - , m_deleteIntoBlockquoteStyle(0)
|
| {
|
| }
|
|
|
| @@ -209,19 +207,6 @@ void DeleteSelectionCommand::initializePositionData()
|
| else
|
| m_endingPosition = m_downstreamStart;
|
|
|
| - // We don't want to merge into a block if it will mean changing the quote level of content after deleting
|
| - // selections that contain a whole number paragraphs plus a line break, since it is unclear to most users
|
| - // that such a selection actually ends at the start of the next paragraph. This matches TextEdit behavior
|
| - // for indented paragraphs.
|
| - // Only apply this rule if the endingSelection is a range selection. If it is a caret, then other operations have created
|
| - // the selection we're deleting (like the process of creating a selection to delete during a backspace), and the user isn't in the situation described above.
|
| - if (numEnclosingMailBlockquotes(start) != numEnclosingMailBlockquotes(end)
|
| - && isStartOfParagraph(visibleEnd) && isStartOfParagraph(VisiblePosition(start))
|
| - && endingSelection().isRange()) {
|
| - m_mergeBlocksAfterDelete = false;
|
| - m_pruneStartBlockIfNecessary = true;
|
| - }
|
| -
|
| // Handle leading and trailing whitespace, as well as smart delete adjustments to the selection
|
| m_leadingWhitespace = m_upstreamStart.leadingWhitespacePosition(m_selectionToDelete.affinity());
|
| m_trailingWhitespace = m_downstreamEnd.trailingWhitespacePosition(VP_DEFAULT_AFFINITY);
|
| @@ -287,13 +272,6 @@ void DeleteSelectionCommand::saveTypingStyleState()
|
| // Figure out the typing style in effect before the delete is done.
|
| m_typingStyle = EditingStyle::create(m_selectionToDelete.start());
|
| m_typingStyle->removeStyleAddedByNode(enclosingAnchorElement(m_selectionToDelete.start()));
|
| -
|
| - // If we're deleting into a Mail blockquote, save the style at end() instead of start()
|
| - // We'll use this later in computeTypingStyleAfterDelete if we end up outside of a Mail blockquote
|
| - if (enclosingNodeOfType(m_selectionToDelete.start(), isMailBlockquote))
|
| - m_deleteIntoBlockquoteStyle = EditingStyle::create(m_selectionToDelete.end());
|
| - else
|
| - m_deleteIntoBlockquoteStyle = 0;
|
| }
|
|
|
| bool DeleteSelectionCommand::handleSpecialCaseBRDelete()
|
| @@ -709,11 +687,6 @@ void DeleteSelectionCommand::calculateTypingStyleAfterDelete()
|
| // so the Frame::appliedEditing can set it after the whole composite command
|
| // has completed.
|
|
|
| - // If we deleted into a blockquote, but are now no longer in a blockquote, use the alternate typing style
|
| - if (m_deleteIntoBlockquoteStyle && !enclosingNodeOfType(m_endingPosition, isMailBlockquote, CanCrossEditingBoundary))
|
| - m_typingStyle = m_deleteIntoBlockquoteStyle;
|
| - m_deleteIntoBlockquoteStyle = 0;
|
| -
|
| m_typingStyle->prepareToApplyAt(m_endingPosition);
|
| if (m_typingStyle->isEmpty())
|
| m_typingStyle = 0;
|
|
|