summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/FormAssociatedElement.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/html/FormAssociatedElement.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/html/FormAssociatedElement.h')
-rw-r--r--Source/WebCore/html/FormAssociatedElement.h21
1 files changed, 9 insertions, 12 deletions
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 <wtf/text/WTFString.h>
@@ -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<FormAttributeTargetObserver> 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