| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 void setFormMethod(const AtomicString&); | 49 void setFormMethod(const AtomicString&); |
| 50 bool formNoValidate() const; | 50 bool formNoValidate() const; |
| 51 | 51 |
| 52 void ancestorDisabledStateWasChanged(); | 52 void ancestorDisabledStateWasChanged(); |
| 53 | 53 |
| 54 void reset(); | 54 void reset(); |
| 55 | 55 |
| 56 virtual bool formControlValueMatchesRenderer() const { return m_valueMatches
Renderer; } | 56 virtual bool formControlValueMatchesRenderer() const { return m_valueMatches
Renderer; } |
| 57 virtual void setFormControlValueMatchesRenderer(bool b) { m_valueMatchesRend
erer = b; } | 57 virtual void setFormControlValueMatchesRenderer(bool b) { m_valueMatchesRend
erer = b; } |
| 58 | 58 |
| 59 virtual bool wasChangedSinceLastFormControlChangeEvent() const OVERRIDE FINA
L; | 59 bool wasChangedSinceLastFormControlChangeEvent() const { return m_wasChanged
SinceLastFormControlChangeEvent; } |
| 60 virtual void setChangedSinceLastFormControlChangeEvent(bool) OVERRIDE FINAL; | 60 void setChangedSinceLastFormControlChangeEvent(bool); |
| 61 | 61 |
| 62 virtual void dispatchFormControlChangeEvent() OVERRIDE; | 62 virtual void dispatchFormControlChangeEvent(); |
| 63 void dispatchChangeEvent(); | 63 void dispatchChangeEvent(); |
| 64 void dispatchFormControlInputEvent(); | 64 void dispatchFormControlInputEvent(); |
| 65 | 65 |
| 66 virtual HTMLFormElement* formOwner() const OVERRIDE FINAL; | 66 virtual HTMLFormElement* formOwner() const OVERRIDE FINAL; |
| 67 | 67 |
| 68 virtual bool isDisabledFormControl() const OVERRIDE; | 68 virtual bool isDisabledFormControl() const OVERRIDE; |
| 69 | 69 |
| 70 virtual bool isEnumeratable() const OVERRIDE { return false; } | 70 virtual bool isEnumeratable() const OVERRIDE { return false; } |
| 71 | 71 |
| 72 bool isRequired() const; | 72 bool isRequired() const; |
| 73 | 73 |
| 74 const AtomicString& type() const { return formControlType(); } | 74 const AtomicString& type() const { return formControlType(); } |
| 75 | 75 |
| 76 virtual const AtomicString& formControlType() const OVERRIDE = 0; | 76 virtual const AtomicString& formControlType() const = 0; |
| 77 | 77 |
| 78 virtual bool canTriggerImplicitSubmission() const { return false; } | 78 virtual bool canTriggerImplicitSubmission() const { return false; } |
| 79 | 79 |
| 80 // Override in derived classes to get the encoded name=value pair for submit
ting. | 80 // Override in derived classes to get the encoded name=value pair for submit
ting. |
| 81 // Return true for a successful control (see HTML4-17.13.2). | 81 // Return true for a successful control (see HTML4-17.13.2). |
| 82 virtual bool appendFormData(FormDataList&, bool) OVERRIDE { return false; } | 82 virtual bool appendFormData(FormDataList&, bool) OVERRIDE { return false; } |
| 83 virtual String resultForDialogSubmit(); | 83 virtual String resultForDialogSubmit(); |
| 84 | 84 |
| 85 virtual bool canBeSuccessfulSubmitButton() const { return false; } | 85 virtual bool canBeSuccessfulSubmitButton() const { return false; } |
| 86 bool isSuccessfulSubmitButton() const; | 86 bool isSuccessfulSubmitButton() const; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 102 | 102 |
| 103 bool isAutofocusable() const; | 103 bool isAutofocusable() const; |
| 104 | 104 |
| 105 bool isAutofilled() const { return m_isAutofilled; } | 105 bool isAutofilled() const { return m_isAutofilled; } |
| 106 void setAutofilled(bool = true); | 106 void setAutofilled(bool = true); |
| 107 | 107 |
| 108 static HTMLFormControlElement* enclosingFormControlElement(Node*); | 108 static HTMLFormControlElement* enclosingFormControlElement(Node*); |
| 109 | 109 |
| 110 String nameForAutofill() const; | 110 String nameForAutofill() const; |
| 111 | 111 |
| 112 virtual void setFocus(bool flag) OVERRIDE; |
| 113 |
| 112 using Node::ref; | 114 using Node::ref; |
| 113 using Node::deref; | 115 using Node::deref; |
| 114 | 116 |
| 115 protected: | 117 protected: |
| 116 HTMLFormControlElement(const QualifiedName& tagName, Document&, HTMLFormElem
ent*); | 118 HTMLFormControlElement(const QualifiedName& tagName, Document&, HTMLFormElem
ent*); |
| 117 | 119 |
| 118 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 120 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
| 119 virtual void requiredAttributeChanged(); | 121 virtual void requiredAttributeChanged(); |
| 120 virtual void disabledAttributeChanged(); | 122 virtual void disabledAttributeChanged(); |
| 121 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; | 123 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 { | 185 { |
| 184 return node.isElementNode() && toElement(node).isFormControlElement(); | 186 return node.isElementNode() && toElement(node).isFormControlElement(); |
| 185 } | 187 } |
| 186 | 188 |
| 187 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(HTMLFormControlElement); | 189 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(HTMLFormControlElement); |
| 188 DEFINE_TYPE_CASTS(HTMLFormControlElement, FormAssociatedElement, control, contro
l->isFormControlElement(), control.isFormControlElement()); | 190 DEFINE_TYPE_CASTS(HTMLFormControlElement, FormAssociatedElement, control, contro
l->isFormControlElement(), control.isFormControlElement()); |
| 189 | 191 |
| 190 } // namespace | 192 } // namespace |
| 191 | 193 |
| 192 #endif | 194 #endif |
| OLD | NEW |