Index: Source/core/html/HTMLFormControlElement.h |
diff --git a/Source/core/html/HTMLFormControlElement.h b/Source/core/html/HTMLFormControlElement.h |
index 5a7d1f0f917e7d6e4ec2a2c37bfa0047903762c1..dd3e1d7693e53a90609e612e9ad5696056be6d65 100644 |
--- a/Source/core/html/HTMLFormControlElement.h |
+++ b/Source/core/html/HTMLFormControlElement.h |
@@ -34,6 +34,7 @@ class HTMLFormElement; |
class ValidationMessageClient; |
enum CheckValidityEventBehavior { CheckValidityDispatchNoEvent, CheckValidityDispatchInvalidEvent }; |
+enum ValidityRecalcReason { ElementAddition, ElementRemoval, ElementModification }; |
// HTMLFormControlElement is the default implementation of FormAssociatedElement, |
// and form-associated element implementations should use HTMLFormControlElement |
@@ -168,7 +169,9 @@ private: |
ValidationMessageClient* validationMessageClient() const; |
// Requests validity recalc for the form owner, if one exists. |
- void formOwnerSetNeedsValidityCheck(); |
+ // In case of removal, isValid specifies element validity upon removal. |
+ // In case of addition and modification, it specifies new validity. |
+ void formOwnerSetNeedsValidityCheck(ValidityRecalcReason, bool isValid); |
// Requests validity recalc for all ancestor fieldsets, if exist. |
void fieldSetAncestorsSetNeedsValidityCheck(Node*); |