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 | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
6 * reserved. | 6 * reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 125 |
126 static HTMLFormControlElement* enclosingFormControlElement(Node*); | 126 static HTMLFormControlElement* enclosingFormControlElement(Node*); |
127 | 127 |
128 String nameForAutofill() const; | 128 String nameForAutofill() const; |
129 | 129 |
130 void copyNonAttributePropertiesFromElement(const Element&) override; | 130 void copyNonAttributePropertiesFromElement(const Element&) override; |
131 | 131 |
132 FormAssociated* toFormAssociatedOrNull() override { return this; }; | 132 FormAssociated* toFormAssociatedOrNull() override { return this; }; |
133 void associateWith(HTMLFormElement*) override; | 133 void associateWith(HTMLFormElement*) override; |
134 | 134 |
| 135 bool blocksFormSubmission() const { return m_blocksFormSubmission; } |
| 136 void setBlocksFormSubmission(bool value) { m_blocksFormSubmission = value; } |
| 137 |
135 protected: | 138 protected: |
136 HTMLFormControlElement(const QualifiedName& tagName, Document&); | 139 HTMLFormControlElement(const QualifiedName& tagName, Document&); |
137 | 140 |
138 void attributeChanged(const AttributeModificationParams&) override; | 141 void attributeChanged(const AttributeModificationParams&) override; |
139 void parseAttribute(const AttributeModificationParams&) override; | 142 void parseAttribute(const AttributeModificationParams&) override; |
140 virtual void requiredAttributeChanged(); | 143 virtual void requiredAttributeChanged(); |
141 virtual void disabledAttributeChanged(); | 144 virtual void disabledAttributeChanged(); |
142 void attachLayoutTree(const AttachContext& = AttachContext()) override; | 145 void attachLayoutTree(const AttachContext& = AttachContext()) override; |
143 InsertionNotificationRequest insertedInto(ContainerNode*) override; | 146 InsertionNotificationRequest insertedInto(ContainerNode*) override; |
144 void removedFrom(ContainerNode*) override; | 147 void removedFrom(ContainerNode*) override; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 // initialize it with a virtual function in the constructor. m_willValidate | 203 // initialize it with a virtual function in the constructor. m_willValidate |
201 // is not deterministic as long as m_willValidateInitialized is false. | 204 // is not deterministic as long as m_willValidateInitialized is false. |
202 mutable bool m_willValidateInitialized : 1; | 205 mutable bool m_willValidateInitialized : 1; |
203 mutable bool m_willValidate : 1; | 206 mutable bool m_willValidate : 1; |
204 | 207 |
205 // Cache of valid(). | 208 // Cache of valid(). |
206 bool m_isValid : 1; | 209 bool m_isValid : 1; |
207 bool m_validityIsDirty : 1; | 210 bool m_validityIsDirty : 1; |
208 | 211 |
209 bool m_wasFocusedByMouse : 1; | 212 bool m_wasFocusedByMouse : 1; |
| 213 bool m_blocksFormSubmission : 1; |
210 }; | 214 }; |
211 | 215 |
212 inline bool isHTMLFormControlElement(const Element& element) { | 216 inline bool isHTMLFormControlElement(const Element& element) { |
213 return element.isFormControlElement(); | 217 return element.isFormControlElement(); |
214 } | 218 } |
215 | 219 |
216 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLFormControlElement); | 220 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLFormControlElement); |
217 DEFINE_TYPE_CASTS(HTMLFormControlElement, | 221 DEFINE_TYPE_CASTS(HTMLFormControlElement, |
218 ListedElement, | 222 ListedElement, |
219 control, | 223 control, |
220 control->isFormControlElement(), | 224 control->isFormControlElement(), |
221 control.isFormControlElement()); | 225 control.isFormControlElement()); |
222 | 226 |
223 } // namespace blink | 227 } // namespace blink |
224 | 228 |
225 #endif | 229 #endif |
OLD | NEW |