From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/html/FormAssociatedElement.h | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'Source/WebCore/html/FormAssociatedElement.h') diff --git a/Source/WebCore/html/FormAssociatedElement.h b/Source/WebCore/html/FormAssociatedElement.h index ec9424064..66001504e 100644 --- a/Source/WebCore/html/FormAssociatedElement.h +++ b/Source/WebCore/html/FormAssociatedElement.h @@ -21,8 +21,7 @@ * */ -#ifndef FormAssociatedElement_h -#define FormAssociatedElement_h +#pragma once #include "FormNamedItem.h" #include @@ -72,27 +71,28 @@ public: bool badInput() const { return hasBadInput(); } bool customError() const; - // Implementations of patternMismatch, rangeOverflow, rangerUnderflow, stepMismatch, tooLong and valueMissing must call willValidate. + // Implementations of patternMismatch, rangeOverflow, rangerUnderflow, stepMismatch, tooShort, tooLong and valueMissing must call willValidate. virtual bool hasBadInput() const; virtual bool patternMismatch() const; virtual bool rangeOverflow() const; virtual bool rangeUnderflow() const; virtual bool stepMismatch() const; + virtual bool tooShort() const; virtual bool tooLong() const; virtual bool typeMismatch() const; virtual bool valueMissing() const; virtual String validationMessage() const; - bool valid() const; + virtual bool isValid() const; virtual void setCustomValidity(const String&); void formAttributeTargetChanged(); protected: - FormAssociatedElement(); + FormAssociatedElement(HTMLFormElement*); void insertedInto(ContainerNode&); void removedFrom(ContainerNode&); - void didMoveToNewDocument(Document* oldDocument); + void didMoveToNewDocument(Document& oldDocument); void setForm(HTMLFormElement*); void formAttributeChanged(); @@ -106,21 +106,18 @@ protected: String customValidationMessage() const; private: + virtual bool willValidate() const = 0; virtual void refFormAssociatedElement() = 0; virtual void derefFormAssociatedElement() = 0; void resetFormAttributeTargetObserver(); - virtual bool isFormAssociatedElement() const override final { return true; } + bool isFormAssociatedElement() const final { return true; } std::unique_ptr m_formAttributeTargetObserver; HTMLFormElement* m_form; + HTMLFormElement* m_formSetByParser; String m_customValidationMessage; }; -#define FORM_ASSOCIATED_ELEMENT_TYPE_CASTS(ToClassName, predicate) \ - TYPE_CASTS_BASE(ToClassName, FormAssociatedElement, element, element->predicate, element.predicate) - } // namespace - -#endif // FormAssociatedElement_h -- cgit v1.2.1