Chromium Code Reviews| 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 // HTML spec says that buttons must have names to be considered successful. |
|
eseidel
2013/11/14 16:40:32
Interesting that we're choosing to follow one bit
tkent
2013/11/15 00:04:31
It seems the WHATWG specification doesn't ask it.
sof
2013/11/15 08:52:15
Done. I couldn't find any mention of this either (
| |
| 165 // However, other browsers do not impose this constraint. | 165 // However, other browsers do not impose this constraint. |
| 166 return m_type == SUBMIT && !isDisabledFormControl(); | 166 return m_type == SUBMIT; |
| 167 } | 167 } |
| 168 | 168 |
| 169 bool HTMLButtonElement::isActivatedSubmit() const | 169 bool HTMLButtonElement::isActivatedSubmit() const |
| 170 { | 170 { |
| 171 return m_isActivatedSubmit; | 171 return m_isActivatedSubmit; |
| 172 } | 172 } |
| 173 | 173 |
| 174 void HTMLButtonElement::setActivatedSubmit(bool flag) | 174 void HTMLButtonElement::setActivatedSubmit(bool flag) |
| 175 { | 175 { |
| 176 m_isActivatedSubmit = flag; | 176 m_isActivatedSubmit = flag; |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 205 { | 205 { |
| 206 return m_type == SUBMIT && HTMLFormControlElement::recalcWillValidate(); | 206 return m_type == SUBMIT && HTMLFormControlElement::recalcWillValidate(); |
| 207 } | 207 } |
| 208 | 208 |
| 209 bool HTMLButtonElement::isInteractiveContent() const | 209 bool HTMLButtonElement::isInteractiveContent() const |
| 210 { | 210 { |
| 211 return true; | 211 return true; |
| 212 } | 212 } |
| 213 | 213 |
| 214 } // namespace | 214 } // namespace |
| OLD | NEW |