| Index: third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp b/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp
|
| index 81bfee7ec956e5f6ade92506ad52dfededea1f9d..8f389015b3e318c3d00a143178a432befef0a886 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp
|
| @@ -69,26 +69,26 @@ 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.
|
| - RefPtrWillBeRawPtr<Node> lastNodeInSelectedParagraph = start.anchorNode();
|
| - RefPtrWillBeRawPtr<HTMLElement> listElement = enclosingList(lastNodeInSelectedParagraph.get());
|
| + RawPtr<Node> lastNodeInSelectedParagraph = start.anchorNode();
|
| + RawPtr<HTMLElement> listElement = enclosingList(lastNodeInSelectedParagraph.get());
|
| if (!listElement)
|
| 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.
|
| - RefPtrWillBeRawPtr<Element> selectedListItem = enclosingBlock(lastNodeInSelectedParagraph.get());
|
| + RawPtr<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?
|
| - RefPtrWillBeRawPtr<Element> previousList = ElementTraversal::previousSibling(*selectedListItem);
|
| - RefPtrWillBeRawPtr<Element> nextList = ElementTraversal::nextSibling(*selectedListItem);
|
| + RawPtr<Element> previousList = ElementTraversal::previousSibling(*selectedListItem);
|
| + RawPtr<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
|
| // CSS selector.
|
| - RefPtrWillBeRawPtr<HTMLElement> newList = toHTMLElement(document().createElement(listElement->tagQName(), false).get());
|
| + RawPtr<HTMLElement> newList = toHTMLElement(document().createElement(listElement->tagQName(), false).get());
|
| insertNodeBefore(newList, selectedListItem.get());
|
|
|
| // We should clone all the children of the list item for indenting purposes. However, in case the current
|
| @@ -109,7 +109,7 @@ bool IndentOutdentCommand::tryIndentingAsListItem(const Position& start, const P
|
| return true;
|
| }
|
|
|
| -void IndentOutdentCommand::indentIntoBlockquote(const Position& start, const Position& end, RefPtrWillBeRawPtr<HTMLElement>& targetBlockquote)
|
| +void IndentOutdentCommand::indentIntoBlockquote(const Position& start, const Position& end, RawPtr<HTMLElement>& targetBlockquote)
|
| {
|
| Element* enclosingCell = toElement(enclosingNodeOfType(start, &isTableCell));
|
| Element* elementToSplitTo;
|
| @@ -123,7 +123,7 @@ void IndentOutdentCommand::indentIntoBlockquote(const Position& start, const Pos
|
| if (!elementToSplitTo)
|
| return;
|
|
|
| - RefPtrWillBeRawPtr<Node> outerBlock = (start.computeContainerNode() == elementToSplitTo) ? start.computeContainerNode() : splitTreeToNode(start.computeContainerNode(), elementToSplitTo).get();
|
| + RawPtr<Node> outerBlock = (start.computeContainerNode() == elementToSplitTo) ? start.computeContainerNode() : splitTreeToNode(start.computeContainerNode(), elementToSplitTo).get();
|
|
|
| VisiblePosition startOfContents = createVisiblePosition(start);
|
| if (!targetBlockquote) {
|
| @@ -195,7 +195,7 @@ void IndentOutdentCommand::outdentParagraph()
|
|
|
| return;
|
| }
|
| - RefPtrWillBeRawPtr<Node> splitBlockquoteNode = enclosingElement;
|
| + RawPtr<Node> splitBlockquoteNode = enclosingElement;
|
| if (Element* enclosingBlockFlow = enclosingBlock(visibleStartOfParagraph.deepEquivalent().anchorNode())) {
|
| if (enclosingBlockFlow != enclosingElement) {
|
| splitBlockquoteNode = splitTreeToNode(enclosingBlockFlow, enclosingElement, true);
|
| @@ -209,7 +209,7 @@ void IndentOutdentCommand::outdentParagraph()
|
| VisiblePosition endOfParagraphToMove = endOfParagraph(visibleEndOfParagraph);
|
| if (startOfParagraphToMove.isNull() || endOfParagraphToMove.isNull())
|
| return;
|
| - RefPtrWillBeRawPtr<HTMLBRElement> placeholder = HTMLBRElement::create(document());
|
| + RawPtr<HTMLBRElement> placeholder = HTMLBRElement::create(document());
|
| insertNodeBefore(placeholder, splitBlockquoteNode);
|
| moveParagraph(startOfParagraphToMove, endOfParagraphToMove, createVisiblePosition(positionBeforeNode(placeholder.get())), true);
|
| }
|
| @@ -259,7 +259,7 @@ void IndentOutdentCommand::formatSelection(const VisiblePosition& startOfSelecti
|
| outdentRegion(startOfSelection, endOfSelection);
|
| }
|
|
|
| -void IndentOutdentCommand::formatRange(const Position& start, const Position& end, const Position&, RefPtrWillBeRawPtr<HTMLElement>& blockquoteForNextIndent)
|
| +void IndentOutdentCommand::formatRange(const Position& start, const Position& end, const Position&, RawPtr<HTMLElement>& blockquoteForNextIndent)
|
| {
|
| if (tryIndentingAsListItem(start, end))
|
| blockquoteForNextIndent = nullptr;
|
|
|