| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 // A popup is canceled when the popup was hidden without selecting an item. | 145 // A popup is canceled when the popup was hidden without selecting an item. |
| 146 void popupDidCancel(); | 146 void popupDidCancel(); |
| 147 // Provisional selection is a selection made using arrow keys or type ahead. | 147 // Provisional selection is a selection made using arrow keys or type ahead. |
| 148 void provisionalSelectionChanged(unsigned); | 148 void provisionalSelectionChanged(unsigned); |
| 149 void popupDidHide(); | 149 void popupDidHide(); |
| 150 bool popupIsVisible() const { return m_popupIsVisible; } | 150 bool popupIsVisible() const { return m_popupIsVisible; } |
| 151 int optionIndexToBeShown() const; | 151 int optionIndexToBeShown() const; |
| 152 void showPopup(); | 152 void showPopup(); |
| 153 void hidePopup(); | 153 void hidePopup(); |
| 154 PopupMenu* popup() const { return m_popup.get(); } | 154 PopupMenu* popup() const { return m_popup.get(); } |
| 155 void didMutateSubtree(); |
| 155 | 156 |
| 156 void resetTypeAheadSessionForTesting(); | 157 void resetTypeAheadSessionForTesting(); |
| 157 | 158 |
| 158 DECLARE_VIRTUAL_TRACE(); | 159 DECLARE_VIRTUAL_TRACE(); |
| 159 | 160 |
| 160 protected: | 161 protected: |
| 161 HTMLSelectElement(Document&, HTMLFormElement*); | 162 HTMLSelectElement(Document&, HTMLFormElement*); |
| 162 | 163 |
| 163 private: | 164 private: |
| 164 const AtomicString& formControlType() const override; | 165 const AtomicString& formControlType() const override; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 | 243 |
| 243 void childrenChanged(const ChildrenChange&) override; | 244 void childrenChanged(const ChildrenChange&) override; |
| 244 bool areAuthorShadowsAllowed() const override { return false; } | 245 bool areAuthorShadowsAllowed() const override { return false; } |
| 245 void finishParsingChildren() override; | 246 void finishParsingChildren() override; |
| 246 | 247 |
| 247 // TypeAheadDataSource functions. | 248 // TypeAheadDataSource functions. |
| 248 int indexOfSelectedOption() const override; | 249 int indexOfSelectedOption() const override; |
| 249 int optionCount() const override; | 250 int optionCount() const override; |
| 250 String optionAtIndex(int index) const override; | 251 String optionAtIndex(int index) const override; |
| 251 | 252 |
| 253 void observeTreeMutation(); |
| 254 void unobserveTreeMutation(); |
| 255 |
| 252 // m_listItems contains HTMLOptionElement, HTMLOptGroupElement, and | 256 // m_listItems contains HTMLOptionElement, HTMLOptGroupElement, and |
| 253 // HTMLHRElement objects. | 257 // HTMLHRElement objects. |
| 254 mutable ListItems m_listItems; | 258 mutable ListItems m_listItems; |
| 255 Vector<bool> m_lastOnChangeSelection; | 259 Vector<bool> m_lastOnChangeSelection; |
| 256 Vector<bool> m_cachedStateForActiveSelection; | 260 Vector<bool> m_cachedStateForActiveSelection; |
| 257 TypeAhead m_typeAhead; | 261 TypeAhead m_typeAhead; |
| 258 unsigned m_size; | 262 unsigned m_size; |
| 259 Member<HTMLOptionElement> m_lastOnChangeOption; | 263 Member<HTMLOptionElement> m_lastOnChangeOption; |
| 260 Member<HTMLOptionElement> m_activeSelectionAnchor; | 264 Member<HTMLOptionElement> m_activeSelectionAnchor; |
| 261 Member<HTMLOptionElement> m_activeSelectionEnd; | 265 Member<HTMLOptionElement> m_activeSelectionEnd; |
| 262 Member<HTMLOptionElement> m_optionToScrollTo; | 266 Member<HTMLOptionElement> m_optionToScrollTo; |
| 263 bool m_multiple; | 267 bool m_multiple; |
| 264 bool m_activeSelectionState; | 268 bool m_activeSelectionState; |
| 265 mutable bool m_shouldRecalcListItems; | 269 mutable bool m_shouldRecalcListItems; |
| 266 int m_suggestedIndex; | 270 int m_suggestedIndex; |
| 267 bool m_isAutofilledByPreview; | 271 bool m_isAutofilledByPreview; |
| 268 | 272 |
| 273 class PopupUpdater; |
| 274 Member<PopupUpdater> m_popupUpdater; |
| 269 Member<PopupMenu> m_popup; | 275 Member<PopupMenu> m_popup; |
| 270 int m_indexToSelectOnCancel; | 276 int m_indexToSelectOnCancel; |
| 271 bool m_popupIsVisible; | 277 bool m_popupIsVisible; |
| 272 | 278 |
| 273 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, FirstSelectableOption); | 279 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, FirstSelectableOption); |
| 274 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, LastSelectableOption); | 280 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, LastSelectableOption); |
| 275 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, NextSelectableOption); | 281 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, NextSelectableOption); |
| 276 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, PreviousSelectableOption); | 282 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, PreviousSelectableOption); |
| 277 }; | 283 }; |
| 278 | 284 |
| 279 } // namespace blink | 285 } // namespace blink |
| 280 | 286 |
| 281 #endif // HTMLSelectElement_h | 287 #endif // HTMLSelectElement_h |
| OLD | NEW |