OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
4 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 4 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
5 * (C) 2000 Dirk Mueller (mueller@kde.org) | 5 * (C) 2000 Dirk Mueller (mueller@kde.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights
reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights
reserved. |
7 * Copyright (C) 2010 Google Inc. All rights reserved. | 7 * Copyright (C) 2010 Google Inc. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 int activeSelectionStartListIndex() const; | 108 int activeSelectionStartListIndex() const; |
109 int activeSelectionEndListIndex() const; | 109 int activeSelectionEndListIndex() const; |
110 void setActiveSelectionAnchorIndex(int); | 110 void setActiveSelectionAnchorIndex(int); |
111 void setActiveSelectionEndIndex(int); | 111 void setActiveSelectionEndIndex(int); |
112 void updateListBoxSelection(bool deselectOtherOptions); | 112 void updateListBoxSelection(bool deselectOtherOptions); |
113 | 113 |
114 // For use in the implementation of HTMLOptionElement. | 114 // For use in the implementation of HTMLOptionElement. |
115 void optionSelectionStateChanged(HTMLOptionElement*, bool optionIsSelected); | 115 void optionSelectionStateChanged(HTMLOptionElement*, bool optionIsSelected); |
116 bool anonymousIndexedSetter(unsigned, PassRefPtr<HTMLOptionElement>, Excepti
onState&); | 116 bool anonymousIndexedSetter(unsigned, PassRefPtr<HTMLOptionElement>, Excepti
onState&); |
117 | 117 |
| 118 void updateListOnRenderer(); |
118 protected: | 119 protected: |
119 HTMLSelectElement(Document&, HTMLFormElement*); | 120 HTMLSelectElement(Document&, HTMLFormElement*); |
120 | 121 |
121 private: | 122 private: |
122 virtual const AtomicString& formControlType() const OVERRIDE; | 123 virtual const AtomicString& formControlType() const OVERRIDE; |
123 | 124 |
124 virtual bool shouldShowFocusRingOnMouseFocus() const OVERRIDE; | 125 virtual bool shouldShowFocusRingOnMouseFocus() const OVERRIDE; |
125 | 126 |
126 virtual void dispatchFocusEvent(Element* oldFocusedElement, FocusType) OVERR
IDE; | 127 virtual void dispatchFocusEvent(Element* oldFocusedElement, FocusType) OVERR
IDE; |
127 virtual void dispatchBlurEvent(Element* newFocusedElemnet) OVERRIDE; | 128 virtual void dispatchBlurEvent(Element* newFocusedElemnet) OVERRIDE; |
(...skipping 20 matching lines...) Expand all Loading... |
148 | 149 |
149 void recalcListItems(bool updateSelectedStates = true) const; | 150 void recalcListItems(bool updateSelectedStates = true) const; |
150 | 151 |
151 void typeAheadFind(KeyboardEvent*); | 152 void typeAheadFind(KeyboardEvent*); |
152 void saveLastSelection(); | 153 void saveLastSelection(); |
153 | 154 |
154 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; | 155 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; |
155 | 156 |
156 virtual bool isOptionalFormControl() const OVERRIDE { return !isRequiredForm
Control(); } | 157 virtual bool isOptionalFormControl() const OVERRIDE { return !isRequiredForm
Control(); } |
157 virtual bool isRequiredFormControl() const OVERRIDE; | 158 virtual bool isRequiredFormControl() const OVERRIDE; |
| 159 virtual void didRecalcStyle(StyleRecalcChange) OVERRIDE; |
158 | 160 |
159 bool hasPlaceholderLabelOption() const; | 161 bool hasPlaceholderLabelOption() const; |
160 | 162 |
161 enum SelectOptionFlag { | 163 enum SelectOptionFlag { |
162 DeselectOtherOptions = 1 << 0, | 164 DeselectOtherOptions = 1 << 0, |
163 DispatchInputAndChangeEvent = 1 << 1, | 165 DispatchInputAndChangeEvent = 1 << 1, |
164 UserDriven = 1 << 2, | 166 UserDriven = 1 << 2, |
165 }; | 167 }; |
166 typedef unsigned SelectOptionFlags; | 168 typedef unsigned SelectOptionFlags; |
167 void selectOption(int optionIndex, SelectOptionFlags = 0); | 169 void selectOption(int optionIndex, SelectOptionFlags = 0); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 bool m_isProcessingUserDrivenChange; | 209 bool m_isProcessingUserDrivenChange; |
208 bool m_multiple; | 210 bool m_multiple; |
209 bool m_activeSelectionState; | 211 bool m_activeSelectionState; |
210 mutable bool m_shouldRecalcListItems; | 212 mutable bool m_shouldRecalcListItems; |
211 int m_suggestedIndex; | 213 int m_suggestedIndex; |
212 }; | 214 }; |
213 | 215 |
214 } // namespace | 216 } // namespace |
215 | 217 |
216 #endif | 218 #endif |
OLD | NEW |