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

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

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/SimplifyMarkupCommand.h ('k') | Source/core/editing/SpellCheckRequester.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/SimplifyMarkupCommand.cpp
diff --git a/Source/core/editing/SimplifyMarkupCommand.cpp b/Source/core/editing/SimplifyMarkupCommand.cpp
index 70133d6a15167c74e3f48e377071e48bd4e96d1c..089d3290abae059444540f4e5fb990d154c0f344 100644
--- a/Source/core/editing/SimplifyMarkupCommand.cpp
+++ b/Source/core/editing/SimplifyMarkupCommand.cpp
@@ -42,7 +42,7 @@ SimplifyMarkupCommand::SimplifyMarkupCommand(Document& document, Node* firstNode
void SimplifyMarkupCommand::doApply()
{
Node* rootNode = m_firstNode->parentNode();
- Vector<RefPtr<Node> > nodesToRemove;
+ WillBeHeapVector<RefPtrWillBeMember<Node> > nodesToRemove;
// Walk through the inserted nodes, to see if there are elements that could be removed
// without affecting the style. The goal is to produce leaner markup even when starting
@@ -98,7 +98,7 @@ void SimplifyMarkupCommand::doApply()
}
}
-int SimplifyMarkupCommand::pruneSubsequentAncestorsToRemove(Vector<RefPtr<Node> >& nodesToRemove, size_t startNodeIndex)
+int SimplifyMarkupCommand::pruneSubsequentAncestorsToRemove(WillBeHeapVector<RefPtrWillBeMember<Node> >& nodesToRemove, size_t startNodeIndex)
{
size_t pastLastNodeToRemove = startNodeIndex + 1;
for (; pastLastNodeToRemove < nodesToRemove.size(); ++pastLastNodeToRemove) {
@@ -108,7 +108,7 @@ int SimplifyMarkupCommand::pruneSubsequentAncestorsToRemove(Vector<RefPtr<Node>
}
Node* highestAncestorToRemove = nodesToRemove[pastLastNodeToRemove - 1].get();
- RefPtr<ContainerNode> parent = highestAncestorToRemove->parentNode();
+ RefPtrWillBeRawPtr<ContainerNode> parent = highestAncestorToRemove->parentNode();
if (!parent) // Parent has already been removed.
return -1;
@@ -122,4 +122,11 @@ int SimplifyMarkupCommand::pruneSubsequentAncestorsToRemove(Vector<RefPtr<Node>
return pastLastNodeToRemove - startNodeIndex - 1;
}
+void SimplifyMarkupCommand::trace(Visitor* visitor)
+{
+ visitor->trace(m_firstNode);
+ visitor->trace(m_nodeAfterLast);
+ CompositeEditCommand::trace(visitor);
+}
+
} // namespace WebCore
« no previous file with comments | « Source/core/editing/SimplifyMarkupCommand.h ('k') | Source/core/editing/SpellCheckRequester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698