| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 75 |
| 76 PassRefPtr<HTMLOptionsCollection> options(); | 76 PassRefPtr<HTMLOptionsCollection> options(); |
| 77 PassRefPtr<HTMLCollection> selectedOptions(); | 77 PassRefPtr<HTMLCollection> selectedOptions(); |
| 78 | 78 |
| 79 void optionElementChildrenChanged(); | 79 void optionElementChildrenChanged(); |
| 80 | 80 |
| 81 void setRecalcListItems(); | 81 void setRecalcListItems(); |
| 82 void invalidateSelectedItems(); | 82 void invalidateSelectedItems(); |
| 83 void updateListItemSelectedStates(); | 83 void updateListItemSelectedStates(); |
| 84 | 84 |
| 85 const Vector<HTMLElement*>& listItems() const; | 85 const WillBeHeapVector<RawPtrWillBeMember<HTMLElement> >& listItems() const; |
| 86 | 86 |
| 87 virtual void accessKeyAction(bool sendMouseEvents) OVERRIDE; | 87 virtual void accessKeyAction(bool sendMouseEvents) OVERRIDE; |
| 88 void accessKeySetSelectedIndex(int); | 88 void accessKeySetSelectedIndex(int); |
| 89 | 89 |
| 90 void setMultiple(bool); | 90 void setMultiple(bool); |
| 91 | 91 |
| 92 void setSize(int); | 92 void setSize(int); |
| 93 | 93 |
| 94 void setOption(unsigned index, HTMLOptionElement*, ExceptionState&); | 94 void setOption(unsigned index, HTMLOptionElement*, ExceptionState&); |
| 95 void setLength(unsigned, ExceptionState&); | 95 void setLength(unsigned, ExceptionState&); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 107 void listBoxOnChange(); | 107 void listBoxOnChange(); |
| 108 int optionToListIndex(int optionIndex) const; | 108 int optionToListIndex(int optionIndex) const; |
| 109 int activeSelectionStartListIndex() const; | 109 int activeSelectionStartListIndex() const; |
| 110 int activeSelectionEndListIndex() const; | 110 int activeSelectionEndListIndex() const; |
| 111 void setActiveSelectionAnchorIndex(int); | 111 void setActiveSelectionAnchorIndex(int); |
| 112 void setActiveSelectionEndIndex(int); | 112 void setActiveSelectionEndIndex(int); |
| 113 void updateListBoxSelection(bool deselectOtherOptions); | 113 void updateListBoxSelection(bool deselectOtherOptions); |
| 114 | 114 |
| 115 // For use in the implementation of HTMLOptionElement. | 115 // For use in the implementation of HTMLOptionElement. |
| 116 void optionSelectionStateChanged(HTMLOptionElement*, bool optionIsSelected); | 116 void optionSelectionStateChanged(HTMLOptionElement*, bool optionIsSelected); |
| 117 bool anonymousIndexedSetter(unsigned, PassRefPtr<HTMLOptionElement>, Excepti
onState&); | 117 bool anonymousIndexedSetter(unsigned, PassRefPtrWillBeRawPtr<HTMLOptionEleme
nt>, ExceptionState&); |
| 118 | 118 |
| 119 void updateListOnRenderer(); | 119 void updateListOnRenderer(); |
| 120 |
| 121 virtual void trace(Visitor*) OVERRIDE; |
| 122 |
| 120 protected: | 123 protected: |
| 121 HTMLSelectElement(Document&, HTMLFormElement*); | 124 HTMLSelectElement(Document&, HTMLFormElement*); |
| 122 | 125 |
| 123 private: | 126 private: |
| 124 virtual const AtomicString& formControlType() const OVERRIDE; | 127 virtual const AtomicString& formControlType() const OVERRIDE; |
| 125 | 128 |
| 126 virtual bool shouldShowFocusRingOnMouseFocus() const OVERRIDE; | 129 virtual bool shouldShowFocusRingOnMouseFocus() const OVERRIDE; |
| 127 | 130 |
| 128 virtual void dispatchFocusEvent(Element* oldFocusedElement, FocusType) OVERR
IDE; | 131 virtual void dispatchFocusEvent(Element* oldFocusedElement, FocusType) OVERR
IDE; |
| 129 virtual void dispatchBlurEvent(Element* newFocusedElemnet) OVERRIDE; | 132 virtual void dispatchBlurEvent(Element* newFocusedElemnet) OVERRIDE; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang
e = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE; | 194 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang
e = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE; |
| 192 virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; } | 195 virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; } |
| 193 virtual void finishParsingChildren() OVERRIDE; | 196 virtual void finishParsingChildren() OVERRIDE; |
| 194 | 197 |
| 195 // TypeAheadDataSource functions. | 198 // TypeAheadDataSource functions. |
| 196 virtual int indexOfSelectedOption() const OVERRIDE; | 199 virtual int indexOfSelectedOption() const OVERRIDE; |
| 197 virtual int optionCount() const OVERRIDE; | 200 virtual int optionCount() const OVERRIDE; |
| 198 virtual String optionAtIndex(int index) const OVERRIDE; | 201 virtual String optionAtIndex(int index) const OVERRIDE; |
| 199 | 202 |
| 200 // m_listItems contains HTMLOptionElement, HTMLOptGroupElement, and HTMLHREl
ement objects. | 203 // m_listItems contains HTMLOptionElement, HTMLOptGroupElement, and HTMLHREl
ement objects. |
| 201 mutable Vector<HTMLElement*> m_listItems; | 204 mutable WillBeHeapVector<RawPtrWillBeMember<HTMLElement> > m_listItems; |
| 202 Vector<bool> m_lastOnChangeSelection; | 205 Vector<bool> m_lastOnChangeSelection; |
| 203 Vector<bool> m_cachedStateForActiveSelection; | 206 Vector<bool> m_cachedStateForActiveSelection; |
| 204 TypeAhead m_typeAhead; | 207 TypeAhead m_typeAhead; |
| 205 int m_size; | 208 int m_size; |
| 206 int m_lastOnChangeIndex; | 209 int m_lastOnChangeIndex; |
| 207 int m_activeSelectionAnchorIndex; | 210 int m_activeSelectionAnchorIndex; |
| 208 int m_activeSelectionEndIndex; | 211 int m_activeSelectionEndIndex; |
| 209 bool m_isProcessingUserDrivenChange; | 212 bool m_isProcessingUserDrivenChange; |
| 210 bool m_multiple; | 213 bool m_multiple; |
| 211 bool m_activeSelectionState; | 214 bool m_activeSelectionState; |
| 212 mutable bool m_shouldRecalcListItems; | 215 mutable bool m_shouldRecalcListItems; |
| 213 int m_suggestedIndex; | 216 int m_suggestedIndex; |
| 214 }; | 217 }; |
| 215 | 218 |
| 216 } // namespace | 219 } // namespace |
| 217 | 220 |
| 218 #endif | 221 #endif |
| OLD | NEW |