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

Unified Diff: third_party/WebKit/Source/web/ExternalPopupMenu.cpp

Issue 2149763003: SELECT element: Add HTMLSelectElement::selectedListIndex(). (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/web/ExternalPopupMenu.cpp
diff --git a/third_party/WebKit/Source/web/ExternalPopupMenu.cpp b/third_party/WebKit/Source/web/ExternalPopupMenu.cpp
index 7d62cd915242fd9b1d12be51699200d70fef9a8e..08a0348e6b089e9ea41ca48f4d367f4f0e3077ab 100644
--- a/third_party/WebKit/Source/web/ExternalPopupMenu.cpp
+++ b/third_party/WebKit/Source/web/ExternalPopupMenu.cpp
@@ -264,7 +264,7 @@ void ExternalPopupMenu::getPopupMenuInfo(WebPopupMenuInfo& info, HTMLSelectEleme
const ComputedStyle& menuStyle = ownerElement.computedStyle() ? *ownerElement.computedStyle() : *ownerElement.ensureComputedStyle();
info.itemHeight = menuStyle.font().getFontMetrics().height();
info.itemFontSize = static_cast<int>(menuStyle.font().getFontDescription().computedSize());
- info.selectedIndex = toExternalPopupMenuItemIndex(ownerElement.optionToListIndex(ownerElement.selectedIndex()), ownerElement);
+ info.selectedIndex = toExternalPopupMenuItemIndex(ownerElement.selectedListIndex(), ownerElement);
info.rightAligned = menuStyle.direction() == RTL;
info.allowMultipleSelection = ownerElement.multiple();
if (count < itemCount)
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLSelectElement.cpp ('k') | third_party/WebKit/Source/web/PopupMenuImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698