| Index: Source/core/editing/IndentOutdentCommand.cpp
|
| diff --git a/Source/core/editing/IndentOutdentCommand.cpp b/Source/core/editing/IndentOutdentCommand.cpp
|
| index 3df05003cb3b2196cf6ae4c97585231da7ac8a77..93c73e1de5eabb7dde93f95fb1b8aaf69c878bd5 100644
|
| --- a/Source/core/editing/IndentOutdentCommand.cpp
|
| +++ b/Source/core/editing/IndentOutdentCommand.cpp
|
| @@ -53,21 +53,21 @@ IndentOutdentCommand::IndentOutdentCommand(Document& document, EIndentType typeO
|
| bool IndentOutdentCommand::tryIndentingAsListItem(const Position& start, const Position& end)
|
| {
|
| // If our selection is not inside a list, bail out.
|
| - RefPtr<Node> lastNodeInSelectedParagraph = start.deprecatedNode();
|
| - RefPtr<Element> listNode = enclosingList(lastNodeInSelectedParagraph.get());
|
| + RefPtrWillBeRawPtr<Node> lastNodeInSelectedParagraph = start.deprecatedNode();
|
| + RefPtrWillBeRawPtr<Element> listNode = enclosingList(lastNodeInSelectedParagraph.get());
|
| if (!listNode)
|
| return false;
|
|
|
| // Find the block that we want to indent. If it's not a list item (e.g., a div inside a list item), we bail out.
|
| - RefPtr<Element> selectedListItem = enclosingBlock(lastNodeInSelectedParagraph.get());
|
| + RefPtrWillBeRawPtr<Element> selectedListItem = enclosingBlock(lastNodeInSelectedParagraph.get());
|
|
|
| // FIXME: we need to deal with the case where there is no li (malformed HTML)
|
| if (!isHTMLLIElement(*selectedListItem))
|
| return false;
|
|
|
| // FIXME: previousElementSibling does not ignore non-rendered content like <span></span>. Should we?
|
| - RefPtr<Element> previousList = ElementTraversal::previousSibling(*selectedListItem);
|
| - RefPtr<Element> nextList = ElementTraversal::nextSibling(*selectedListItem);
|
| + RefPtrWillBeRawPtr<Element> previousList = ElementTraversal::previousSibling(*selectedListItem);
|
| + RefPtrWillBeRawPtr<Element> nextList = ElementTraversal::nextSibling(*selectedListItem);
|
|
|
| // We should calculate visible range in list item because inserting new
|
| // list element will change visibility of list item, e.g. :first-child
|
| @@ -93,7 +93,7 @@ bool IndentOutdentCommand::tryIndentingAsListItem(const Position& start, const P
|
| return true;
|
| }
|
|
|
| -void IndentOutdentCommand::indentIntoBlockquote(const Position& start, const Position& end, RefPtr<Element>& targetBlockquote)
|
| +void IndentOutdentCommand::indentIntoBlockquote(const Position& start, const Position& end, RefPtrWillBeRawPtr<Element>& targetBlockquote)
|
| {
|
| Node* enclosingCell = enclosingNodeOfType(start, &isTableCell);
|
| Node* nodeToSplitTo;
|
| @@ -107,7 +107,7 @@ void IndentOutdentCommand::indentIntoBlockquote(const Position& start, const Pos
|
| if (!nodeToSplitTo)
|
| return;
|
|
|
| - RefPtr<Node> outerBlock = (start.containerNode() == nodeToSplitTo) ? start.containerNode() : splitTreeToNode(start.containerNode(), nodeToSplitTo);
|
| + RefPtrWillBeRawPtr<Node> outerBlock = (start.containerNode() == nodeToSplitTo) ? start.containerNode() : splitTreeToNode(start.containerNode(), nodeToSplitTo).get();
|
|
|
| VisiblePosition startOfContents(start);
|
| if (!targetBlockquote) {
|
| @@ -177,7 +177,7 @@ void IndentOutdentCommand::outdentParagraph()
|
| return;
|
| }
|
| Node* enclosingBlockFlow = enclosingBlock(visibleStartOfParagraph.deepEquivalent().deprecatedNode());
|
| - RefPtr<Node> splitBlockquoteNode = enclosingNode;
|
| + RefPtrWillBeRawPtr<Node> splitBlockquoteNode = enclosingNode;
|
| if (enclosingBlockFlow != enclosingNode)
|
| splitBlockquoteNode = splitTreeToNode(enclosingBlockFlow, enclosingNode, true);
|
| else {
|
| @@ -185,7 +185,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());
|
| + RefPtrWillBeRawPtr<Node> placeholder = createBreakElement(document());
|
| insertNodeBefore(placeholder, splitBlockquoteNode);
|
| moveParagraph(startOfParagraph(visibleStartOfParagraph), endOfParagraph(visibleEndOfParagraph), VisiblePosition(positionBeforeNode(placeholder.get())), true);
|
| }
|
| @@ -235,7 +235,7 @@ void IndentOutdentCommand::formatSelection(const VisiblePosition& startOfSelecti
|
| outdentRegion(startOfSelection, endOfSelection);
|
| }
|
|
|
| -void IndentOutdentCommand::formatRange(const Position& start, const Position& end, const Position&, RefPtr<Element>& blockquoteForNextIndent)
|
| +void IndentOutdentCommand::formatRange(const Position& start, const Position& end, const Position&, RefPtrWillBeRawPtr<Element>& blockquoteForNextIndent)
|
| {
|
| if (tryIndentingAsListItem(start, end))
|
| blockquoteForNextIndent = nullptr;
|
|
|