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

Unified Diff: third_party/WebKit/Source/core/inspector/DOMPatchSupport.cpp

Issue 2610383002: Migrate WTF::Vector::append() to ::push_back() [part 8 of N] (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/inspector/DOMPatchSupport.cpp
diff --git a/third_party/WebKit/Source/core/inspector/DOMPatchSupport.cpp b/third_party/WebKit/Source/core/inspector/DOMPatchSupport.cpp
index 77210fcbc756294501be7f5d7a3eeddc62e2bb3d..508eb521a61c6b321d2fa71ec6e27afce4d061ad 100644
--- a/third_party/WebKit/Source/core/inspector/DOMPatchSupport.cpp
+++ b/third_party/WebKit/Source/core/inspector/DOMPatchSupport.cpp
@@ -135,14 +135,14 @@ Node* DOMPatchSupport::patchNode(Node* node,
HeapVector<Member<Digest>> oldList;
for (Node* child = parentNode->firstChild(); child;
child = child->nextSibling())
- oldList.append(createDigest(child, 0));
+ oldList.push_back(createDigest(child, 0));
// Compose the new list.
String markupCopy = markup.lower();
HeapVector<Member<Digest>> newList;
for (Node* child = parentNode->firstChild(); child != node;
child = child->nextSibling())
- newList.append(createDigest(child, 0));
+ newList.push_back(createDigest(child, 0));
for (Node* child = fragment->firstChild(); child;
child = child->nextSibling()) {
if (isHTMLHeadElement(*child) && !child->hasChildren() &&
@@ -155,10 +155,10 @@ Node* DOMPatchSupport::patchNode(Node* node,
// HTML5 parser inserts empty <body> tag whenever it parses </head>
continue;
}
- newList.append(createDigest(child, &m_unusedNodesMap));
+ newList.push_back(createDigest(child, &m_unusedNodesMap));
}
for (Node* child = node->nextSibling(); child; child = child->nextSibling())
- newList.append(createDigest(child, 0));
+ newList.push_back(createDigest(child, 0));
if (!innerPatchChildren(parentNode, oldList, newList, exceptionState)) {
// Fall back to total replace.
@@ -263,12 +263,12 @@ DOMPatchSupport::diff(const HeapVector<Member<Digest>>& oldList,
for (size_t i = 0; i < newList.size(); ++i) {
newTable.add(newList[i]->m_sha1, Vector<size_t>())
- .storedValue->value.append(i);
+ .storedValue->value.push_back(i);
}
for (size_t i = 0; i < oldList.size(); ++i) {
oldTable.add(oldList[i]->m_sha1, Vector<size_t>())
- .storedValue->value.append(i);
+ .storedValue->value.push_back(i);
}
for (auto& newIt : newTable) {
@@ -467,7 +467,7 @@ DOMPatchSupport::Digest* DOMPatchSupport::createDigest(
Digest* childInfo = createDigest(child, unusedNodesMap);
addStringToDigestor(digestor.get(), childInfo->m_sha1);
child = child->nextSibling();
- digest->m_children.append(childInfo);
+ digest->m_children.push_back(childInfo);
}
AttributeCollection attributes = element.attributesWithoutUpdate();
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698