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); |