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) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2010, 2011 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2010, 2011 Apple Inc. All rights reserved. |
6 * Copyright (C) 2010 Google Inc. All rights reserved. | 6 * Copyright (C) 2010 Google Inc. All rights reserved. |
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 HTMLDataListElement* ownerDataListElement() const; | 54 HTMLDataListElement* ownerDataListElement() const; |
55 #endif | 55 #endif |
56 HTMLSelectElement* ownerSelectElement() const; | 56 HTMLSelectElement* ownerSelectElement() const; |
57 | 57 |
58 String label() const; | 58 String label() const; |
59 void setLabel(const String&); | 59 void setLabel(const String&); |
60 | 60 |
61 bool ownElementDisabled() const { return m_disabled; } | 61 bool ownElementDisabled() const { return m_disabled; } |
62 | 62 |
63 virtual bool isDisabledFormControl() const OVERRIDE; | 63 virtual bool isDisabledFormControl() const OVERRIDE; |
| 64 virtual PassRefPtr<RenderStyle> customStyleForRenderer() OVERRIDE; |
64 | 65 |
65 String textIndentedToRespectGroupLabel() const; | 66 String textIndentedToRespectGroupLabel() const; |
66 | 67 |
67 void setSelectedState(bool); | 68 void setSelectedState(bool); |
68 | 69 |
69 private: | 70 private: |
70 HTMLOptionElement(const QualifiedName&, Document*); | 71 HTMLOptionElement(const QualifiedName&, Document*); |
71 | 72 |
72 virtual bool supportsFocus() const; | 73 virtual bool supportsFocus() const; |
73 virtual bool isFocusable() const; | 74 virtual bool isFocusable() const; |
74 virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; } | |
75 virtual void attach(); | |
76 virtual void detach(); | |
77 | 75 |
78 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 76 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
79 | 77 |
80 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; | 78 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; |
81 virtual void accessKeyAction(bool); | 79 virtual void accessKeyAction(bool); |
82 | 80 |
83 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang
e = 0, Node* afterChange = 0, int childCountDelta = 0); | 81 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang
e = 0, Node* afterChange = 0, int childCountDelta = 0); |
84 | 82 |
85 // <option> never has a renderer so we manually manage a cached style. | |
86 void updateNonRenderStyle(); | |
87 virtual RenderStyle* nonRendererStyle() const OVERRIDE; | |
88 virtual PassRefPtr<RenderStyle> customStyleForRenderer() OVERRIDE; | |
89 | |
90 void didRecalcStyle(StyleChange) OVERRIDE; | |
91 | |
92 String collectOptionInnerText() const; | 83 String collectOptionInnerText() const; |
| 84 void updateLabel(); |
93 | 85 |
94 bool m_disabled; | 86 bool m_disabled; |
95 bool m_isSelected; | 87 bool m_isSelected; |
96 RefPtr<RenderStyle> m_style; | |
97 }; | 88 }; |
98 | 89 |
99 HTMLOptionElement* toHTMLOptionElement(Node*); | 90 HTMLOptionElement* toHTMLOptionElement(Node*); |
100 const HTMLOptionElement* toHTMLOptionElement(const Node*); | 91 const HTMLOptionElement* toHTMLOptionElement(const Node*); |
101 void toHTMLOptionElement(const HTMLOptionElement*); // This overload will catch
anyone doing an unnecessary cast. | 92 void toHTMLOptionElement(const HTMLOptionElement*); // This overload will catch
anyone doing an unnecessary cast. |
102 | 93 |
103 #ifdef NDEBUG | 94 #ifdef NDEBUG |
104 | 95 |
105 // The debug versions of these, with assertions, are not inlined. | 96 // The debug versions of these, with assertions, are not inlined. |
106 | 97 |
107 inline HTMLOptionElement* toHTMLOptionElement(Node* node) | 98 inline HTMLOptionElement* toHTMLOptionElement(Node* node) |
108 { | 99 { |
109 return static_cast<HTMLOptionElement*>(node); | 100 return static_cast<HTMLOptionElement*>(node); |
110 } | 101 } |
111 | 102 |
112 inline const HTMLOptionElement* toHTMLOptionElement(const Node* node) | 103 inline const HTMLOptionElement* toHTMLOptionElement(const Node* node) |
113 { | 104 { |
114 return static_cast<const HTMLOptionElement*>(node); | 105 return static_cast<const HTMLOptionElement*>(node); |
115 } | 106 } |
116 | 107 |
117 #endif | 108 #endif |
118 | 109 |
119 } // namespace | 110 } // namespace |
120 | 111 |
121 #endif | 112 #endif |
OLD | NEW |