summaryrefslogtreecommitdiffstats
path: root/webkit/port
diff options
context:
space:
mode:
authordavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-15 18:21:28 +0000
committerdavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-15 18:21:28 +0000
commit2de4c9dc8adde93fab848f91d07ee7c579ae1ced (patch)
tree42dc89f137184023f116def0fdb85b372c41322c /webkit/port
parentc398981aa94189d9173b304e5b1d67f97e79fbc8 (diff)
downloadchromium_src-2de4c9dc8adde93fab848f91d07ee7c579ae1ced.zip
chromium_src-2de4c9dc8adde93fab848f91d07ee7c579ae1ced.tar.gz
chromium_src-2de4c9dc8adde93fab848f91d07ee7c579ae1ced.tar.bz2
Reverting 13760.
Review URL: http://codereview.chromium.org/75002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13762 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port')
-rw-r--r--webkit/port/bindings/v8/v8_custom.cpp29
-rw-r--r--webkit/port/bindings/v8/v8_custom.h1
-rw-r--r--webkit/port/bindings/v8/v8_proxy.cpp13
3 files changed, 9 insertions, 34 deletions
diff --git a/webkit/port/bindings/v8/v8_custom.cpp b/webkit/port/bindings/v8/v8_custom.cpp
index 4ac1554..4b2e545 100644
--- a/webkit/port/bindings/v8/v8_custom.cpp
+++ b/webkit/port/bindings/v8/v8_custom.cpp
@@ -41,7 +41,6 @@
#include "V8HTMLDocument.h"
#include "V8HTMLImageElement.h"
#include "V8HTMLOptionElement.h"
-#include "V8NamedNodesCollection.h"
#include "V8Node.h"
#include "V8XPathNSResolver.h"
#include "V8XPathResult.h"
@@ -234,34 +233,6 @@ INDEXED_PROPERTY_SETTER(HTMLOptionsCollection) {
return OptionsCollectionSetter(index, value, base);
}
-NAMED_PROPERTY_GETTER(HTMLSelectElementCollection) {
- INC_STATS("DOM.HTMLSelectElementCollection.NamedPropertySetter");
- HTMLSelectElement* select =
- V8Proxy::DOMWrapperToNode<HTMLSelectElement>(info.Holder());
- v8::Handle<v8::Value> value = info.Holder()->GetRealNamedPropertyInPrototypeChain(name);
-
- if (!value.IsEmpty())
- return value;
-
- // Search local callback properties next to find IDL defined
- // properties.
- if (info.Holder()->HasRealNamedCallbackProperty(name))
- return notHandledByInterceptor();
-
- PassRefPtr<HTMLOptionsCollection> collection = select->options();
-
- Vector<RefPtr<Node> > items;
- collection->namedItems(v8StringToAtomicWebCoreString(name), items);
-
- if (!items.size())
- return v8::Handle<v8::Value>();
-
- if (items.size() == 1)
- return V8Proxy::NodeToV8Object(items.at(0).get());
-
- NodeList* list = new V8NamedNodesCollection(items);
- return V8Proxy::ToV8Object(V8ClassIndex::NODELIST, list);
-}
INDEXED_PROPERTY_SETTER(HTMLSelectElementCollection) {
INC_STATS("DOM.HTMLSelectElementCollection.IndexedPropertySetter");
diff --git a/webkit/port/bindings/v8/v8_custom.h b/webkit/port/bindings/v8/v8_custom.h
index e8a0bad..73b5f96 100644
--- a/webkit/port/bindings/v8/v8_custom.h
+++ b/webkit/port/bindings/v8/v8_custom.h
@@ -477,7 +477,6 @@ DECLARE_INDEXED_PROPERTY_GETTER(NamedNodeMap)
DECLARE_INDEXED_PROPERTY_GETTER(HTMLFormElement)
DECLARE_INDEXED_PROPERTY_GETTER(HTMLOptionsCollection)
DECLARE_INDEXED_PROPERTY_SETTER(HTMLOptionsCollection)
-DECLARE_NAMED_PROPERTY_GETTER(HTMLSelectElementCollection)
DECLARE_INDEXED_PROPERTY_SETTER(HTMLSelectElementCollection)
DECLARE_NAMED_PROPERTY_GETTER(HTMLCollection)
diff --git a/webkit/port/bindings/v8/v8_proxy.cpp b/webkit/port/bindings/v8/v8_proxy.cpp
index f7af9db..723d32b 100644
--- a/webkit/port/bindings/v8/v8_proxy.cpp
+++ b/webkit/port/bindings/v8/v8_proxy.cpp
@@ -1292,8 +1292,9 @@ v8::Persistent<v8::FunctionTemplate> V8Proxy::GetTemplate(
V8ClassIndex::NODE);
break;
case V8ClassIndex::HTMLOPTIONSCOLLECTION:
- desc->InstanceTemplate()->SetNamedPropertyHandler(
- USE_NAMED_PROPERTY_GETTER(HTMLCollection));
+ setCollectionNamedGetter<HTMLOptionsCollection, Node>(
+ desc,
+ V8ClassIndex::NODE);
desc->InstanceTemplate()->SetIndexedPropertyHandler(
USE_INDEXED_PROPERTY_GETTER(HTMLOptionsCollection),
USE_INDEXED_PROPERTY_SETTER(HTMLOptionsCollection));
@@ -1302,7 +1303,12 @@ v8::Persistent<v8::FunctionTemplate> V8Proxy::GetTemplate(
break;
case V8ClassIndex::HTMLSELECTELEMENT:
desc->InstanceTemplate()->SetNamedPropertyHandler(
- USE_NAMED_PROPERTY_GETTER(HTMLSelectElementCollection));
+ nodeCollectionNamedPropertyGetter<HTMLSelectElement>,
+ 0,
+ 0,
+ 0,
+ 0,
+ v8::Integer::New(V8ClassIndex::NODE));
desc->InstanceTemplate()->SetIndexedPropertyHandler(
nodeCollectionIndexedPropertyGetter<HTMLSelectElement>,
USE_INDEXED_PROPERTY_SETTER(HTMLSelectElementCollection),
@@ -2403,7 +2409,6 @@ void* V8Proxy::ToNativeObjectImpl(V8ClassIndex::V8WrapperType type,
return DOMWrapperToNative<void>(object);
}
-
v8::Handle<v8::Object> V8Proxy::LookupDOMWrapper(
V8ClassIndex::V8WrapperType type, v8::Handle<v8::Value> value)
{