| 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, 2008, 2010 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv
ed. |
| 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 : HTMLElement(tagName, document) | 42 : HTMLElement(tagName, document) |
| 43 { | 43 { |
| 44 ASSERT(hasTagName(optgroupTag)); | 44 ASSERT(hasTagName(optgroupTag)); |
| 45 } | 45 } |
| 46 | 46 |
| 47 PassRefPtr<HTMLOptGroupElement> HTMLOptGroupElement::create(const QualifiedName&
tagName, Document* document) | 47 PassRefPtr<HTMLOptGroupElement> HTMLOptGroupElement::create(const QualifiedName&
tagName, Document* document) |
| 48 { | 48 { |
| 49 return adoptRef(new HTMLOptGroupElement(tagName, document)); | 49 return adoptRef(new HTMLOptGroupElement(tagName, document)); |
| 50 } | 50 } |
| 51 | 51 |
| 52 bool HTMLOptGroupElement::disabled() const |
| 53 { |
| 54 return fastHasAttribute(disabledAttr); |
| 55 } |
| 56 |
| 52 bool HTMLOptGroupElement::supportsFocus() const | 57 bool HTMLOptGroupElement::supportsFocus() const |
| 53 { | 58 { |
| 54 return HTMLElement::supportsFocus(); | 59 return HTMLElement::supportsFocus(); |
| 55 } | 60 } |
| 56 | 61 |
| 57 bool HTMLOptGroupElement::isFocusable() const | 62 bool HTMLOptGroupElement::isFocusable() const |
| 58 { | 63 { |
| 59 // Optgroup elements do not have a renderer so we check the renderStyle inst
ead. | 64 // Optgroup elements do not have a renderer so we check the renderStyle inst
ead. |
| 60 return supportsFocus() && renderStyle() && renderStyle()->display() != NONE; | 65 return supportsFocus() && renderStyle() && renderStyle()->display() != NONE; |
| 61 } | 66 } |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 141 |
| 137 void HTMLOptGroupElement::accessKeyAction(bool) | 142 void HTMLOptGroupElement::accessKeyAction(bool) |
| 138 { | 143 { |
| 139 HTMLSelectElement* select = ownerSelectElement(); | 144 HTMLSelectElement* select = ownerSelectElement(); |
| 140 // send to the parent to bring focus to the list box | 145 // send to the parent to bring focus to the list box |
| 141 if (select && !select->focused()) | 146 if (select && !select->focused()) |
| 142 select->accessKeyAction(false); | 147 select->accessKeyAction(false); |
| 143 } | 148 } |
| 144 | 149 |
| 145 } // namespace | 150 } // namespace |
| OLD | NEW |