| 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 17 matching lines...) Expand all Loading... |
| 28 #include "HTMLNames.h" | 28 #include "HTMLNames.h" |
| 29 #include "core/dom/Document.h" | 29 #include "core/dom/Document.h" |
| 30 #include "core/dom/NodeRenderStyle.h" | 30 #include "core/dom/NodeRenderStyle.h" |
| 31 #include "core/html/HTMLSelectElement.h" | 31 #include "core/html/HTMLSelectElement.h" |
| 32 #include "wtf/StdLibExtras.h" | 32 #include "wtf/StdLibExtras.h" |
| 33 | 33 |
| 34 namespace WebCore { | 34 namespace WebCore { |
| 35 | 35 |
| 36 using namespace HTMLNames; | 36 using namespace HTMLNames; |
| 37 | 37 |
| 38 inline HTMLOptGroupElement::HTMLOptGroupElement(const QualifiedName& tagName, Do
cument& document) | 38 inline HTMLOptGroupElement::HTMLOptGroupElement(Document& document) |
| 39 : HTMLElement(tagName, document) | 39 : HTMLElement(optgroupTag, document) |
| 40 { | 40 { |
| 41 ASSERT(hasTagName(optgroupTag)); | |
| 42 setHasCustomStyleCallbacks(); | 41 setHasCustomStyleCallbacks(); |
| 43 ScriptWrappable::init(this); | 42 ScriptWrappable::init(this); |
| 44 } | 43 } |
| 45 | 44 |
| 46 PassRefPtr<HTMLOptGroupElement> HTMLOptGroupElement::create(const QualifiedName&
tagName, Document& document) | 45 PassRefPtr<HTMLOptGroupElement> HTMLOptGroupElement::create(Document& document) |
| 47 { | 46 { |
| 48 return adoptRef(new HTMLOptGroupElement(tagName, document)); | 47 return adoptRef(new HTMLOptGroupElement(document)); |
| 49 } | 48 } |
| 50 | 49 |
| 51 bool HTMLOptGroupElement::isDisabledFormControl() const | 50 bool HTMLOptGroupElement::isDisabledFormControl() const |
| 52 { | 51 { |
| 53 return fastHasAttribute(disabledAttr); | 52 return fastHasAttribute(disabledAttr); |
| 54 } | 53 } |
| 55 | 54 |
| 56 bool HTMLOptGroupElement::rendererIsFocusable() const | 55 bool HTMLOptGroupElement::rendererIsFocusable() const |
| 57 { | 56 { |
| 58 // Optgroup elements do not have a renderer so we check the renderStyle inst
ead. | 57 // Optgroup elements do not have a renderer so we check the renderStyle inst
ead. |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 148 |
| 150 void HTMLOptGroupElement::accessKeyAction(bool) | 149 void HTMLOptGroupElement::accessKeyAction(bool) |
| 151 { | 150 { |
| 152 HTMLSelectElement* select = ownerSelectElement(); | 151 HTMLSelectElement* select = ownerSelectElement(); |
| 153 // send to the parent to bring focus to the list box | 152 // send to the parent to bring focus to the list box |
| 154 if (select && !select->focused()) | 153 if (select && !select->focused()) |
| 155 select->accessKeyAction(false); | 154 select->accessKeyAction(false); |
| 156 } | 155 } |
| 157 | 156 |
| 158 } // namespace | 157 } // namespace |
| OLD | NEW |