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

Unified Diff: third_party/WebKit/Source/core/dom/TreeScope.cpp

Issue 2574773002: Migrate WTF::Vector::append() to ::push_back() [part 4 of N] (Closed)
Patch Set: rebase Created 4 years 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/dom/TreeScope.cpp
diff --git a/third_party/WebKit/Source/core/dom/TreeScope.cpp b/third_party/WebKit/Source/core/dom/TreeScope.cpp
index 50ca8a1d90987c19db8982a24d8d9e551acef7e3..aad09a602220767557321f7afd69b671e26a09ea 100644
--- a/third_party/WebKit/Source/core/dom/TreeScope.cpp
+++ b/third_party/WebKit/Source/core/dom/TreeScope.cpp
@@ -308,7 +308,7 @@ HeapVector<Member<Element>> TreeScope::elementsFromHitTestResult(
continue;
if (node && node->isElementNode()) {
- elements.append(toElement(node));
+ elements.push_back(toElement(node));
lastNode = node;
}
}
@@ -316,7 +316,7 @@ HeapVector<Member<Element>> TreeScope::elementsFromHitTestResult(
if (rootNode().isDocumentNode()) {
if (Element* rootElement = toDocument(rootNode()).documentElement()) {
if (elements.isEmpty() || elements.back() != rootElement)
- elements.append(rootElement);
+ elements.push_back(rootElement);
}
}
@@ -448,9 +448,9 @@ unsigned short TreeScope::comparePosition(const TreeScope& otherScope) const {
HeapVector<Member<const TreeScope>, 16> chain2;
const TreeScope* current;
for (current = this; current; current = current->parentTreeScope())
- chain1.append(current);
+ chain1.push_back(current);
for (current = &otherScope; current; current = current->parentTreeScope())
- chain2.append(current);
+ chain2.push_back(current);
unsigned index1 = chain1.size();
unsigned index2 = chain2.size();
@@ -492,11 +492,11 @@ const TreeScope* TreeScope::commonAncestorTreeScope(
const TreeScope& other) const {
HeapVector<Member<const TreeScope>, 16> thisChain;
for (const TreeScope* tree = this; tree; tree = tree->parentTreeScope())
- thisChain.append(tree);
+ thisChain.push_back(tree);
HeapVector<Member<const TreeScope>, 16> otherChain;
for (const TreeScope* tree = &other; tree; tree = tree->parentTreeScope())
- otherChain.append(tree);
+ otherChain.push_back(tree);
// Keep popping out the last elements of these chains until a mismatched pair
// is found. If |this| and |other| belong to different documents, null will be
« no previous file with comments | « third_party/WebKit/Source/core/dom/TouchList.h ('k') | third_party/WebKit/Source/core/dom/URLSearchParams.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698