Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(973)

Unified Diff: third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp b/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
index c2419e12febf4e40b46d6ba4844414afbd300fad..3fa92285b7daa05fcc46c3bf3736ef167821a819 100644
--- a/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
@@ -85,9 +85,9 @@ void ApplyBlockElementCommand::doApply(EditingState* editingState)
VisiblePosition endOfSelection = selection.visibleEnd();
ASSERT(!startOfSelection.isNull());
ASSERT(!endOfSelection.isNull());
- RefPtrWillBeRawPtr<ContainerNode> startScope = nullptr;
+ RawPtr<ContainerNode> startScope = nullptr;
int startIndex = indexForVisiblePosition(startOfSelection, startScope);
- RefPtrWillBeRawPtr<ContainerNode> endScope = nullptr;
+ RawPtr<ContainerNode> endScope = nullptr;
int endIndex = indexForVisiblePosition(endOfSelection, endScope);
formatSelection(startOfSelection, endOfSelection, editingState);
@@ -113,11 +113,11 @@ void ApplyBlockElementCommand::formatSelection(const VisiblePosition& startOfSel
// and there's nothing to move.
Position start = mostForwardCaretPosition(startOfSelection.deepEquivalent());
if (isAtUnsplittableElement(start)) {
- RefPtrWillBeRawPtr<HTMLElement> blockquote = createBlockElement();
+ RawPtr<HTMLElement> blockquote = createBlockElement();
insertNodeAt(blockquote, start, editingState);
if (editingState->isAborted())
return;
- RefPtrWillBeRawPtr<HTMLBRElement> placeholder = HTMLBRElement::create(document());
+ RawPtr<HTMLBRElement> placeholder = HTMLBRElement::create(document());
appendNode(placeholder, blockquote, editingState);
if (editingState->isAborted())
return;
@@ -125,7 +125,7 @@ void ApplyBlockElementCommand::formatSelection(const VisiblePosition& startOfSel
return;
}
- RefPtrWillBeRawPtr<HTMLElement> blockquoteForNextIndent = nullptr;
+ RawPtr<HTMLElement> blockquoteForNextIndent = nullptr;
VisiblePosition endOfCurrentParagraph = endOfParagraph(startOfSelection);
VisiblePosition endOfLastParagraph = endOfParagraph(endOfSelection);
VisiblePosition endAfterSelection = endOfParagraph(nextPositionOf(endOfLastParagraph));
@@ -239,7 +239,7 @@ void ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded(const
// If end is in the middle of a text node, split.
if (endStyle->userModify() != READ_ONLY && !endStyle->collapseWhiteSpace() && end.offsetInContainerNode() && end.offsetInContainerNode() < end.computeContainerNode()->maxCharacterOffset()) {
- RefPtrWillBeRawPtr<Text> endContainer = toText(end.computeContainerNode());
+ RawPtr<Text> endContainer = toText(end.computeContainerNode());
splitTextNode(endContainer, end.offsetInContainerNode());
if (isStartAndEndOnSameNode)
start = firstPositionInOrBeforeNode(endContainer->previousSibling());
@@ -262,7 +262,7 @@ VisiblePosition ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfN
if (!style)
return endOfNextParagraph;
- RefPtrWillBeRawPtr<Text> text = toText(position.computeContainerNode());
+ RawPtr<Text> text = toText(position.computeContainerNode());
if (!style->preserveNewline() || !position.offsetInContainerNode() || !isNewLineAtPosition(firstPositionInNode(text.get())))
return endOfNextParagraph;
@@ -293,9 +293,9 @@ VisiblePosition ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfN
return createVisiblePosition(Position(text.get(), position.offsetInContainerNode() - 1));
}
-PassRefPtrWillBeRawPtr<HTMLElement> ApplyBlockElementCommand::createBlockElement() const
+RawPtr<HTMLElement> ApplyBlockElementCommand::createBlockElement() const
{
- RefPtrWillBeRawPtr<HTMLElement> element = createHTMLElement(document(), m_tagName);
+ RawPtr<HTMLElement> element = createHTMLElement(document(), m_tagName);
if (m_inlineStyle.length())
element->setAttribute(styleAttr, m_inlineStyle);
return element.release();

Powered by Google App Engine
This is Rietveld 408576698