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) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved. |
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) | 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 HTMLFormControlElement::defaultEventHandler(event); | 152 HTMLFormControlElement::defaultEventHandler(event); |
153 } | 153 } |
154 | 154 |
155 bool HTMLButtonElement::willRespondToMouseClickEvents() | 155 bool HTMLButtonElement::willRespondToMouseClickEvents() |
156 { | 156 { |
157 if (!isDisabledFormControl() && form() && (m_type == SUBMIT || m_type == RES
ET)) | 157 if (!isDisabledFormControl() && form() && (m_type == SUBMIT || m_type == RES
ET)) |
158 return true; | 158 return true; |
159 return HTMLFormControlElement::willRespondToMouseClickEvents(); | 159 return HTMLFormControlElement::willRespondToMouseClickEvents(); |
160 } | 160 } |
161 | 161 |
162 bool HTMLButtonElement::isSuccessfulSubmitButton() const | 162 bool HTMLButtonElement::canBeSuccessfulSubmitButton() const |
163 { | 163 { |
164 // HTML spec says that buttons must have names to be considered successful. | 164 return m_type == SUBMIT; |
165 // However, other browsers do not impose this constraint. | |
166 return m_type == SUBMIT && !isDisabledFormControl(); | |
167 } | 165 } |
168 | 166 |
169 bool HTMLButtonElement::isActivatedSubmit() const | 167 bool HTMLButtonElement::isActivatedSubmit() const |
170 { | 168 { |
171 return m_isActivatedSubmit; | 169 return m_isActivatedSubmit; |
172 } | 170 } |
173 | 171 |
174 void HTMLButtonElement::setActivatedSubmit(bool flag) | 172 void HTMLButtonElement::setActivatedSubmit(bool flag) |
175 { | 173 { |
176 m_isActivatedSubmit = flag; | 174 m_isActivatedSubmit = flag; |
(...skipping 28 matching lines...) Expand all Loading... |
205 { | 203 { |
206 return m_type == SUBMIT && HTMLFormControlElement::recalcWillValidate(); | 204 return m_type == SUBMIT && HTMLFormControlElement::recalcWillValidate(); |
207 } | 205 } |
208 | 206 |
209 bool HTMLButtonElement::isInteractiveContent() const | 207 bool HTMLButtonElement::isInteractiveContent() const |
210 { | 208 { |
211 return true; | 209 return true; |
212 } | 210 } |
213 | 211 |
214 } // namespace | 212 } // namespace |
OLD | NEW |