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

Unified Diff: third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.cpp

Issue 2141483002: SELECT element: Simplify the code by optionList(). (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/modules/accessibility/AXMenuListPopup.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.cpp b/third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.cpp
index cac5dfc40aca55a0cacf3ad9c1077d9e700bb9ae..2627a3d838afb8c9d9694ffe562db5ec01e68ad4 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.cpp
@@ -115,10 +115,8 @@ void AXMenuListPopup::addChildren()
if (m_activeIndex == -1)
m_activeIndex = getSelectedIndex();
- const HeapVector<Member<HTMLElement>>& listItems = htmlSelectElement->listItems();
- unsigned length = listItems.size();
- for (unsigned i = 0; i < length; i++) {
- AXMenuListOption* option = menuListOptionAXObject(listItems[i]);
+ for (const auto& optionElement : htmlSelectElement->optionList()) {
+ AXMenuListOption* option = menuListOptionAXObject(optionElement);
if (option) {
option->setParent(this);
m_children.append(option);
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutMenuList.cpp ('k') | third_party/WebKit/Source/web/WebSearchableFormData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698