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

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: Fixed tests for mac Created 5 years, 10 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
« no previous file with comments | « Source/core/html/HTMLOptionElement.h ('k') | Source/core/html/HTMLSelectElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLOptionElement.cpp
diff --git a/Source/core/html/HTMLOptionElement.cpp b/Source/core/html/HTMLOptionElement.cpp
index f2e91136c37ca1a254190d8f3c738f6fd705fe81..ee69cb986321a0a95cf8f8bc25f50d0b4c12a004 100644
--- a/Source/core/html/HTMLOptionElement.cpp
+++ b/Source/core/html/HTMLOptionElement.cpp
@@ -168,6 +168,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) {
« no previous file with comments | « Source/core/html/HTMLOptionElement.h ('k') | Source/core/html/HTMLSelectElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698