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

Unified Diff: Source/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp

Issue 147053007: Make HTMLOptionsCollection's named property getter behave more according to spec (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix tiny typo Created 6 years, 10 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/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp
diff --git a/Source/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp b/Source/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp
index 7da3543d9976bbb8d4e5371fc816586c103eb5f3..f55123c7e9707b5c245972f2dbecb5278750ecb9 100644
--- a/Source/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp
+++ b/Source/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp
@@ -44,32 +44,6 @@
namespace WebCore {
-template<typename CallbackInfo>
-static void getNamedItems(HTMLOptionsCollection* collection, const AtomicString& name, const CallbackInfo& info)
-{
- Vector<RefPtr<Element> > namedItems;
- collection->namedItems(name, namedItems);
-
- if (!namedItems.size()) {
- v8SetReturnValueNull(info);
- return;
- }
-
- if (namedItems.size() == 1) {
- v8SetReturnValueFast(info, namedItems.at(0).release(), collection);
- return;
- }
-
- v8SetReturnValueFast(info, NamedNodesCollection::create(namedItems), collection);
-}
-
-void V8HTMLOptionsCollection::namedItemMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, name, info[0]);
- HTMLOptionsCollection* imp = V8HTMLOptionsCollection::toNative(info.Holder());
- getNamedItems(imp, name, info);
-}
-
void V8HTMLOptionsCollection::addMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "add", "HTMLOptionsCollection", info.Holder(), info.GetIsolate());

Powered by Google App Engine
This is Rietveld 408576698