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

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

Issue 435733002: Have getChildNodes() take a ContainerNode in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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/WrapContentsInDummySpanCommand.cpp
diff --git a/Source/core/editing/WrapContentsInDummySpanCommand.cpp b/Source/core/editing/WrapContentsInDummySpanCommand.cpp
index 25e8d3e2c31a732ef6df86c48b68ffdda07ac7ff..2a9f803b44a7a758a422c5bfc563c97e3968008e 100644
--- a/Source/core/editing/WrapContentsInDummySpanCommand.cpp
+++ b/Source/core/editing/WrapContentsInDummySpanCommand.cpp
@@ -41,9 +41,8 @@ WrapContentsInDummySpanCommand::WrapContentsInDummySpanCommand(PassRefPtrWillBeR
void WrapContentsInDummySpanCommand::executeApply()
{
- WillBeHeapVector<RefPtrWillBeMember<Node> > children;
- for (Node* child = m_element->firstChild(); child; child = child->nextSibling())
- children.append(child);
+ NodeVector children;
+ getChildNodes(*m_element, children);
size_t size = children.size();
for (size_t i = 0; i < size; ++i)
@@ -66,9 +65,8 @@ void WrapContentsInDummySpanCommand::doUnapply()
if (!m_dummySpan || !m_element->hasEditableStyle())
return;
- WillBeHeapVector<RefPtrWillBeMember<Node> > children;
- for (Node* child = m_dummySpan->firstChild(); child; child = child->nextSibling())
- children.append(child);
+ NodeVector children;
+ getChildNodes(*m_dummySpan, children);
size_t size = children.size();
for (size_t i = 0; i < size; ++i)
« Source/core/editing/ApplyStyleCommand.cpp ('K') | « Source/core/editing/SplitElementCommand.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698