| Index: third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp b/third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp
|
| index 1192c3f47c8f3eaa3b4396c400d0106a7185dc30..15ef8c2b7a7b15a0a89f63eff0d9b7c614d74207 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp
|
| @@ -462,6 +462,13 @@ void HTMLFormControlElement::setNeedsWillValidateCheck()
|
| return;
|
| m_willValidateInitialized = true;
|
| m_willValidate = newWillValidate;
|
| + // Needs to force setNeedsValidityCheck() to invalidate validity state of
|
| + // FORM/FIELDSET. If this element updates willValidate twice and
|
| + // isValidElement() is not called between them, the second call of this
|
| + // function still has m_validityIsDirty==true, which means
|
| + // setNeedsValidityCheck() doesn't invalidate validity state of
|
| + // FORM/FIELDSET.
|
| + m_validityIsDirty = false;
|
| setNeedsValidityCheck();
|
| // No need to trigger style recalculation here because
|
| // setNeedsValidityCheck() does it in the right away. This relies on
|
| @@ -531,6 +538,8 @@ ValidationMessageClient* HTMLFormControlElement::validationMessageClient() const
|
|
|
| bool HTMLFormControlElement::checkValidity(HeapVector<Member<HTMLFormControlElement>>* unhandledInvalidControls, CheckValidityEventBehavior eventBehavior)
|
| {
|
| + if (!willValidate())
|
| + return true;
|
| if (isValidElement())
|
| return true;
|
| if (eventBehavior != CheckValidityDispatchInvalidEvent)
|
|
|