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 25 matching lines...) Expand all Loading... |
36 class ValidationMessage; | 36 class ValidationMessage; |
37 class ValidityState; | 37 class ValidityState; |
38 | 38 |
39 // HTMLFormControlElement is the default implementation of FormAssociatedElement
, | 39 // HTMLFormControlElement is the default implementation of FormAssociatedElement
, |
40 // and form-associated element implementations should use HTMLFormControlElement | 40 // and form-associated element implementations should use HTMLFormControlElement |
41 // unless there is a special reason. | 41 // unless there is a special reason. |
42 class HTMLFormControlElement : public LabelableElement, public FormAssociatedEle
ment { | 42 class HTMLFormControlElement : public LabelableElement, public FormAssociatedEle
ment { |
43 public: | 43 public: |
44 virtual ~HTMLFormControlElement(); | 44 virtual ~HTMLFormControlElement(); |
45 | 45 |
46 HTMLFormElement* form() const { return FormAssociatedElement::form(); } | |
47 | |
48 String formEnctype() const; | 46 String formEnctype() const; |
49 void setFormEnctype(const AtomicString&); | 47 void setFormEnctype(const AtomicString&); |
50 String formMethod() const; | 48 String formMethod() const; |
51 void setFormMethod(const AtomicString&); | 49 void setFormMethod(const AtomicString&); |
52 bool formNoValidate() const; | 50 bool formNoValidate() const; |
53 | 51 |
54 void ancestorDisabledStateWasChanged(); | 52 void ancestorDisabledStateWasChanged(); |
55 | 53 |
56 void reset(); | 54 void reset(); |
57 | 55 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 void setNeedsWillValidateCheck(); | 136 void setNeedsWillValidateCheck(); |
139 virtual bool recalcWillValidate() const; | 137 virtual bool recalcWillValidate() const; |
140 | 138 |
141 virtual void resetImpl() { } | 139 virtual void resetImpl() { } |
142 | 140 |
143 private: | 141 private: |
144 virtual void refFormAssociatedElement() { ref(); } | 142 virtual void refFormAssociatedElement() { ref(); } |
145 virtual void derefFormAssociatedElement() { deref(); } | 143 virtual void derefFormAssociatedElement() { deref(); } |
146 | 144 |
147 virtual bool isFormControlElement() const { return true; } | 145 virtual bool isFormControlElement() const { return true; } |
| 146 virtual bool isFormAssociatedElement() const OVERRIDE { return true; } |
148 virtual bool alwaysCreateUserAgentShadowRoot() const OVERRIDE { return true;
} | 147 virtual bool alwaysCreateUserAgentShadowRoot() const OVERRIDE { return true;
} |
149 | 148 |
150 virtual short tabIndex() const; | 149 virtual short tabIndex() const; |
151 | 150 |
152 virtual HTMLFormElement* virtualForm() const; | 151 virtual HTMLFormElement* virtualForm() const; |
153 virtual bool isDefaultButtonForForm() const; | 152 virtual bool isDefaultButtonForForm() const; |
154 virtual bool isValidFormControlElement(); | 153 virtual bool isValidFormControlElement(); |
155 void updateAncestorDisabledState() const; | 154 void updateAncestorDisabledState() const; |
156 | 155 |
157 OwnPtr<ValidationMessage> m_validationMessage; | 156 OwnPtr<ValidationMessage> m_validationMessage; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 | 207 |
209 inline const HTMLFormControlElement& toHTMLFormControlElement(const FormAssociat
edElement& control) | 208 inline const HTMLFormControlElement& toHTMLFormControlElement(const FormAssociat
edElement& control) |
210 { | 209 { |
211 ASSERT_WITH_SECURITY_IMPLICATION(control.isFormControlElement()); | 210 ASSERT_WITH_SECURITY_IMPLICATION(control.isFormControlElement()); |
212 return static_cast<const HTMLFormControlElement&>(control); | 211 return static_cast<const HTMLFormControlElement&>(control); |
213 } | 212 } |
214 | 213 |
215 } // namespace | 214 } // namespace |
216 | 215 |
217 #endif | 216 #endif |
OLD | NEW |