| 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
|
|
|