Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLSelectElement.h

Issue 2110003002: Improve performance of HTMLSelectElement::resetToDefaultSelection(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 bool isRequiredFormControl() const override; 207 bool isRequiredFormControl() const override;
208 208
209 bool hasPlaceholderLabelOption() const; 209 bool hasPlaceholderLabelOption() const;
210 210
211 enum SelectOptionFlag { 211 enum SelectOptionFlag {
212 DeselectOtherOptions = 1 << 0, 212 DeselectOtherOptions = 1 << 0,
213 DispatchInputAndChangeEvent = 1 << 1, 213 DispatchInputAndChangeEvent = 1 << 1,
214 MakeOptionDirty = 1 << 2, 214 MakeOptionDirty = 1 << 2,
215 }; 215 };
216 typedef unsigned SelectOptionFlags; 216 typedef unsigned SelectOptionFlags;
217 void selectOption(int optionIndex, SelectOptionFlags = 0); 217 void selectOption(int optionIndex, SelectOptionFlags);
218 void selectOption(HTMLOptionElement*, SelectOptionFlags = 0); 218 void selectOption(HTMLOptionElement*, SelectOptionFlags);
219 void selectOption(HTMLOptionElement*, int optionIndex, SelectOptionFlags); 219 void selectOption(HTMLOptionElement*, int optionIndex, SelectOptionFlags);
220 void deselectItemsWithoutValidation(HTMLElement* elementToExclude = 0); 220 void deselectItemsWithoutValidation(HTMLElement* elementToExclude = 0);
221 void parseMultipleAttribute(const AtomicString&); 221 void parseMultipleAttribute(const AtomicString&);
222 HTMLOptionElement* lastSelectedOption() const; 222 HTMLOptionElement* lastSelectedOption() const;
223 void updateSelectedState(HTMLOptionElement*, bool multi, bool shift); 223 void updateSelectedState(HTMLOptionElement*, bool multi, bool shift);
224 void menuListDefaultEventHandler(Event*); 224 void menuListDefaultEventHandler(Event*);
225 void handlePopupOpenKeyboardEvent(Event*); 225 void handlePopupOpenKeyboardEvent(Event*);
226 bool shouldOpenPopupForKeyDownEvent(KeyboardEvent*); 226 bool shouldOpenPopupForKeyDownEvent(KeyboardEvent*);
227 bool shouldOpenPopupForKeyPressEvent(KeyboardEvent*); 227 bool shouldOpenPopupForKeyPressEvent(KeyboardEvent*);
228 void listBoxDefaultEventHandler(Event*); 228 void listBoxDefaultEventHandler(Event*);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 282
283 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, FirstSelectableOption); 283 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, FirstSelectableOption);
284 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, LastSelectableOption); 284 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, LastSelectableOption);
285 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, NextSelectableOption); 285 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, NextSelectableOption);
286 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, PreviousSelectableOption); 286 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, PreviousSelectableOption);
287 }; 287 };
288 288
289 } // namespace blink 289 } // namespace blink
290 290
291 #endif // HTMLSelectElement_h 291 #endif // HTMLSelectElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698