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

Unified Diff: third_party/WebKit/Source/core/html/HTMLSelectElement.cpp

Issue 2583233002: Migrate WTF::Vector::append() to ::push_back() [part 7 of N] (Closed)
Patch Set: 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/html/HTMLSelectElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp b/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
index dcd06dbfe0d008f7eb2c1745279827395099761d..0808d590f004be38821c66d466e7f21bf0f1dea8 100644
--- a/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
@@ -446,7 +446,7 @@ void HTMLSelectElement::setLength(unsigned newLen,
for (const auto& option : optionList()) {
if (optionIndex++ >= newLen) {
DCHECK(option->parentNode());
- itemsToRemove.append(option);
+ itemsToRemove.push_back(option);
}
}
@@ -579,8 +579,8 @@ void HTMLSelectElement::saveLastSelection() {
m_lastOnChangeSelection.clear();
for (auto& element : listItems())
- m_lastOnChangeSelection.append(isHTMLOptionElement(*element) &&
- toHTMLOptionElement(element)->selected());
+ m_lastOnChangeSelection.push_back(isHTMLOptionElement(*element) &&
+ toHTMLOptionElement(element)->selected());
}
void HTMLSelectElement::setActiveSelectionAnchor(HTMLOptionElement* option) {
@@ -602,7 +602,7 @@ void HTMLSelectElement::saveListboxActiveSelection() {
// updateListBoxSelection needs to clear selection of the fifth OPTION.
m_cachedStateForActiveSelection.resize(0);
for (const auto& option : optionList()) {
- m_cachedStateForActiveSelection.append(option->selected());
+ m_cachedStateForActiveSelection.push_back(option->selected());
}
}
@@ -772,7 +772,7 @@ void HTMLSelectElement::recalcListItems() const {
currentElement = ElementTraversal::nextSkippingChildren(current, this);
continue;
}
- m_listItems.append(&current);
+ m_listItems.push_back(&current);
if (Element* nextElement = ElementTraversal::firstWithin(current)) {
currentElement = nextElement;
continue;
@@ -780,10 +780,10 @@ void HTMLSelectElement::recalcListItems() const {
}
if (isHTMLOptionElement(current))
- m_listItems.append(&current);
+ m_listItems.push_back(&current);
if (isHTMLHRElement(current))
- m_listItems.append(&current);
+ m_listItems.push_back(&current);
// In conforming HTML code, only <optgroup> and <option> will be found
// within a <select>. We call NodeTraversal::nextSkippingChildren so
@@ -2013,10 +2013,10 @@ HTMLSelectElement::PopupUpdater::PopupUpdater(HTMLSelectElement& select)
Vector<String> filter;
filter.reserveCapacity(4);
// Observe only attributes which affect popup content.
- filter.append(String("disabled"));
- filter.append(String("label"));
- filter.append(String("selected"));
- filter.append(String("value"));
+ filter.push_back(String("disabled"));
+ filter.push_back(String("label"));
+ filter.push_back(String("selected"));
+ filter.push_back(String("value"));
MutationObserverInit init;
init.setAttributeOldValue(true);
init.setAttributes(true);
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLSlotElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698