| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 String value() const; | 83 String value() const; |
| 84 void setValue(const String&, bool sendEvents = false); | 84 void setValue(const String&, bool sendEvents = false); |
| 85 String suggestedValue() const; | 85 String suggestedValue() const; |
| 86 void setSuggestedValue(const String&); | 86 void setSuggestedValue(const String&); |
| 87 | 87 |
| 88 HTMLOptionsCollection* options(); | 88 HTMLOptionsCollection* options(); |
| 89 HTMLCollection* selectedOptions(); | 89 HTMLCollection* selectedOptions(); |
| 90 | 90 |
| 91 void optionElementChildrenChanged(const HTMLOptionElement&); | 91 void optionElementChildrenChanged(const HTMLOptionElement&); |
| 92 | 92 |
| 93 void setRecalcListItems(); | |
| 94 void invalidateSelectedItems(); | 93 void invalidateSelectedItems(); |
| 95 | 94 |
| 96 using ListItems = HeapVector<Member<HTMLElement>>; | 95 using ListItems = HeapVector<Member<HTMLElement>>; |
| 97 const ListItems& listItems() const; | 96 const ListItems& listItems() const; |
| 98 | 97 |
| 99 void accessKeyAction(bool sendMouseEvents) override; | 98 void accessKeyAction(bool sendMouseEvents) override; |
| 100 void accessKeySetSelectedIndex(int); | 99 void accessKeySetSelectedIndex(int); |
| 101 | 100 |
| 102 void setOption(unsigned index, HTMLOptionElement*, ExceptionState&); | 101 void setOption(unsigned index, HTMLOptionElement*, ExceptionState&); |
| 103 | 102 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 115 void listBoxOnChange(); | 114 void listBoxOnChange(); |
| 116 int optionToListIndex(int optionIndex) const; | 115 int optionToListIndex(int optionIndex) const; |
| 117 int activeSelectionEndListIndex() const; | 116 int activeSelectionEndListIndex() const; |
| 118 HTMLOptionElement* activeSelectionEnd() const; | 117 HTMLOptionElement* activeSelectionEnd() const; |
| 119 void setActiveSelectionAnchor(HTMLOptionElement*); | 118 void setActiveSelectionAnchor(HTMLOptionElement*); |
| 120 void setActiveSelectionEnd(HTMLOptionElement*); | 119 void setActiveSelectionEnd(HTMLOptionElement*); |
| 121 | 120 |
| 122 // For use in the implementation of HTMLOptionElement. | 121 // For use in the implementation of HTMLOptionElement. |
| 123 void optionSelectionStateChanged(HTMLOptionElement*, bool optionIsSelected); | 122 void optionSelectionStateChanged(HTMLOptionElement*, bool optionIsSelected); |
| 124 void optionInserted(HTMLOptionElement&, bool optionIsSelected); | 123 void optionInserted(HTMLOptionElement&, bool optionIsSelected); |
| 125 void optionRemoved(const HTMLOptionElement&); | 124 void optionRemoved(HTMLOptionElement&); |
| 126 bool anonymousIndexedSetter(unsigned, HTMLOptionElement*, ExceptionState&); | 125 bool anonymousIndexedSetter(unsigned, HTMLOptionElement*, ExceptionState&); |
| 127 | 126 |
| 128 void optGroupInsertedOrRemoved(const HTMLOptGroupElement&); | 127 void optGroupInsertedOrRemoved(HTMLOptGroupElement&); |
| 129 void hrInsertedOrRemoved(const HTMLHRElement&); | 128 void hrInsertedOrRemoved(HTMLHRElement&); |
| 130 | 129 |
| 131 void updateListOnLayoutObject(); | 130 void updateListOnLayoutObject(); |
| 132 | 131 |
| 133 HTMLOptionElement* spatialNavigationFocusedOption(); | 132 HTMLOptionElement* spatialNavigationFocusedOption(); |
| 134 void handleMouseRelease(); | 133 void handleMouseRelease(); |
| 135 | 134 |
| 136 int listIndexForOption(const HTMLOptionElement&); | 135 int listIndexForOption(const HTMLOptionElement&); |
| 137 | 136 |
| 138 // Helper functions for popup menu implementations. | 137 // Helper functions for popup menu implementations. |
| 139 String itemText(const Element&) const; | 138 String itemText(const Element&) const; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 LayoutObject* createLayoutObject(const ComputedStyle&) override; | 189 LayoutObject* createLayoutObject(const ComputedStyle&) override; |
| 191 void didRecalcStyle(StyleRecalcChange) override; | 190 void didRecalcStyle(StyleRecalcChange) override; |
| 192 void detach(const AttachContext& = AttachContext()) override; | 191 void detach(const AttachContext& = AttachContext()) override; |
| 193 void appendToFormData(FormData&) override; | 192 void appendToFormData(FormData&) override; |
| 194 void didAddUserAgentShadowRoot(ShadowRoot&) override; | 193 void didAddUserAgentShadowRoot(ShadowRoot&) override; |
| 195 | 194 |
| 196 void defaultEventHandler(Event*) override; | 195 void defaultEventHandler(Event*) override; |
| 197 | 196 |
| 198 void dispatchInputAndChangeEventForMenuList(); | 197 void dispatchInputAndChangeEventForMenuList(); |
| 199 | 198 |
| 199 // |subject| is an element which was inserted or removed. |
| 200 void setRecalcListItems(HTMLElement& subject); |
| 200 void recalcListItems() const; | 201 void recalcListItems() const; |
| 201 enum ResetReason { | 202 enum ResetReason { |
| 202 ResetReasonSelectedOptionRemoved, | 203 ResetReasonSelectedOptionRemoved, |
| 203 ResetReasonOthers | 204 ResetReasonOthers |
| 204 }; | 205 }; |
| 205 void resetToDefaultSelection(ResetReason = ResetReasonOthers); | 206 void resetToDefaultSelection(ResetReason = ResetReasonOthers); |
| 206 void typeAheadFind(KeyboardEvent*); | 207 void typeAheadFind(KeyboardEvent*); |
| 207 void saveLastSelection(); | 208 void saveLastSelection(); |
| 208 void saveListboxActiveSelection(); | 209 void saveListboxActiveSelection(); |
| 209 // Returns the first selected OPTION, or nullptr. | 210 // Returns the first selected OPTION, or nullptr. |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 | 288 |
| 288 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, FirstSelectableOption); | 289 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, FirstSelectableOption); |
| 289 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, LastSelectableOption); | 290 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, LastSelectableOption); |
| 290 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, NextSelectableOption); | 291 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, NextSelectableOption); |
| 291 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, PreviousSelectableOption); | 292 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, PreviousSelectableOption); |
| 292 }; | 293 }; |
| 293 | 294 |
| 294 } // namespace blink | 295 } // namespace blink |
| 295 | 296 |
| 296 #endif // HTMLSelectElement_h | 297 #endif // HTMLSelectElement_h |
| OLD | NEW |