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

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..64f4dd781cd37c08ed0e0d94111c7f5a74ca23a9 100644
--- a/Source/core/html/HTMLOptionElement.cpp
+++ b/Source/core/html/HTMLOptionElement.cpp
@@ -172,6 +172,15 @@ int HTMLOptionElement::index() const
return 0;
}
+int HTMLOptionElement::listIndex() const
+{
+ HTMLSelectElement* selectElement = ownerSelectElement();
tkent 2014/12/15 09:26:04 if (HTMLSelectElement* selectElement = ownerSelect
keishi 2014/12/16 03:53:24 Done.
+ if (!selectElement)
+ return -1;
+
+ return selectElement->listIndexForOption(*this);
+}
+
void HTMLOptionElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (name == valueAttr) {

Powered by Google App Engine
This is Rietveld 408576698