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

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, 10 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 83c7d0f9fbc7bbab4bbf402aeb018a184219f756..328fa8bbbe5fc9a363410c530c35816d893491b9 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()
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);
@@ -111,15 +111,15 @@ 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);
- RefPtrWillBeRawPtr<HTMLBRElement> placeholder = HTMLBRElement::create(document());
+ RawPtr<HTMLBRElement> placeholder = HTMLBRElement::create(document());
appendNode(placeholder, blockquote);
setEndingSelection(VisibleSelection(positionBeforeNode(placeholder.get()), TextAffinity::Downstream, endingSelection().isDirectional()));
return;
}
- RefPtrWillBeRawPtr<HTMLElement> blockquoteForNextIndent = nullptr;
+ RawPtr<HTMLElement> blockquoteForNextIndent = nullptr;
VisiblePosition endOfCurrentParagraph = endOfParagraph(startOfSelection);
VisiblePosition endOfLastParagraph = endOfParagraph(endOfSelection);
VisiblePosition endAfterSelection = endOfParagraph(nextPositionOf(endOfLastParagraph));
@@ -231,7 +231,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());
@@ -254,7 +254,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;
@@ -285,9 +285,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