| 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 void handlePopupOpenKeyboardEvent(Event*); | 234 void handlePopupOpenKeyboardEvent(Event*); |
| 235 bool shouldOpenPopupForKeyDownEvent(KeyboardEvent*); | 235 bool shouldOpenPopupForKeyDownEvent(KeyboardEvent*); |
| 236 bool shouldOpenPopupForKeyPressEvent(KeyboardEvent*); | 236 bool shouldOpenPopupForKeyPressEvent(KeyboardEvent*); |
| 237 void listBoxDefaultEventHandler(Event*); | 237 void listBoxDefaultEventHandler(Event*); |
| 238 void setOptionsChangedOnLayoutObject(); | 238 void setOptionsChangedOnLayoutObject(); |
| 239 size_t searchOptionsForValue(const String&, size_t listIndexStart, size_t li
stIndexEnd) const; | 239 size_t searchOptionsForValue(const String&, size_t listIndexStart, size_t li
stIndexEnd) const; |
| 240 void updateListBoxSelection(bool deselectOtherOptions, bool scroll = true); | 240 void updateListBoxSelection(bool deselectOtherOptions, bool scroll = true); |
| 241 void setIndexToSelectOnCancel(int listIndex); | 241 void setIndexToSelectOnCancel(int listIndex); |
| 242 void setSuggestedOption(HTMLOptionElement*); | 242 void setSuggestedOption(HTMLOptionElement*); |
| 243 | 243 |
| 244 // Returns nullptr if listIndex is out of bounds, or it doesn't point an |
| 245 // HTMLOptionElement. |
| 246 HTMLOptionElement* optionAtListIndex(int listIndex) const; |
| 244 enum SkipDirection { | 247 enum SkipDirection { |
| 245 SkipBackwards = -1, | 248 SkipBackwards = -1, |
| 246 SkipForwards = 1 | 249 SkipForwards = 1 |
| 247 }; | 250 }; |
| 248 HTMLOptionElement* nextValidOption(int listIndex, SkipDirection, int skip) c
onst; | 251 HTMLOptionElement* nextValidOption(int listIndex, SkipDirection, int skip) c
onst; |
| 249 HTMLOptionElement* nextSelectableOption(HTMLOptionElement*) const; | 252 HTMLOptionElement* nextSelectableOption(HTMLOptionElement*) const; |
| 250 HTMLOptionElement* previousSelectableOption(HTMLOptionElement*) const; | 253 HTMLOptionElement* previousSelectableOption(HTMLOptionElement*) const; |
| 251 HTMLOptionElement* firstSelectableOption() const; | 254 HTMLOptionElement* firstSelectableOption() const; |
| 252 HTMLOptionElement* lastSelectableOption() const; | 255 HTMLOptionElement* lastSelectableOption() const; |
| 253 HTMLOptionElement* nextSelectableOptionPageAway(HTMLOptionElement*, SkipDire
ction) const; | 256 HTMLOptionElement* nextSelectableOptionPageAway(HTMLOptionElement*, SkipDire
ction) const; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 | 294 |
| 292 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, FirstSelectableOption); | 295 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, FirstSelectableOption); |
| 293 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, LastSelectableOption); | 296 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, LastSelectableOption); |
| 294 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, NextSelectableOption); | 297 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, NextSelectableOption); |
| 295 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, PreviousSelectableOption); | 298 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, PreviousSelectableOption); |
| 296 }; | 299 }; |
| 297 | 300 |
| 298 } // namespace blink | 301 } // namespace blink |
| 299 | 302 |
| 300 #endif // HTMLSelectElement_h | 303 #endif // HTMLSelectElement_h |
| OLD | NEW |