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

Unified Diff: Source/core/editing/ApplyBlockElementCommand.cpp

Issue 299353004: Oilpan: move editing objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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: Source/core/editing/ApplyBlockElementCommand.cpp
diff --git a/Source/core/editing/ApplyBlockElementCommand.cpp b/Source/core/editing/ApplyBlockElementCommand.cpp
index 8467d47eb5034aceaf460169541d880aab429945..e9fe9955ef9ccac7e4b549e796a8de98695f7a76 100644
--- a/Source/core/editing/ApplyBlockElementCommand.cpp
+++ b/Source/core/editing/ApplyBlockElementCommand.cpp
@@ -111,15 +111,15 @@ void ApplyBlockElementCommand::formatSelection(const VisiblePosition& startOfSel
// and there's nothing to move.
Position start = startOfSelection.deepEquivalent().downstream();
if (isAtUnsplittableElement(start)) {
- RefPtr<Element> blockquote = createBlockElement();
+ RefPtrWillBeRawPtr<Element> blockquote = createBlockElement();
insertNodeAt(blockquote, start);
- RefPtr<Element> placeholder = createBreakElement(document());
+ RefPtrWillBeRawPtr<Element> placeholder = createBreakElement(document());
appendNode(placeholder, blockquote);
setEndingSelection(VisibleSelection(positionBeforeNode(placeholder.get()), DOWNSTREAM, endingSelection().isDirectional()));
return;
}
- RefPtr<Element> blockquoteForNextIndent;
+ RefPtrWillBeRawPtr<Element> blockquoteForNextIndent = nullptr;
VisiblePosition endOfCurrentParagraph = endOfParagraph(startOfSelection);
VisiblePosition endOfLastParagraph = endOfParagraph(endOfSelection);
VisiblePosition endAfterSelection = endOfParagraph(endOfLastParagraph.next());
@@ -280,9 +280,9 @@ VisiblePosition ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfN
return VisiblePosition(Position(text.get(), position.offsetInContainerNode() - 1));
}
-PassRefPtr<Element> ApplyBlockElementCommand::createBlockElement() const
+PassRefPtrWillBeRawPtr<Element> ApplyBlockElementCommand::createBlockElement() const
{
- RefPtr<Element> element = createHTMLElement(document(), m_tagName);
+ RefPtrWillBeRawPtr<Element> 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