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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 virtual ~HTMLFormControlElement(); | 44 virtual ~HTMLFormControlElement(); |
45 | 45 |
46 HTMLFormElement* form() const { return FormAssociatedElement::form(); } | 46 HTMLFormElement* form() const { return FormAssociatedElement::form(); } |
47 | 47 |
48 String formEnctype() const; | 48 String formEnctype() const; |
49 void setFormEnctype(const String&); | 49 void setFormEnctype(const String&); |
50 String formMethod() const; | 50 String formMethod() const; |
51 void setFormMethod(const String&); | 51 void setFormMethod(const String&); |
52 bool formNoValidate() const; | 52 bool formNoValidate() const; |
53 | 53 |
54 void updateAncestors() const; | 54 void updateFieldSetAndLegendAncestor() const; |
55 | 55 |
56 virtual void reset() { } | 56 virtual void reset() { } |
57 | 57 |
58 virtual bool formControlValueMatchesRenderer() const { return m_valueMatches
Renderer; } | 58 virtual bool formControlValueMatchesRenderer() const { return m_valueMatches
Renderer; } |
59 virtual void setFormControlValueMatchesRenderer(bool b) { m_valueMatchesRend
erer = b; } | 59 virtual void setFormControlValueMatchesRenderer(bool b) { m_valueMatchesRend
erer = b; } |
60 | 60 |
61 virtual bool wasChangedSinceLastFormControlChangeEvent() const; | 61 virtual bool wasChangedSinceLastFormControlChangeEvent() const; |
62 virtual void setChangedSinceLastFormControlChangeEvent(bool); | 62 virtual void setChangedSinceLastFormControlChangeEvent(bool); |
63 | 63 |
64 virtual void dispatchFormControlChangeEvent(); | 64 virtual void dispatchFormControlChangeEvent(); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 virtual short tabIndex() const; | 146 virtual short tabIndex() const; |
147 | 147 |
148 virtual HTMLFormElement* virtualForm() const; | 148 virtual HTMLFormElement* virtualForm() const; |
149 virtual bool isDefaultButtonForForm() const; | 149 virtual bool isDefaultButtonForForm() const; |
150 virtual bool isValidFormControlElement(); | 150 virtual bool isValidFormControlElement(); |
151 String visibleValidationMessage() const; | 151 String visibleValidationMessage() const; |
152 | 152 |
153 mutable HTMLFieldSetElement* m_fieldSetAncestor; | 153 mutable HTMLFieldSetElement* m_fieldSetAncestor; |
154 mutable HTMLLegendElement* m_legendAncestor; | 154 mutable HTMLLegendElement* m_legendAncestor; |
155 OwnPtr<ValidationMessage> m_validationMessage; | 155 OwnPtr<ValidationMessage> m_validationMessage; |
156 mutable bool m_ancestorsValid : 1; | 156 mutable bool m_fieldSetAncestorValid : 1; |
157 bool m_disabled : 1; | 157 bool m_disabled : 1; |
158 bool m_readOnly : 1; | 158 bool m_readOnly : 1; |
159 bool m_required : 1; | 159 bool m_required : 1; |
160 bool m_valueMatchesRenderer : 1; | 160 bool m_valueMatchesRenderer : 1; |
161 | 161 |
| 162 enum DataListAncestorState { Unknown, InsideDataList, NotInsideDataList }; |
| 163 mutable enum DataListAncestorState m_dataListAncestorState; |
| 164 |
162 // The initial value of m_willValidate depends on the derived class. We can'
t | 165 // The initial value of m_willValidate depends on the derived class. We can'
t |
163 // initialize it with a virtual function in the constructor. m_willValidate | 166 // initialize it with a virtual function in the constructor. m_willValidate |
164 // is not deterministic as long as m_willValidateInitialized is false. | 167 // is not deterministic as long as m_willValidateInitialized is false. |
165 mutable bool m_willValidateInitialized: 1; | 168 mutable bool m_willValidateInitialized: 1; |
166 mutable bool m_willValidate : 1; | 169 mutable bool m_willValidate : 1; |
167 | 170 |
168 // Cache of validity()->valid(). | 171 // Cache of validity()->valid(). |
169 // But "candidate for constraint validation" doesn't affect m_isValid. | 172 // But "candidate for constraint validation" doesn't affect m_isValid. |
170 bool m_isValid : 1; | 173 bool m_isValid : 1; |
171 | 174 |
172 bool m_wasChangedSinceLastFormControlChangeEvent : 1; | 175 bool m_wasChangedSinceLastFormControlChangeEvent : 1; |
173 | 176 |
174 bool m_hasAutofocused : 1; | 177 bool m_hasAutofocused : 1; |
175 mutable bool m_hasDataListAncestor : 1; | |
176 }; | 178 }; |
177 | 179 |
178 } // namespace | 180 } // namespace |
179 | 181 |
180 #endif | 182 #endif |
OLD | NEW |