Chromium Code Reviews| Index: Source/core/html/HTMLFormControlElement.h |
| diff --git a/Source/core/html/HTMLFormControlElement.h b/Source/core/html/HTMLFormControlElement.h |
| index 33f94439400cef0307050237ae35b88e057cfdb1..5257c2f8fba7f95bf5a3f54d5c8481187047aa30 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 ValidityChangeAction { ElementAddition, ElementRemoval, ElementModification }; |
|
keishi
2014/10/24 10:25:49
nit: It might be just me. The name * Action gives
Bartek Nowierski
2014/10/24 10:48:30
Reason seems like a much better option. Done.
|
| // HTMLFormControlElement is the default implementation of FormAssociatedElement, |
| // and form-associated element implementations should use HTMLFormControlElement |
| @@ -127,8 +128,7 @@ protected: |
| virtual void attach(const AttachContext& = AttachContext()) override; |
| virtual InsertionNotificationRequest insertedInto(ContainerNode*) override; |
| virtual void removedFrom(ContainerNode*) override; |
| - virtual void willChangeForm() override; |
| - virtual void didChangeForm() override; |
| + virtual void didChangeForm(HTMLFormElement* oldForm) override; |
| virtual void didMoveToNewDocument(Document& oldDocument) override; |
| virtual bool supportsFocus() const override; |
| @@ -162,13 +162,15 @@ private: |
| virtual bool isDefaultButtonForForm() const override final; |
| virtual bool isValidElement() override; |
| virtual bool matchesValidityPseudoClasses() const override; |
| + // Refreshes willValidate cache. Returns true if anything changed. |
| + bool refreshWillValidate(); |
| void updateAncestorDisabledState() const; |
| bool isValidationMessageVisible() const; |
| ValidationMessageClient* validationMessageClient() const; |
| // Requests validity recalc for the form owner, if one exists. |
| - void formOwnerSetNeedsValidityCheck(); |
| + void formOwnerSetNeedsValidityCheck(ValidityChangeAction, bool isValid); |
| // Requests validity recalc for all ancestor fieldsets, if exist. |
| void fieldSetAncestorsSetNeedsValidityCheck(Node*); |