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

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

Issue 23549004: Fix the HTMLSelectElement.prototype.remove() method (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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: Source/core/html/HTMLOptionsCollection.cpp
diff --git a/Source/core/html/HTMLOptionsCollection.cpp b/Source/core/html/HTMLOptionsCollection.cpp
index 13e9f6c38153c5bef63ade3eb8921637a1a94a17..ea2c28c4463b5731ab89546460dec77196054fd8 100644
--- a/Source/core/html/HTMLOptionsCollection.cpp
+++ b/Source/core/html/HTMLOptionsCollection.cpp
@@ -75,6 +75,11 @@ void HTMLOptionsCollection::remove(int index)
toHTMLSelectElement(ownerNode())->remove(index);
}
+void HTMLOptionsCollection::remove(HTMLOptionElement* option)
+{
+ return remove(option->index());
+}
+
int HTMLOptionsCollection::selectedIndex() const
{
return toHTMLSelectElement(ownerNode())->selectedIndex();

Powered by Google App Engine
This is Rietveld 408576698