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

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

Issue 15899009: Support indexed setter generation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Use TreatNullAs, TreatUndefinedAs in case of value is null/undefined Created 7 years, 7 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/HTMLSelectElement.cpp
diff --git a/Source/core/html/HTMLSelectElement.cpp b/Source/core/html/HTMLSelectElement.cpp
index 77585bfd9bca30d165811d9dd4236d94547a6849..93cda13f271150082690150171752a6626741f88 100644
--- a/Source/core/html/HTMLSelectElement.cpp
+++ b/Source/core/html/HTMLSelectElement.cpp
@@ -1570,4 +1570,14 @@ void HTMLSelectElement::finishParsingChildren()
updateListItemSelectedStates();
}
+bool HTMLSelectElement::anonymousIndexedSetter(unsigned index, PassRefPtr<HTMLOptionElement> value, ExceptionCode& ec)
+{
+ if (!value) {
+ ec = TYPE_MISMATCH_ERR;
+ return false;
+ }
+ setOption(index, value.get(), ec);
+ return true;
+}
+
} // namespace

Powered by Google App Engine
This is Rietveld 408576698