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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 { | 51 { |
52 return fastHasAttribute(disabledAttr); | 52 return fastHasAttribute(disabledAttr); |
53 } | 53 } |
54 | 54 |
55 bool HTMLOptGroupElement::rendererIsFocusable() const | 55 bool HTMLOptGroupElement::rendererIsFocusable() const |
56 { | 56 { |
57 // 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. |
58 return renderStyle() && renderStyle()->display() != NONE; | 58 return renderStyle() && renderStyle()->display() != NONE; |
59 } | 59 } |
60 | 60 |
61 const AtomicString& HTMLOptGroupElement::formControlType() const | |
62 { | |
63 DEFINE_STATIC_LOCAL(const AtomicString, optgroup, ("optgroup", AtomicString:
:ConstructFromLiteral)); | |
64 return optgroup; | |
65 } | |
66 | |
67 void HTMLOptGroupElement::childrenChanged(bool changedByParser, Node* beforeChan
ge, Node* afterChange, int childCountDelta) | 61 void HTMLOptGroupElement::childrenChanged(bool changedByParser, Node* beforeChan
ge, Node* afterChange, int childCountDelta) |
68 { | 62 { |
69 recalcSelectOptions(); | 63 recalcSelectOptions(); |
70 HTMLElement::childrenChanged(changedByParser, beforeChange, afterChange, chi
ldCountDelta); | 64 HTMLElement::childrenChanged(changedByParser, beforeChange, afterChange, chi
ldCountDelta); |
71 } | 65 } |
72 | 66 |
73 void HTMLOptGroupElement::parseAttribute(const QualifiedName& name, const Atomic
String& value) | 67 void HTMLOptGroupElement::parseAttribute(const QualifiedName& name, const Atomic
String& value) |
74 { | 68 { |
75 HTMLElement::parseAttribute(name, value); | 69 HTMLElement::parseAttribute(name, value); |
76 recalcSelectOptions(); | 70 recalcSelectOptions(); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 | 141 |
148 void HTMLOptGroupElement::accessKeyAction(bool) | 142 void HTMLOptGroupElement::accessKeyAction(bool) |
149 { | 143 { |
150 HTMLSelectElement* select = ownerSelectElement(); | 144 HTMLSelectElement* select = ownerSelectElement(); |
151 // send to the parent to bring focus to the list box | 145 // send to the parent to bring focus to the list box |
152 if (select && !select->focused()) | 146 if (select && !select->focused()) |
153 select->accessKeyAction(false); | 147 select->accessKeyAction(false); |
154 } | 148 } |
155 | 149 |
156 } // namespace | 150 } // namespace |
OLD | NEW |