Index: Source/core/editing/IndentOutdentCommand.cpp |
diff --git a/Source/core/editing/IndentOutdentCommand.cpp b/Source/core/editing/IndentOutdentCommand.cpp |
index da3dbb63ab3a394d7ba2e1c5b95b095aa7aa8a97..a9d85887a526808dfc8e67851f30b965f83c6e4d 100644 |
--- a/Source/core/editing/IndentOutdentCommand.cpp |
+++ b/Source/core/editing/IndentOutdentCommand.cpp |
@@ -43,7 +43,7 @@ static bool isListOrIndentBlockquote(const Node* node) |
return node && (node->hasTagName(ulTag) || node->hasTagName(olTag) || node->hasTagName(blockquoteTag)); |
} |
-IndentOutdentCommand::IndentOutdentCommand(Document* document, EIndentType typeOfAction, int marginInPixels) |
+IndentOutdentCommand::IndentOutdentCommand(Document& document, EIndentType typeOfAction, int marginInPixels) |
: ApplyBlockElementCommand(document, blockquoteTag, "margin: 0 0 0 40px; border: none; padding: 0px;") |
, m_typeOfAction(typeOfAction) |
, m_marginInPixels(marginInPixels) |
@@ -69,7 +69,7 @@ bool IndentOutdentCommand::tryIndentingAsListItem(const Position& start, const P |
Element* previousList = selectedListItem->previousElementSibling(); |
Element* nextList = selectedListItem->nextElementSibling(); |
- RefPtr<Element> newList = document()->createElement(listNode->tagQName(), false); |
+ RefPtr<Element> newList = document().createElement(listNode->tagQName(), false); |
insertNodeBefore(newList, selectedListItem); |
moveParagraphWithClones(start, end, newList.get(), selectedListItem); |
@@ -156,13 +156,13 @@ void IndentOutdentCommand::outdentParagraph() |
} |
} |
- document()->updateLayoutIgnorePendingStylesheets(); |
+ document().updateLayoutIgnorePendingStylesheets(); |
visibleStartOfParagraph = VisiblePosition(visibleStartOfParagraph.deepEquivalent()); |
visibleEndOfParagraph = VisiblePosition(visibleEndOfParagraph.deepEquivalent()); |
if (visibleStartOfParagraph.isNotNull() && !isStartOfParagraph(visibleStartOfParagraph)) |
- insertNodeAt(createBreakElement(document()), visibleStartOfParagraph.deepEquivalent()); |
+ insertNodeAt(createBreakElement(&document()), visibleStartOfParagraph.deepEquivalent()); |
if (visibleEndOfParagraph.isNotNull() && !isEndOfParagraph(visibleEndOfParagraph)) |
- insertNodeAt(createBreakElement(document()), visibleEndOfParagraph.deepEquivalent()); |
+ insertNodeAt(createBreakElement(&document()), visibleEndOfParagraph.deepEquivalent()); |
return; |
} |
@@ -175,7 +175,7 @@ void IndentOutdentCommand::outdentParagraph() |
Node* highestInlineNode = highestEnclosingNodeOfType(visibleStartOfParagraph.deepEquivalent(), isInline, CannotCrossEditingBoundary, enclosingBlockFlow); |
splitElement(toElement(enclosingNode), (highestInlineNode) ? highestInlineNode : visibleStartOfParagraph.deepEquivalent().deprecatedNode()); |
} |
- RefPtr<Node> placeholder = createBreakElement(document()); |
+ RefPtr<Node> placeholder = createBreakElement(&document()); |
insertNodeBefore(placeholder, splitBlockquoteNode); |
moveParagraph(startOfParagraph(visibleStartOfParagraph), endOfParagraph(visibleEndOfParagraph), positionBeforeNode(placeholder.get()), true); |
} |