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

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

Issue 2109993003: Remove redundant calls to HTMLSelectElement::setRecalcListItems(). (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 20 matching lines...) Expand all
31 #include "core/html/HTMLContentElement.h" 31 #include "core/html/HTMLContentElement.h"
32 #include "core/html/HTMLFormControlElementWithState.h" 32 #include "core/html/HTMLFormControlElementWithState.h"
33 #include "core/html/HTMLOptionsCollection.h" 33 #include "core/html/HTMLOptionsCollection.h"
34 #include "core/html/forms/TypeAhead.h" 34 #include "core/html/forms/TypeAhead.h"
35 #include "wtf/Vector.h" 35 #include "wtf/Vector.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 class AutoscrollController; 39 class AutoscrollController;
40 class ExceptionState; 40 class ExceptionState;
41 class HTMLHRElement;
42 class HTMLOptGroupElement;
41 class HTMLOptionElement; 43 class HTMLOptionElement;
42 class HTMLOptionElementOrHTMLOptGroupElement; 44 class HTMLOptionElementOrHTMLOptGroupElement;
43 class HTMLElementOrLong; 45 class HTMLElementOrLong;
44 class PopupMenu; 46 class PopupMenu;
45 47
46 class CORE_EXPORT HTMLSelectElement final : public HTMLFormControlElementWithSta te, private TypeAheadDataSource { 48 class CORE_EXPORT HTMLSelectElement final : public HTMLFormControlElementWithSta te, private TypeAheadDataSource {
47 DEFINE_WRAPPERTYPEINFO(); 49 DEFINE_WRAPPERTYPEINFO();
48 public: 50 public:
49 static HTMLSelectElement* create(Document&); 51 static HTMLSelectElement* create(Document&);
50 static HTMLSelectElement* create(Document&, HTMLFormElement*); 52 static HTMLSelectElement* create(Document&, HTMLFormElement*);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 HTMLOptionElement* activeSelectionEnd() const; 118 HTMLOptionElement* activeSelectionEnd() const;
117 void setActiveSelectionAnchor(HTMLOptionElement*); 119 void setActiveSelectionAnchor(HTMLOptionElement*);
118 void setActiveSelectionEnd(HTMLOptionElement*); 120 void setActiveSelectionEnd(HTMLOptionElement*);
119 121
120 // For use in the implementation of HTMLOptionElement. 122 // For use in the implementation of HTMLOptionElement.
121 void optionSelectionStateChanged(HTMLOptionElement*, bool optionIsSelected); 123 void optionSelectionStateChanged(HTMLOptionElement*, bool optionIsSelected);
122 void optionInserted(HTMLOptionElement&, bool optionIsSelected); 124 void optionInserted(HTMLOptionElement&, bool optionIsSelected);
123 void optionRemoved(const HTMLOptionElement&); 125 void optionRemoved(const HTMLOptionElement&);
124 bool anonymousIndexedSetter(unsigned, HTMLOptionElement*, ExceptionState&); 126 bool anonymousIndexedSetter(unsigned, HTMLOptionElement*, ExceptionState&);
125 127
128 void optGroupInsertedOrRemoved(const HTMLOptGroupElement&);
129 void hrInsertedOrRemoved(const HTMLHRElement&);
130
126 void updateListOnLayoutObject(); 131 void updateListOnLayoutObject();
127 132
128 HTMLOptionElement* spatialNavigationFocusedOption(); 133 HTMLOptionElement* spatialNavigationFocusedOption();
129 void handleMouseRelease(); 134 void handleMouseRelease();
130 135
131 int listIndexForOption(const HTMLOptionElement&); 136 int listIndexForOption(const HTMLOptionElement&);
132 137
133 // Helper functions for popup menu implementations. 138 // Helper functions for popup menu implementations.
134 String itemText(const Element&) const; 139 String itemText(const Element&) const;
135 bool itemIsDisplayNone(Element&) const; 140 bool itemIsDisplayNone(Element&) const;
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 HTMLOptionElement* nextValidOption(int listIndex, SkipDirection, int skip) c onst; 243 HTMLOptionElement* nextValidOption(int listIndex, SkipDirection, int skip) c onst;
239 HTMLOptionElement* nextSelectableOption(HTMLOptionElement*) const; 244 HTMLOptionElement* nextSelectableOption(HTMLOptionElement*) const;
240 HTMLOptionElement* previousSelectableOption(HTMLOptionElement*) const; 245 HTMLOptionElement* previousSelectableOption(HTMLOptionElement*) const;
241 HTMLOptionElement* firstSelectableOption() const; 246 HTMLOptionElement* firstSelectableOption() const;
242 HTMLOptionElement* lastSelectableOption() const; 247 HTMLOptionElement* lastSelectableOption() const;
243 HTMLOptionElement* nextSelectableOptionPageAway(HTMLOptionElement*, SkipDire ction) const; 248 HTMLOptionElement* nextSelectableOptionPageAway(HTMLOptionElement*, SkipDire ction) const;
244 HTMLOptionElement* eventTargetOption(const Event&); 249 HTMLOptionElement* eventTargetOption(const Event&);
245 AutoscrollController* autoscrollController() const; 250 AutoscrollController* autoscrollController() const;
246 void scrollToOptionTask(); 251 void scrollToOptionTask();
247 252
248 void childrenChanged(const ChildrenChange&) override;
249 bool areAuthorShadowsAllowed() const override { return false; } 253 bool areAuthorShadowsAllowed() const override { return false; }
250 void finishParsingChildren() override; 254 void finishParsingChildren() override;
251 255
252 // TypeAheadDataSource functions. 256 // TypeAheadDataSource functions.
253 int indexOfSelectedOption() const override; 257 int indexOfSelectedOption() const override;
254 int optionCount() const override; 258 int optionCount() const override;
255 String optionAtIndex(int index) const override; 259 String optionAtIndex(int index) const override;
256 260
257 void observeTreeMutation(); 261 void observeTreeMutation();
258 void unobserveTreeMutation(); 262 void unobserveTreeMutation();
(...skipping 23 matching lines...) Expand all
282 286
283 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, FirstSelectableOption); 287 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, FirstSelectableOption);
284 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, LastSelectableOption); 288 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, LastSelectableOption);
285 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, NextSelectableOption); 289 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, NextSelectableOption);
286 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, PreviousSelectableOption); 290 FRIEND_TEST_ALL_PREFIXES(HTMLSelectElementTest, PreviousSelectableOption);
287 }; 291 };
288 292
289 } // namespace blink 293 } // namespace blink
290 294
291 #endif // HTMLSelectElement_h 295 #endif // HTMLSelectElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698