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

Unified Diff: third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp

Issue 2617783002: Migrate WTF::Vector::append() to ::push_back() [part 12 of N] (Closed)
Patch Set: rebase Created 3 years, 11 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/CompositeEditCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
index 653e52edca07d847599914e697e1ad916db88f7b..244af9b18523595cd0f673b34e8687372f453327 100644
--- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
@@ -327,7 +327,7 @@ void CompositeEditCommand::appendCommandToComposite(
ensureComposition()->append(command->ensureComposition());
command->m_composition = nullptr;
command->setParent(this);
- m_commands.append(command);
+ m_commands.push_back(command);
}
void CompositeEditCommand::applyStyle(const EditingStyle* style,
@@ -476,7 +476,7 @@ void CompositeEditCommand::removeChildrenInRange(Node* node,
HeapVector<Member<Node>> children;
Node* child = NodeTraversal::childAt(*node, from);
for (unsigned i = from; child && i < to; i++, child = child->nextSibling())
- children.append(child);
+ children.push_back(child);
size_t size = children.size();
for (size_t i = 0; i < size; ++i) {
@@ -528,7 +528,7 @@ void CompositeEditCommand::moveRemainingSiblingsToNewParent(
NodeVector nodesToRemove;
for (; node && node != pastLastNodeToMove; node = node->nextSibling())
- nodesToRemove.append(node);
+ nodesToRemove.push_back(node);
for (unsigned i = 0; i < nodesToRemove.size(); i++) {
removeNode(nodesToRemove[i], editingState);
@@ -677,8 +677,8 @@ static void copyMarkerTypesAndDescriptions(
types.reserveCapacity(arraySize);
descriptions.reserveCapacity(arraySize);
for (const auto& markerPointer : markerPointers) {
- types.append(markerPointer->type());
- descriptions.append(markerPointer->description());
+ types.push_back(markerPointer->type());
+ descriptions.push_back(markerPointer->description());
}
}
@@ -973,7 +973,7 @@ void CompositeEditCommand::deleteInsignificantText(Text* textNode,
for (InlineTextBox* textBox = textLayoutObject->firstTextBox(); textBox;
textBox = textBox->nextTextBox())
- sortedTextBoxes.append(textBox);
+ sortedTextBoxes.push_back(textBox);
// If there is mixed directionality text, the boxes can be out of order,
// (like Arabic with embedded LTR), so sort them first.
@@ -1053,7 +1053,7 @@ void CompositeEditCommand::deleteInsignificantText(const Position& start,
HeapVector<Member<Text>> nodes;
for (Node& node : NodeTraversal::startsAt(*start.anchorNode())) {
if (node.isTextNode())
- nodes.append(toText(&node));
+ nodes.push_back(toText(&node));
if (&node == end.anchorNode())
break;
}
@@ -1304,7 +1304,7 @@ void CompositeEditCommand::cloneParagraphUnderNewElement(
NodeTraversal::inclusiveAncestorsOf(*start.anchorNode())) {
if (runner == outerNode)
break;
- ancestors.append(runner);
+ ancestors.push_back(runner);
}
// Clone every node between start.anchorNode() and outerBlock.

Powered by Google App Engine
This is Rietveld 408576698