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

Unified Diff: third_party/WebKit/Source/core/editing/commands/InsertTextCommand.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/InsertTextCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/InsertTextCommand.cpp b/third_party/WebKit/Source/core/editing/commands/InsertTextCommand.cpp
index 3b9d657023e972ce851798af665a6533abd6b79b..15b6c0973f4740a7fb1f36e814cb5f6a85f123de 100644
--- a/third_party/WebKit/Source/core/editing/commands/InsertTextCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/InsertTextCommand.cpp
@@ -48,7 +48,7 @@ Position InsertTextCommand::positionInsideTextNode(const Position& p)
{
Position pos = p;
if (isTabHTMLSpanElementTextNode(pos.anchorNode())) {
- RefPtrWillBeRawPtr<Text> textNode = document().createEditingTextNode("");
+ RawPtr<Text> textNode = document().createEditingTextNode("");
insertNodeAtTabSpanPosition(textNode.get(), pos);
return firstPositionInNode(textNode.get());
}
@@ -56,7 +56,7 @@ Position InsertTextCommand::positionInsideTextNode(const Position& p)
// Prepare for text input by looking at the specified position.
// It may be necessary to insert a text node to receive characters.
if (!pos.computeContainerNode()->isTextNode()) {
- RefPtrWillBeRawPtr<Text> textNode = document().createEditingTextNode("");
+ RawPtr<Text> textNode = document().createEditingTextNode("");
insertNodeAt(textNode.get(), pos);
return firstPositionInNode(textNode.get());
}
@@ -102,7 +102,7 @@ bool InsertTextCommand::performOverwrite(const String& text, bool selectInserted
Position start = endingSelection().start();
if (start.isNull() || !start.isOffsetInAnchor() || !start.computeContainerNode()->isTextNode())
return false;
- RefPtrWillBeRawPtr<Text> textNode = toText(start.computeContainerNode());
+ RawPtr<Text> textNode = toText(start.computeContainerNode());
if (!textNode)
return false;
@@ -198,7 +198,7 @@ void InsertTextCommand::doApply()
ASSERT(startPosition.computeContainerNode()->isTextNode());
if (placeholder.isNotNull())
removePlaceholderAt(placeholder);
- RefPtrWillBeRawPtr<Text> textNode = toText(startPosition.computeContainerNode());
+ RawPtr<Text> textNode = toText(startPosition.computeContainerNode());
const unsigned offset = startPosition.offsetInContainerNode();
insertTextIntoNode(textNode, offset, m_text);
@@ -220,7 +220,7 @@ void InsertTextCommand::doApply()
setEndingSelectionWithoutValidation(startPosition, endPosition);
// Handle the case where there is a typing style.
- if (RefPtrWillBeRawPtr<EditingStyle> typingStyle = document().frame()->selection().typingStyle()) {
+ if (RawPtr<EditingStyle> typingStyle = document().frame()->selection().typingStyle()) {
typingStyle->prepareToApplyAt(endPosition, EditingStyle::PreserveWritingDirection);
if (!typingStyle->isEmpty())
applyStyle(typingStyle.get());
@@ -241,19 +241,19 @@ Position InsertTextCommand::insertTab(const Position& pos)
// keep tabs coalesced in tab span
if (isTabHTMLSpanElementTextNode(node)) {
- RefPtrWillBeRawPtr<Text> textNode = toText(node);
+ RawPtr<Text> textNode = toText(node);
insertTextIntoNode(textNode, offset, "\t");
return Position(textNode.release(), offset + 1);
}
// create new tab span
- RefPtrWillBeRawPtr<HTMLSpanElement> spanElement = createTabSpanElement(document());
+ RawPtr<HTMLSpanElement> spanElement = createTabSpanElement(document());
// place it
if (!node->isTextNode()) {
insertNodeAt(spanElement.get(), insertPos);
} else {
- RefPtrWillBeRawPtr<Text> textNode = toText(node);
+ RawPtr<Text> textNode = toText(node);
if (offset >= textNode->length()) {
insertNodeAfter(spanElement, textNode.release());
} else {

Powered by Google App Engine
This is Rietveld 408576698