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

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: rebased 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
« no previous file with comments | « Source/core/html/HTMLOptionsCollection.h ('k') | Source/core/html/HTMLOptionsCollection.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLOptionsCollection.cpp
diff --git a/Source/core/html/HTMLOptionsCollection.cpp b/Source/core/html/HTMLOptionsCollection.cpp
index 276590550ccdf0fbf21706359514b21143a378cc..ef8bba02c1859c2d52f633aa2de97d8f58594857 100644
--- a/Source/core/html/HTMLOptionsCollection.cpp
+++ b/Source/core/html/HTMLOptionsCollection.cpp
@@ -108,4 +108,23 @@ 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
+
« no previous file with comments | « Source/core/html/HTMLOptionsCollection.h ('k') | Source/core/html/HTMLOptionsCollection.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698