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 21 matching lines...) Expand all Loading... |
32 class ExceptionState; | 32 class ExceptionState; |
33 class HTMLDataListElement; | 33 class HTMLDataListElement; |
34 class HTMLSelectElement; | 34 class HTMLSelectElement; |
35 | 35 |
36 class HTMLOptionElement FINAL : public HTMLElement { | 36 class HTMLOptionElement FINAL : public HTMLElement { |
37 public: | 37 public: |
38 static PassRefPtr<HTMLOptionElement> create(Document&); | 38 static PassRefPtr<HTMLOptionElement> create(Document&); |
39 static PassRefPtr<HTMLOptionElement> createForJSConstructor(Document&, const
String& data, const AtomicString& value, | 39 static PassRefPtr<HTMLOptionElement> createForJSConstructor(Document&, const
String& data, const AtomicString& value, |
40 bool defaultSelected, bool selected, ExceptionState&); | 40 bool defaultSelected, bool selected, ExceptionState&); |
41 | 41 |
42 virtual String text() const; | 42 String text() const; |
43 void setText(const String&, ExceptionState&); | 43 void setText(const String&, ExceptionState&); |
44 | 44 |
45 int index() const; | 45 int index() const; |
46 | 46 |
47 String value() const; | 47 String value() const; |
48 void setValue(const AtomicString&); | 48 void setValue(const AtomicString&); |
49 | 49 |
50 bool selected(); | 50 bool selected(); |
51 void setSelected(bool); | 51 void setSelected(bool); |
52 | 52 |
(...skipping 10 matching lines...) Expand all Loading... |
63 String textIndentedToRespectGroupLabel() const; | 63 String textIndentedToRespectGroupLabel() const; |
64 | 64 |
65 void setSelectedState(bool); | 65 void setSelectedState(bool); |
66 | 66 |
67 HTMLFormElement* form() const; | 67 HTMLFormElement* form() const; |
68 | 68 |
69 private: | 69 private: |
70 explicit HTMLOptionElement(Document&); | 70 explicit HTMLOptionElement(Document&); |
71 | 71 |
72 virtual bool rendererIsFocusable() const OVERRIDE; | 72 virtual bool rendererIsFocusable() const OVERRIDE; |
73 virtual bool rendererIsNeeded(const RenderStyle&) { return false; } | 73 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE { return false; } |
74 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; | 74 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; |
75 virtual void detach(const AttachContext& = AttachContext()) OVERRIDE; | 75 virtual void detach(const AttachContext& = AttachContext()) OVERRIDE; |
76 | 76 |
77 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 77 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
78 | 78 |
79 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; | 79 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; |
80 virtual void accessKeyAction(bool); | 80 virtual void accessKeyAction(bool) OVERRIDE; |
81 | 81 |
82 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang
e = 0, Node* afterChange = 0, int childCountDelta = 0); | 82 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang
e = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE; |
83 | 83 |
84 // <option> never has a renderer so we manually manage a cached style. | 84 // <option> never has a renderer so we manually manage a cached style. |
85 void updateNonRenderStyle(); | 85 void updateNonRenderStyle(); |
86 virtual RenderStyle* nonRendererStyle() const OVERRIDE; | 86 virtual RenderStyle* nonRendererStyle() const OVERRIDE; |
87 virtual PassRefPtr<RenderStyle> customStyleForRenderer() OVERRIDE; | 87 virtual PassRefPtr<RenderStyle> customStyleForRenderer() OVERRIDE; |
88 | 88 |
89 void didRecalcStyle(StyleRecalcChange) OVERRIDE; | 89 virtual void didRecalcStyle(StyleRecalcChange) OVERRIDE; |
90 void willRecalcStyle(StyleRecalcChange) OVERRIDE; | 90 virtual void willRecalcStyle(StyleRecalcChange) OVERRIDE; |
91 | 91 |
92 String collectOptionInnerText() const; | 92 String collectOptionInnerText() const; |
93 | 93 |
94 bool m_disabled; | 94 bool m_disabled; |
95 bool m_isSelected; | 95 bool m_isSelected; |
96 RefPtr<RenderStyle> m_style; | 96 RefPtr<RenderStyle> m_style; |
97 }; | 97 }; |
98 | 98 |
99 DEFINE_NODE_TYPE_CASTS(HTMLOptionElement, hasTagName(HTMLNames::optionTag)); | 99 DEFINE_NODE_TYPE_CASTS(HTMLOptionElement, hasTagName(HTMLNames::optionTag)); |
100 | 100 |
101 } // namespace WebCore | 101 } // namespace WebCore |
102 | 102 |
103 #endif | 103 #endif |
OLD | NEW |