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

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

Issue 2470233009: WTF/std normalization: replace WTF::Vector::first() with ::front() (Closed)
Patch Set: rebase Created 4 years, 1 month 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/HTMLFormElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLFormElement.cpp b/third_party/WebKit/Source/core/html/HTMLFormElement.cpp
index 746f318784c9fbb967c94848593369c6cba6ce64..d6f912c5ded442cbe52e4299353adcdd2bd017fe 100644
--- a/third_party/WebKit/Source/core/html/HTMLFormElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLFormElement.cpp
@@ -740,8 +740,8 @@ void HTMLFormElement::getNamedElements(
elements()->namedItems(name, namedItems);
Element* elementFromPast = elementFromPastNamesMap(name);
- if (namedItems.size() && namedItems.first() != elementFromPast) {
- addToPastNamesMap(namedItems.first().get(), name);
+ if (namedItems.size() && namedItems.front() != elementFromPast) {
+ addToPastNamesMap(namedItems.front().get(), name);
} else if (elementFromPast && namedItems.isEmpty()) {
namedItems.append(elementFromPast);
UseCounter::count(document(), UseCounter::FormNameAccessForPastNamesMap);
@@ -784,7 +784,7 @@ void HTMLFormElement::anonymousNamedGetter(
DCHECK(!elements.isEmpty());
bool onlyMatchImg =
- !elements.isEmpty() && isHTMLImageElement(*elements.first());
+ !elements.isEmpty() && isHTMLImageElement(*elements.front());
if (onlyMatchImg) {
UseCounter::count(document(), UseCounter::FormNameAccessForImageElement);
// The following code has performance impact, but it should be small
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLCollection.cpp ('k') | third_party/WebKit/Source/core/html/HTMLSlotElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698