Chromium Code Reviews
DescriptionSELECT element: Refer to m_lastOnChangeOption in HTMLSelectElement::optionIndexToBeShown().
This is a preparation to remove O(N) operations in optionIndexToBeShown().
Use m_lastOnChangeOption instead of selectedIndex in optionIndexToBeShown(). We
need to update selectOption() too so that m_lastOnChangeOption is updated before
calling LayoutObject::updateFromElement. LayoutMenuList::updateFromElement
calls optionIndexToBeShown().
selectedIndex() is O(N), and m_lastOnChangeOption->index() is also O(N). So this
CL doesn't change complexity of optionIndexToBeShown().
BUG=577989
R=keishi@chromium.org
Committed: https://chromium.googlesource.com/chromium/src/+/6b34b48ae7a7f74f51d25e3b452e5782ebae7584
Patch Set 1 #Patch Set 2 : Update m_lastOnChangeOption in HTMLSelectElement::restoreFormControlState #Patch Set 3 : typo #Messages
Total messages: 18 (11 generated)
|