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

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

Issue 15899009: Support indexed setter generation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: 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/HTMLOptionsCollection.cpp
diff --git a/Source/core/html/HTMLOptionsCollection.cpp b/Source/core/html/HTMLOptionsCollection.cpp
index 276590550ccdf0fbf21706359514b21143a378cc..07ed04e9457ed57e2cb5a5856289dcafa4a56cd7 100644
--- a/Source/core/html/HTMLOptionsCollection.cpp
+++ b/Source/core/html/HTMLOptionsCollection.cpp
@@ -108,4 +108,21 @@ void HTMLOptionsCollection::anonymousNamedGetter(const AtomicString& name, bool&
returnValue0 = NamedNodesCollection::create(namedItems);
}
+bool HTMLOptionsCollection::anonymousIndexedSetter(unsigned index, PassRefPtr<HTMLOptionElement> value, bool isValueNull, bool isValueUndefined, ExceptionCode& ec)
+{
+ HTMLSelectElement* base = toHTMLSelectElement(ownerNode());
+ if (isValueNull || isValueUndefined) {
+ base->remove(index);
+ return true;
+ }
+ if (!value) {
+ ec = TYPE_MISMATCH_ERR;
+ return true;
+ }
+ base->setOption(index, value.get(), ec);
+ return true;
+}
+
} //namespace
+
+

Powered by Google App Engine
This is Rietveld 408576698