| Index: Source/core/editing/DeleteSelectionCommand.cpp
|
| diff --git a/Source/core/editing/DeleteSelectionCommand.cpp b/Source/core/editing/DeleteSelectionCommand.cpp
|
| index 341ae5838bee53d39d3095dfb9ca08bc99d0e76f..39b7546220723b51630ed69e17832ea882a5ac29 100644
|
| --- a/Source/core/editing/DeleteSelectionCommand.cpp
|
| +++ b/Source/core/editing/DeleteSelectionCommand.cpp
|
| @@ -67,7 +67,7 @@ static bool isTableRowEmpty(Node* row)
|
| return true;
|
| }
|
|
|
| -DeleteSelectionCommand::DeleteSelectionCommand(Document *document, bool smartDelete, bool mergeBlocksAfterDelete, bool replace, bool expandForSpecialElements, bool sanitizeMarkup)
|
| +DeleteSelectionCommand::DeleteSelectionCommand(Document& document, bool smartDelete, bool mergeBlocksAfterDelete, bool replace, bool expandForSpecialElements, bool sanitizeMarkup)
|
| : CompositeEditCommand(document)
|
| , m_hasSelectionToDelete(false)
|
| , m_smartDelete(smartDelete)
|
| @@ -86,7 +86,7 @@ DeleteSelectionCommand::DeleteSelectionCommand(Document *document, bool smartDel
|
| }
|
|
|
| DeleteSelectionCommand::DeleteSelectionCommand(const VisibleSelection& selection, bool smartDelete, bool mergeBlocksAfterDelete, bool replace, bool expandForSpecialElements, bool sanitizeMarkup)
|
| - : CompositeEditCommand(&selection.start().anchorNode()->document())
|
| + : CompositeEditCommand(selection.start().anchorNode()->document())
|
| , m_hasSelectionToDelete(true)
|
| , m_smartDelete(smartDelete)
|
| , m_mergeBlocksAfterDelete(mergeBlocksAfterDelete)
|
| @@ -379,7 +379,7 @@ void DeleteSelectionCommand::removeNode(PassRefPtr<Node> node, ShouldAssumeConte
|
| }
|
|
|
| // Make sure empty cell has some height, if a placeholder can be inserted.
|
| - document()->updateLayoutIgnorePendingStylesheets();
|
| + document().updateLayoutIgnorePendingStylesheets();
|
| RenderObject *r = node->renderer();
|
| if (r && r->isTableCell() && toRenderTableCell(r)->contentHeight() <= 0) {
|
| Position firstEditablePosition = firstEditablePositionInNode(node.get());
|
| @@ -568,7 +568,7 @@ void DeleteSelectionCommand::handleGeneralDelete()
|
|
|
| void DeleteSelectionCommand::fixupWhitespace()
|
| {
|
| - document()->updateLayoutIgnorePendingStylesheets();
|
| + document().updateLayoutIgnorePendingStylesheets();
|
| // FIXME: isRenderedCharacter should be removed, and we should use VisiblePosition::characterAfter and VisiblePosition::characterBefore
|
| if (m_leadingWhitespace.isNotNull() && !m_leadingWhitespace.isRenderedCharacter() && m_leadingWhitespace.deprecatedNode()->isTextNode()) {
|
| Text* textNode = toText(m_leadingWhitespace.deprecatedNode());
|
| @@ -625,7 +625,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) {
|
| - insertNodeAt(createBreakElement(document()).get(), m_upstreamStart);
|
| + insertNodeAt(createBreakElement(&document()).get(), m_upstreamStart);
|
| mergeDestination = VisiblePosition(m_upstreamStart);
|
| }
|
|
|
| @@ -725,7 +725,7 @@ void DeleteSelectionCommand::calculateTypingStyleAfterDelete()
|
| // In this case if we start typing, the new characters should have the same style as the just deleted ones,
|
| // but, if we change the selection, come back and start typing that style should be lost. Also see
|
| // preserveTypingStyle() below.
|
| - document()->frame()->selection()->setTypingStyle(m_typingStyle);
|
| + document().frame()->selection()->setTypingStyle(m_typingStyle);
|
| }
|
|
|
| void DeleteSelectionCommand::clearTransientState()
|
| @@ -825,7 +825,7 @@ void DeleteSelectionCommand::doApply()
|
| && lineBreakBeforeStart;
|
| }
|
|
|
| - RefPtr<Node> placeholder = m_needPlaceholder ? createBreakElement(document()).get() : 0;
|
| + RefPtr<Node> placeholder = m_needPlaceholder ? createBreakElement(&document()).get() : 0;
|
|
|
| if (placeholder) {
|
| if (m_sanitizeMarkup)
|
|
|