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

Unified Diff: Source/core/html/HTMLOptionElement.cpp

Issue 736883002: Implement <select> Popup Menu using PagePopup (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years 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: Source/core/html/HTMLOptionElement.cpp
diff --git a/Source/core/html/HTMLOptionElement.cpp b/Source/core/html/HTMLOptionElement.cpp
index 90a3895b670fb248d30a38285853dbce40a046f8..215b1204291e35ed57694bddbd4623fc9aed4ed7 100644
--- a/Source/core/html/HTMLOptionElement.cpp
+++ b/Source/core/html/HTMLOptionElement.cpp
@@ -172,6 +172,13 @@ int HTMLOptionElement::index() const
return 0;
}
+int HTMLOptionElement::listIndex() const
+{
+ if (HTMLSelectElement* selectElement = ownerSelectElement())
+ return selectElement->listIndexForOption(*this);
+ return -1;
+}
+
void HTMLOptionElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (name == valueAttr) {

Powered by Google App Engine
This is Rietveld 408576698