Index: Source/core/html/HTMLFormControlElement.cpp |
diff --git a/Source/core/html/HTMLFormControlElement.cpp b/Source/core/html/HTMLFormControlElement.cpp |
index 3526e51947edbc61ba26f5b8826b2fe9d2bd844c..3e00ea14785dac1f90e5f43cb3a5300a158c9d50 100644 |
--- a/Source/core/html/HTMLFormControlElement.cpp |
+++ b/Source/core/html/HTMLFormControlElement.cpp |
@@ -486,10 +486,13 @@ ValidationMessageClient* HTMLFormControlElement::validationMessageClient() const |
return &page->validationMessageClient(); |
} |
-bool HTMLFormControlElement::checkValidity(WillBeHeapVector<RefPtrWillBeMember<FormAssociatedElement> >* unhandledInvalidControls) |
+bool HTMLFormControlElement::checkValidity(WillBeHeapVector<RefPtrWillBeMember<FormAssociatedElement> >* unhandledInvalidControls, DispatchInvalidEvent dispatchInvalidEvent) |
{ |
if (!willValidate() || isValidElement()) |
return true; |
+ ASSERT(dispatchInvalidEvent != DispatchInvalidEventUnknown); |
+ if (dispatchInvalidEvent != DispatchInvalidEventEnabled) |
+ return false; |
// An event handler can deref this object. |
RefPtrWillBeRawPtr<HTMLFormControlElement> protector(this); |
RefPtrWillBeRawPtr<Document> originalDocument(document()); |