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

Unified Diff: third_party/WebKit/Source/core/html/HTMLSelectElement.h

Issue 2131073002: SELECT element: Avoid to use listItems() in HTMLSelectElement::selectOption() (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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/HTMLSelectElement.h
diff --git a/third_party/WebKit/Source/core/html/HTMLSelectElement.h b/third_party/WebKit/Source/core/html/HTMLSelectElement.h
index 3bb86d98a562b404d507717fb25ebdbf3456b02f..37055b454d6717937550cdea26ec5860b2d3b4e0 100644
--- a/third_party/WebKit/Source/core/html/HTMLSelectElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLSelectElement.h
@@ -93,7 +93,7 @@ public:
// This is similar to |options| HTMLCollection. But this is safe in
// HTMLOptionElement::removedFrom() and insertedInto().
// OptionList supports only forward iteration.
- OptionList optionList() { return OptionList(*this); }
+ OptionList optionList() const { return OptionList(*this); }
void optionElementChildrenChanged(const HTMLOptionElement&);
@@ -204,8 +204,7 @@ private:
void dispatchInputAndChangeEventForMenuList();
- // |subject| is an element which was inserted or removed.
- void setRecalcListItems(HTMLElement& subject);
+ void setRecalcListItems();
void recalcListItems() const;
enum ResetReason {
ResetReasonSelectedOptionRemoved,
@@ -230,7 +229,7 @@ private:
};
typedef unsigned SelectOptionFlags;
void selectOption(HTMLOptionElement*, SelectOptionFlags);
- void deselectItemsWithoutValidation(HTMLElement* elementToExclude = 0);
+ void deselectItemsWithoutValidation(HTMLOptionElement* elementToExclude = nullptr);
void parseMultipleAttribute(const AtomicString&);
HTMLOptionElement* lastSelectedOption() const;
void updateSelectedState(HTMLOptionElement*, bool multi, bool shift);

Powered by Google App Engine
This is Rietveld 408576698