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

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: 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/HTMLOptionsCollection.cpp
diff --git a/Source/core/html/HTMLOptionsCollection.cpp b/Source/core/html/HTMLOptionsCollection.cpp
index 276590550ccdf0fbf21706359514b21143a378cc..899b37d40859d914616ffc1eb51bf9e5a0c7766b 100644
--- a/Source/core/html/HTMLOptionsCollection.cpp
+++ b/Source/core/html/HTMLOptionsCollection.cpp
@@ -108,4 +108,24 @@ void HTMLOptionsCollection::anonymousNamedGetter(const AtomicString& name, bool&
returnValue0 = NamedNodesCollection::create(namedItems);
}
+bool HTMLOptionsCollection::anonymousIndexedSetterRemove(unsigned index, ExceptionCode& ec)
+{
+ HTMLSelectElement* base = toHTMLSelectElement(ownerNode());
+ base->remove(index);
+ return true;
+}
+
+bool HTMLOptionsCollection::anonymousIndexedSetter(unsigned index, PassRefPtr<HTMLOptionElement> value, ExceptionCode& ec)
+{
+ HTMLSelectElement* base = toHTMLSelectElement(ownerNode());
+ if (!value) {
+ ec = TYPE_MISMATCH_ERR;
+ return true;
+ }
+ base->setOption(index, value.get(), ec);
+ return true;
+}
+
} //namespace
+
+
haraken 2013/05/29 06:41:56 Nit: Unnecessary empty lines.

Powered by Google App Engine
This is Rietveld 408576698