| 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 978394019ed30490d4b3ac1942c8f025ae5db17c..001143f978f03eb6431ed56afae46f5464e279cc 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLFormElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLFormElement.cpp
|
| @@ -673,18 +673,16 @@ bool HTMLFormElement::wasUserSubmitted() const
|
| return m_wasUserSubmitted;
|
| }
|
|
|
| -HTMLFormControlElement* HTMLFormElement::defaultButton() const
|
| +HTMLFormControlElement* HTMLFormElement::findDefaultButton() const
|
| {
|
| - const FormAssociatedElement::List& elements = associatedElements();
|
| - for (unsigned i = 0; i < elements.size(); ++i) {
|
| - if (!elements[i]->isFormControlElement())
|
| + for (const auto& element : associatedElements()) {
|
| + if (!element->isFormControlElement())
|
| continue;
|
| - HTMLFormControlElement* control = toHTMLFormControlElement(elements[i]);
|
| + HTMLFormControlElement* control = toHTMLFormControlElement(element);
|
| if (control->canBeSuccessfulSubmitButton())
|
| return control;
|
| }
|
| -
|
| - return 0;
|
| + return nullptr;
|
| }
|
|
|
| bool HTMLFormElement::checkValidity()
|
|
|