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

Unified Diff: Source/core/editing/ReplaceSelectionCommand.h

Issue 299353004: Oilpan: move editing objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make test wrapper class finalized 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
« no previous file with comments | « Source/core/editing/ReplaceNodeWithSpanCommand.cpp ('k') | Source/core/editing/ReplaceSelectionCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/ReplaceSelectionCommand.h
diff --git a/Source/core/editing/ReplaceSelectionCommand.h b/Source/core/editing/ReplaceSelectionCommand.h
index 070b0090e9e03f7168f584c007e996790248903a..a45675295c7c6e88690dbb249f551085a07a769a 100644
--- a/Source/core/editing/ReplaceSelectionCommand.h
+++ b/Source/core/editing/ReplaceSelectionCommand.h
@@ -47,11 +47,13 @@ public:
typedef unsigned CommandOptions;
- static PassRefPtr<ReplaceSelectionCommand> create(Document& document, PassRefPtrWillBeRawPtr<DocumentFragment> fragment, CommandOptions options, EditAction action = EditActionPaste)
+ static PassRefPtrWillBeRawPtr<ReplaceSelectionCommand> create(Document& document, PassRefPtrWillBeRawPtr<DocumentFragment> fragment, CommandOptions options, EditAction action = EditActionPaste)
{
- return adoptRef(new ReplaceSelectionCommand(document, fragment, options, action));
+ return adoptRefWillBeNoop(new ReplaceSelectionCommand(document, fragment, options, action));
}
+ virtual void trace(Visitor*) OVERRIDE;
+
private:
ReplaceSelectionCommand(Document&, PassRefPtrWillBeRawPtr<DocumentFragment>, CommandOptions, EditAction);
@@ -59,6 +61,7 @@ private:
virtual EditAction editingAction() const OVERRIDE;
class InsertedNodes {
+ STACK_ALLOCATED();
public:
void respondToNodeInsertion(Node&);
void willRemoveNodePreservingChildren(Node&);
@@ -70,8 +73,8 @@ private:
Node* pastLastLeaf() const { return m_lastNodeInserted ? NodeTraversal::next(m_lastNodeInserted->lastDescendantOrSelf()) : 0; }
private:
- RefPtr<Node> m_firstNodeInserted;
- RefPtr<Node> m_lastNodeInserted;
+ RefPtrWillBeMember<Node> m_firstNodeInserted;
+ RefPtrWillBeMember<Node> m_lastNodeInserted;
};
Node* insertAsListItems(PassRefPtrWillBeRawPtr<HTMLElement> listElement, Node* insertionNode, const Position&, InsertedNodes&);
@@ -89,7 +92,7 @@ private:
void removeRedundantStylesAndKeepStyleSpanInline(InsertedNodes&);
void makeInsertedContentRoundTrippableWithHTMLTreeBuilder(const InsertedNodes&);
- void moveNodeOutOfAncestor(PassRefPtr<Node>, PassRefPtr<Node> ancestor);
+ void moveNodeOutOfAncestor(PassRefPtrWillBeRawPtr<Node>, PassRefPtrWillBeRawPtr<Node> ancestor);
void handleStyleSpans(InsertedNodes&);
VisiblePosition positionAtStartOfInsertedContent() const;
@@ -104,11 +107,11 @@ private:
Position m_startOfInsertedContent;
Position m_endOfInsertedContent;
- RefPtr<EditingStyle> m_insertionStyle;
+ RefPtrWillBeMember<EditingStyle> m_insertionStyle;
bool m_selectReplacement;
bool m_smartReplace;
bool m_matchStyle;
- RefPtrWillBePersistent<DocumentFragment> m_documentFragment;
+ RefPtrWillBeMember<DocumentFragment> m_documentFragment;
bool m_preventNesting;
bool m_movingParagraph;
EditAction m_editAction;
« no previous file with comments | « Source/core/editing/ReplaceNodeWithSpanCommand.cpp ('k') | Source/core/editing/ReplaceSelectionCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698