OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 // Return true for a successful control (see HTML4-17.13.2). | 78 // Return true for a successful control (see HTML4-17.13.2). |
79 virtual bool appendFormData(FormDataList&, bool) OVERRIDE { return false; } | 79 virtual bool appendFormData(FormDataList&, bool) OVERRIDE { return false; } |
80 virtual String resultForDialogSubmit(); | 80 virtual String resultForDialogSubmit(); |
81 | 81 |
82 virtual bool canBeSuccessfulSubmitButton() const { return false; } | 82 virtual bool canBeSuccessfulSubmitButton() const { return false; } |
83 bool isSuccessfulSubmitButton() const; | 83 bool isSuccessfulSubmitButton() const; |
84 virtual bool isActivatedSubmit() const { return false; } | 84 virtual bool isActivatedSubmit() const { return false; } |
85 virtual void setActivatedSubmit(bool) { } | 85 virtual void setActivatedSubmit(bool) { } |
86 | 86 |
87 virtual bool willValidate() const OVERRIDE; | 87 virtual bool willValidate() const OVERRIDE; |
| 88 virtual bool isValidElement() OVERRIDE FINAL; |
| 89 |
88 void updateVisibleValidationMessage(); | 90 void updateVisibleValidationMessage(); |
89 void hideVisibleValidationMessage(); | 91 void hideVisibleValidationMessage(); |
90 bool checkValidity(WillBeHeapVector<RefPtrWillBeMember<FormAssociatedElement
> >* unhandledInvalidControls = 0); | 92 bool checkValidity(WillBeHeapVector<RefPtrWillBeMember<FormAssociatedElement
> >* unhandledInvalidControls = 0); |
91 // This must be called when a validation constraint or control value is chan
ged. | 93 // This must be called when a validation constraint or control value is chan
ged. |
92 void setNeedsValidityCheck(); | 94 void setNeedsValidityCheck(); |
93 virtual void setCustomValidity(const String&) OVERRIDE FINAL; | 95 virtual void setCustomValidity(const String&) OVERRIDE FINAL; |
94 void findCustomValidationMessageTextDirection(const String& message, TextDir
ection &messageDir, String& subMessage, TextDirection& subMessageDir); | 96 void findCustomValidationMessageTextDirection(const String& message, TextDir
ection &messageDir, String& subMessage, TextDirection& subMessageDir); |
95 | 97 |
96 bool isReadOnly() const { return m_isReadOnly; } | 98 bool isReadOnly() const { return m_isReadOnly; } |
97 bool isDisabledOrReadOnly() const { return isDisabledFormControl() || m_isRe
adOnly; } | 99 bool isDisabledOrReadOnly() const { return isDisabledFormControl() || m_isRe
adOnly; } |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 virtual void refFormAssociatedElement() OVERRIDE FINAL { ref(); } | 147 virtual void refFormAssociatedElement() OVERRIDE FINAL { ref(); } |
146 virtual void derefFormAssociatedElement() OVERRIDE FINAL { deref(); } | 148 virtual void derefFormAssociatedElement() OVERRIDE FINAL { deref(); } |
147 #endif | 149 #endif |
148 | 150 |
149 virtual bool isFormControlElement() const OVERRIDE FINAL { return true; } | 151 virtual bool isFormControlElement() const OVERRIDE FINAL { return true; } |
150 virtual bool alwaysCreateUserAgentShadowRoot() const OVERRIDE { return true;
} | 152 virtual bool alwaysCreateUserAgentShadowRoot() const OVERRIDE { return true;
} |
151 | 153 |
152 virtual short tabIndex() const OVERRIDE FINAL; | 154 virtual short tabIndex() const OVERRIDE FINAL; |
153 | 155 |
154 virtual bool isDefaultButtonForForm() const OVERRIDE FINAL; | 156 virtual bool isDefaultButtonForForm() const OVERRIDE FINAL; |
155 virtual bool isValidFormControlElement() OVERRIDE FINAL; | |
156 void updateAncestorDisabledState() const; | 157 void updateAncestorDisabledState() const; |
157 | 158 |
158 bool isValidationMessageVisible() const; | 159 bool isValidationMessageVisible() const; |
159 ValidationMessageClient* validationMessageClient() const; | 160 ValidationMessageClient* validationMessageClient() const; |
160 | 161 |
161 bool m_disabled : 1; | 162 bool m_disabled : 1; |
162 bool m_isAutofilled : 1; | 163 bool m_isAutofilled : 1; |
163 bool m_isReadOnly : 1; | 164 bool m_isReadOnly : 1; |
164 bool m_isRequired : 1; | 165 bool m_isRequired : 1; |
165 bool m_hasValidationMessage : 1; | 166 bool m_hasValidationMessage : 1; |
(...skipping 21 matching lines...) Expand all Loading... |
187 { | 188 { |
188 return element.isFormControlElement(); | 189 return element.isFormControlElement(); |
189 } | 190 } |
190 | 191 |
191 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLFormControlElement); | 192 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLFormControlElement); |
192 DEFINE_TYPE_CASTS(HTMLFormControlElement, FormAssociatedElement, control, contro
l->isFormControlElement(), control.isFormControlElement()); | 193 DEFINE_TYPE_CASTS(HTMLFormControlElement, FormAssociatedElement, control, contro
l->isFormControlElement(), control.isFormControlElement()); |
193 | 194 |
194 } // namespace | 195 } // namespace |
195 | 196 |
196 #endif | 197 #endif |
OLD | NEW |