diff options
author | levin@chromium.org <levin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-17 23:13:41 +0000 |
---|---|---|
committer | levin@chromium.org <levin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-17 23:13:41 +0000 |
commit | 93faef3fc89d0177f2a0b965ff4547438964f594 (patch) | |
tree | edbc414bb99cb2d1960ea94c834e3590172935ee | |
parent | 7958291eaf8e4185e92b66db68161bdde1a58617 (diff) | |
download | chromium_src-93faef3fc89d0177f2a0b965ff4547438964f594.zip chromium_src-93faef3fc89d0177f2a0b965ff4547438964f594.tar.gz chromium_src-93faef3fc89d0177f2a0b965ff4547438964f594.tar.bz2 |
Get v8_collection.h to match webkit coding standards in
preparation for upstreaming.
Review URL: http://codereview.chromium.org/42294
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11930 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/port/bindings/v8/v8_collection.h | 406 | ||||
-rw-r--r-- | webkit/port/bindings/v8/v8_proxy.cpp | 36 |
2 files changed, 205 insertions, 237 deletions
diff --git a/webkit/port/bindings/v8/v8_collection.h b/webkit/port/bindings/v8/v8_collection.h index 86718c7..4b2d672 100644 --- a/webkit/port/bindings/v8/v8_collection.h +++ b/webkit/port/bindings/v8/v8_collection.h @@ -1,223 +1,191 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -// Copied from base/basictypes.h with some modifications - -#ifndef V8_PROPERTY_H__ -#define V8_PROPERTY_H__ - +/* + * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef V8Collection_h +#define V8Collection_h + +#include "V8Binding.h" +#include "V8Proxy.h" #include <v8.h> -#include "v8_proxy.h" namespace WebCore { -static v8::Handle<v8::Value> GetV8Object( - void* result, - v8::Local<v8::Value> data) { - if (!result) return v8::Handle<v8::Value>(); - V8ClassIndex::V8WrapperType type = - V8ClassIndex::FromInt(data->Int32Value()); - if (type == V8ClassIndex::NODE) - return V8Proxy::NodeToV8Object(static_cast<Node*>(result)); - else - return V8Proxy::ToV8Object(type, result); -} - -template <class D> -static v8::Handle<v8::Value> GetV8Object( - PassRefPtr<D> result, - v8::Local<v8::Value> data) { - return GetV8Object(result.get(), data); -} - -// Returns named property of a collection. -template <class C, class D> -static v8::Handle<v8::Value> GetNamedPropertyOfCollection( - v8::Local<v8::String> name, - v8::Local<v8::Object> object, - v8::Local<v8::Value> data) { - // TODO: assert object is a collection type - ASSERT(V8Proxy::MaybeDOMWrapper(object)); - V8ClassIndex::V8WrapperType t = V8Proxy::GetDOMWrapperType(object); - ASSERT(t != V8ClassIndex::NODE); - C* collection = V8Proxy::ToNativeObject<C>(t, object); - String prop_name = ToWebCoreString(name); - return GetV8Object<D>(collection->namedItem(prop_name), data); -} - -// A template of named property accessor of collections. -template <class C, class D> -static v8::Handle<v8::Value> CollectionNamedPropertyGetter( - v8::Local<v8::String> name, const v8::AccessorInfo& info) { - return GetNamedPropertyOfCollection<C, D>(name, info.Holder(), info.Data()); -} - - -// A template of named property accessor of HTMLSelectElement and -// HTMLFormElement. -template <class C> -static v8::Handle<v8::Value> NodeCollectionNamedPropertyGetter( - v8::Local<v8::String> name, const v8::AccessorInfo& info) { - ASSERT(V8Proxy::MaybeDOMWrapper(info.Holder())); - ASSERT(V8Proxy::GetDOMWrapperType(info.Holder()) == V8ClassIndex::NODE); - C* collection = V8Proxy::DOMWrapperToNode<C>(info.Holder()); - String prop_name = ToWebCoreString(name); - void* result = collection->namedItem(prop_name); - return GetV8Object(result, info.Data()); -} - - -// Returns the property at the index of a collection. -template <class C, class D> -static v8::Handle<v8::Value> GetIndexedPropertyOfCollection( - uint32_t index, v8::Local<v8::Object> object, v8::Local<v8::Value> data) { - // TODO, assert that object must be a collection type - ASSERT(V8Proxy::MaybeDOMWrapper(object)); - V8ClassIndex::V8WrapperType t = V8Proxy::GetDOMWrapperType(object); - ASSERT(t != V8ClassIndex::NODE); - C* collection = V8Proxy::ToNativeObject<C>(t, object); - return GetV8Object<D>(collection->item(index), data); -} - - -// A template of index interceptor of collections. -template <class C, class D> -static v8::Handle<v8::Value> CollectionIndexedPropertyGetter( - uint32_t index, const v8::AccessorInfo& info) { - return GetIndexedPropertyOfCollection<C, D>(index, info.Holder(), info.Data()); -} - - -// A template of index interceptor of HTMLSelectElement and HTMLFormElement. -template <class C> -static v8::Handle<v8::Value> NodeCollectionIndexedPropertyGetter( - uint32_t index, const v8::AccessorInfo& info) { - ASSERT(V8Proxy::MaybeDOMWrapper(info.Holder())); - ASSERT(V8Proxy::GetDOMWrapperType(info.Holder()) == V8ClassIndex::NODE); - C* collection = V8Proxy::DOMWrapperToNode<C>(info.Holder()); - void* result = collection->item(index); - return GetV8Object(result, info.Data()); -} - - -// Get an array containing the names of indexed properties of -// HTMLSelectElement and HTMLFormElement. -template <class C> -static v8::Handle<v8::Array> NodeCollectionIndexedPropertyEnumerator( - const v8::AccessorInfo& info) { - ASSERT(V8Proxy::MaybeDOMWrapper(info.Holder())); - ASSERT(V8Proxy::GetDOMWrapperType(info.Holder()) == V8ClassIndex::NODE); - C* collection = V8Proxy::DOMWrapperToNode<C>(info.Holder()); - int length = collection->length(); - v8::Handle<v8::Array> properties = v8::Array::New(length); - for (int i = 0; i < length; i++) { - // TODO(ager): Do we need to check that the item function returns - // a non-null value for this index? - v8::Handle<v8::Integer> integer = v8::Integer::New(i); - properties->Set(integer, integer); - } - return properties; -} - -// Get an array containing the names of indexed properties in a collection. -template <class C> -static v8::Handle<v8::Array> CollectionIndexedPropertyEnumerator( - const v8::AccessorInfo& info) { - ASSERT(V8Proxy::MaybeDOMWrapper(info.Holder())); - V8ClassIndex::V8WrapperType t = V8Proxy::GetDOMWrapperType(info.Holder()); - C* collection = V8Proxy::ToNativeObject<C>(t, info.Holder()); - int length = collection->length(); - v8::Handle<v8::Array> properties = v8::Array::New(length); - for (int i = 0; i < length; i++) { - // TODO(ager): Do we need to check that the item function returns - // a non-null value for this index? - v8::Handle<v8::Integer> integer = v8::Integer::New(i); - properties->Set(integer, integer); - } - return properties; -} - - -// A template for indexed getters on collections of strings that should return -// null if the resulting string is a null string. -template <class C> -static v8::Handle<v8::Value> CollectionStringOrNullIndexedPropertyGetter( - uint32_t index, const v8::AccessorInfo& info) { - // TODO, assert that object must be a collection type - ASSERT(V8Proxy::MaybeDOMWrapper(info.Holder())); - V8ClassIndex::V8WrapperType t = V8Proxy::GetDOMWrapperType(info.Holder()); - C* collection = V8Proxy::ToNativeObject<C>(t, info.Holder()); - String result = collection->item(index); - return v8StringOrNull(result); -} - - -// Add indexed getter to the function template for a collection. -template <class T, class D> -static void SetCollectionIndexedGetter(v8::Handle<v8::FunctionTemplate> desc, - V8ClassIndex::V8WrapperType type) { - desc->InstanceTemplate()->SetIndexedPropertyHandler( - CollectionIndexedPropertyGetter<T, D>, - 0, - 0, - 0, - CollectionIndexedPropertyEnumerator<T>, - v8::Integer::New(V8ClassIndex::ToInt(type))); -} - - -// Add named getter to the function template for a collection. -template <class T, class D> -static void SetCollectionNamedGetter(v8::Handle<v8::FunctionTemplate> desc, - V8ClassIndex::V8WrapperType type) { - desc->InstanceTemplate()->SetNamedPropertyHandler( - CollectionNamedPropertyGetter<T, D>, - 0, - 0, - 0, - 0, - v8::Integer::New(V8ClassIndex::ToInt(type))); -} - - -// Add named and indexed getters to the function template for a collection. -template <class T, class D> -static void SetCollectionIndexedAndNamedGetters( - v8::Handle<v8::FunctionTemplate> desc, V8ClassIndex::V8WrapperType type) { - // If we interceptor before object, accessing 'length' can trigger - // a webkit assertion error. - // (see fast/dom/HTMLDocument/document-special-properties.html - desc->InstanceTemplate()->SetNamedPropertyHandler( - CollectionNamedPropertyGetter<T, D>, - 0, - 0, - 0, - 0, - v8::Integer::New(V8ClassIndex::ToInt(type))); - desc->InstanceTemplate()->SetIndexedPropertyHandler( - CollectionIndexedPropertyGetter<T, D>, - 0, - 0, - 0, - CollectionIndexedPropertyEnumerator<T>, - v8::Integer::New(V8ClassIndex::ToInt(type))); -} - - -// Add indexed getter returning a string or null to a function template -// for a collection. -template <class T> -static void SetCollectionStringOrNullIndexedGetter( - v8::Handle<v8::FunctionTemplate> desc) { - desc->InstanceTemplate()->SetIndexedPropertyHandler( - CollectionStringOrNullIndexedPropertyGetter<T>, - 0, - 0, - 0, - CollectionIndexedPropertyEnumerator<T>); -} - - -} // namespace WebCore - -#endif // V8_PROPERTY_H__ + static v8::Handle<v8::Value> getV8Object(void* implementation, v8::Local<v8::Value> implementationType) + { + if (!implementation) + return v8::Handle<v8::Value>(); + V8ClassIndex::V8WrapperType type = V8ClassIndex::FromInt(implementationType->Int32Value()); + if (type == V8ClassIndex::NODE) + return V8Proxy::NodeToV8Object(static_cast<Node*>(implementation)); + return V8Proxy::ToV8Object(type, implementation); + } + + template<class T> static v8::Handle<v8::Value> getV8Object(PassRefPtr<T> implementation, v8::Local<v8::Value> implementationType) + { + return getV8Object(implementation.get(), implementationType); + } + + // Returns named property of a collection. + template<class Collection, class ItemType> static v8::Handle<v8::Value> getNamedPropertyOfCollection(v8::Local<v8::String> name, v8::Local<v8::Object> object, + v8::Local<v8::Value> implementationType) + { + // FIXME: assert object is a collection type + ASSERT(V8Proxy::MaybeDOMWrapper(object)); + V8ClassIndex::V8WrapperType wrapperType = V8Proxy::GetDOMWrapperType(object); + ASSERT(wrapperType != V8ClassIndex::NODE); + Collection* collection = V8Proxy::ToNativeObject<Collection>(wrapperType, object); + String propertyName = toWebCoreString(name); + return getV8Object<ItemType>(collection->namedItem(propertyName), implementationType); + } + + // A template of named property accessor of collections. + template<class Collection, class ItemType> static v8::Handle<v8::Value> collectionNamedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) + { + return getNamedPropertyOfCollection<Collection, ItemType>(name, info.Holder(), info.Data()); + } + + // A template of named property accessor of HTMLSelectElement and HTMLFormElement. + template<class Collection> static v8::Handle<v8::Value> nodeCollectionNamedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) + { + ASSERT(V8Proxy::MaybeDOMWrapper(info.Holder())); + ASSERT(V8Proxy::GetDOMWrapperType(info.Holder()) == V8ClassIndex::NODE); + Collection* collection = V8Proxy::DOMWrapperToNode<Collection>(info.Holder()); + String propertyName = toWebCoreString(name); + void* implementation = collection->namedItem(propertyName); + return getV8Object(implementation, info.Data()); + } + + // Returns the property at the index of a collection. + template<class Collection, class ItemType> static v8::Handle<v8::Value> getIndexedPropertyOfCollection(uint32_t index, v8::Local<v8::Object> object, + v8::Local<v8::Value> implementationType) + { + // FIXME: Assert that object must be a collection type. + ASSERT(V8Proxy::MaybeDOMWrapper(object)); + V8ClassIndex::V8WrapperType wrapperType = V8Proxy::GetDOMWrapperType(object); + ASSERT(wrapperType != V8ClassIndex::NODE); + Collection* collection = V8Proxy::ToNativeObject<Collection>(wrapperType, object); + return getV8Object<ItemType>(collection->item(index), implementationType); + } + + // A template of index interceptor of collections. + template<class Collection, class ItemType> static v8::Handle<v8::Value> collectionIndexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info) + { + return getIndexedPropertyOfCollection<Collection, ItemType>(index, info.Holder(), info.Data()); + } + + // A template of index interceptor of HTMLSelectElement and HTMLFormElement. + template<class Collection> static v8::Handle<v8::Value> nodeCollectionIndexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info) + { + ASSERT(V8Proxy::MaybeDOMWrapper(info.Holder())); + ASSERT(V8Proxy::GetDOMWrapperType(info.Holder()) == V8ClassIndex::NODE); + Collection* collection = V8Proxy::DOMWrapperToNode<Collection>(info.Holder()); + void* implementation = collection->item(index); + return getV8Object(implementation, info.Data()); + } + + // Get an array containing the names of indexed properties of HTMLSelectElement and HTMLFormElement. + template<class Collection> static v8::Handle<v8::Array> nodeCollectionIndexedPropertyEnumerator(const v8::AccessorInfo& info) + { + ASSERT(V8Proxy::MaybeDOMWrapper(info.Holder())); + ASSERT(V8Proxy::GetDOMWrapperType(info.Holder()) == V8ClassIndex::NODE); + Collection* collection = V8Proxy::DOMWrapperToNode<Collection>(info.Holder()); + int length = collection->length(); + v8::Handle<v8::Array> properties = v8::Array::New(length); + for (int i = 0; i < length; ++i) { + // FIXME: Do we need to check that the item function returns a non-null value for this index? + v8::Handle<v8::Integer> integer = v8::Integer::New(i); + properties->Set(integer, integer); + } + return properties; + } + + // Get an array containing the names of indexed properties in a collection. + template<class Collection> static v8::Handle<v8::Array> collectionIndexedPropertyEnumerator(const v8::AccessorInfo& info) + { + ASSERT(V8Proxy::MaybeDOMWrapper(info.Holder())); + V8ClassIndex::V8WrapperType wrapperType = V8Proxy::GetDOMWrapperType(info.Holder()); + Collection* collection = V8Proxy::ToNativeObject<Collection>(wrapperType, info.Holder()); + int length = collection->length(); + v8::Handle<v8::Array> properties = v8::Array::New(length); + for (int i = 0; i < length; ++i) { + // FIXME: Do we need to check that the item function returns a non-null value for this index? + v8::Handle<v8::Integer> integer = v8::Integer::New(i); + properties->Set(integer, integer); + } + return properties; + } + + + // A template for indexed getters on collections of strings that should return null if the resulting string is a null string. + template<class Collection> static v8::Handle<v8::Value> collectionStringOrNullIndexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info) + { + // FIXME: assert that object must be a collection type + ASSERT(V8Proxy::MaybeDOMWrapper(info.Holder())); + V8ClassIndex::V8WrapperType wrapperType = V8Proxy::GetDOMWrapperType(info.Holder()); + Collection* collection = V8Proxy::ToNativeObject<Collection>(wrapperType, info.Holder()); + String result = collection->item(index); + return v8StringOrNull(result); + } + + + // Add indexed getter to the function template for a collection. + template<class Collection, class ItemType> static void setCollectionIndexedGetter(v8::Handle<v8::FunctionTemplate> desc, V8ClassIndex::V8WrapperType type) + { + desc->InstanceTemplate()->SetIndexedPropertyHandler(collectionIndexedPropertyGetter<Collection, ItemType>, 0, 0, 0, collectionIndexedPropertyEnumerator<Collection>, + v8::Integer::New(V8ClassIndex::ToInt(type))); + } + + + // Add named getter to the function template for a collection. + template<class Collection, class ItemType> static void setCollectionNamedGetter(v8::Handle<v8::FunctionTemplate> desc, V8ClassIndex::V8WrapperType type) + { + desc->InstanceTemplate()->SetNamedPropertyHandler(collectionNamedPropertyGetter<Collection, ItemType>, 0, 0, 0, 0, v8::Integer::New(V8ClassIndex::ToInt(type))); + } + + + // Add named and indexed getters to the function template for a collection. + template<class Collection, class ItemType> static void setCollectionIndexedAndNamedGetters(v8::Handle<v8::FunctionTemplate> desc, V8ClassIndex::V8WrapperType type) + { + // If we interceptor before object, accessing 'length' can trigger a webkit assertion error (see fast/dom/HTMLDocument/document-special-properties.html). + desc->InstanceTemplate()->SetNamedPropertyHandler(collectionNamedPropertyGetter<Collection, ItemType>, 0, 0, 0, 0, v8::Integer::New(V8ClassIndex::ToInt(type))); + desc->InstanceTemplate()->SetIndexedPropertyHandler(collectionIndexedPropertyGetter<Collection, ItemType>, 0, 0, 0, collectionIndexedPropertyEnumerator<Collection>, + v8::Integer::New(V8ClassIndex::ToInt(type))); + } + + + // Add indexed getter returning a string or null to a function template for a collection. + template<class Collection> static void setCollectionStringOrNullIndexedGetter(v8::Handle<v8::FunctionTemplate> desc) + { + desc->InstanceTemplate()->SetIndexedPropertyHandler(collectionStringOrNullIndexedPropertyGetter<Collection>, 0, 0, 0, collectionIndexedPropertyEnumerator<Collection>); + } + +} // namespace WebCore + +#endif // V8Collection_h diff --git a/webkit/port/bindings/v8/v8_proxy.cpp b/webkit/port/bindings/v8/v8_proxy.cpp index 2725b99..df75f3b 100644 --- a/webkit/port/bindings/v8/v8_proxy.cpp +++ b/webkit/port/bindings/v8/v8_proxy.cpp @@ -1606,22 +1606,22 @@ v8::Persistent<v8::FunctionTemplate> V8Proxy::GetTemplate( desc->InstanceTemplate()->SetNamedPropertyHandler( USE_NAMED_PROPERTY_GETTER(CSSStyleDeclaration), USE_NAMED_PROPERTY_SETTER(CSSStyleDeclaration)); - SetCollectionStringOrNullIndexedGetter<CSSStyleDeclaration>(desc); + setCollectionStringOrNullIndexedGetter<CSSStyleDeclaration>(desc); break; case V8ClassIndex::CSSRULELIST: - SetCollectionIndexedGetter<CSSRuleList, CSSRule>(desc, + setCollectionIndexedGetter<CSSRuleList, CSSRule>(desc, V8ClassIndex::CSSRULE); break; case V8ClassIndex::CSSVALUELIST: - SetCollectionIndexedGetter<CSSValueList, CSSValue>( + setCollectionIndexedGetter<CSSValueList, CSSValue>( desc, V8ClassIndex::CSSVALUE); break; case V8ClassIndex::CSSVARIABLESDECLARATION: - SetCollectionStringOrNullIndexedGetter<CSSVariablesDeclaration>(desc); + setCollectionStringOrNullIndexedGetter<CSSVariablesDeclaration>(desc); break; case V8ClassIndex::WEBKITCSSTRANSFORMVALUE: - SetCollectionIndexedGetter<WebKitCSSTransformValue, CSSValue>( + setCollectionIndexedGetter<WebKitCSSTransformValue, CSSValue>( desc, V8ClassIndex::CSSVALUE); break; @@ -1632,11 +1632,11 @@ v8::Persistent<v8::FunctionTemplate> V8Proxy::GetTemplate( USE_NAMED_PROPERTY_GETTER(HTMLCollection)); desc->InstanceTemplate()->SetCallAsFunctionHandler( USE_CALLBACK(HTMLCollectionCallAsFunction)); - SetCollectionIndexedGetter<HTMLCollection, Node>(desc, + setCollectionIndexedGetter<HTMLCollection, Node>(desc, V8ClassIndex::NODE); break; case V8ClassIndex::HTMLOPTIONSCOLLECTION: - SetCollectionNamedGetter<HTMLOptionsCollection, Node>( + setCollectionNamedGetter<HTMLOptionsCollection, Node>( desc, V8ClassIndex::NODE); desc->InstanceTemplate()->SetIndexedPropertyHandler( @@ -1647,18 +1647,18 @@ v8::Persistent<v8::FunctionTemplate> V8Proxy::GetTemplate( break; case V8ClassIndex::HTMLSELECTELEMENT: desc->InstanceTemplate()->SetNamedPropertyHandler( - NodeCollectionNamedPropertyGetter<HTMLSelectElement>, + nodeCollectionNamedPropertyGetter<HTMLSelectElement>, 0, 0, 0, 0, v8::Integer::New(V8ClassIndex::NODE)); desc->InstanceTemplate()->SetIndexedPropertyHandler( - NodeCollectionIndexedPropertyGetter<HTMLSelectElement>, + nodeCollectionIndexedPropertyGetter<HTMLSelectElement>, USE_INDEXED_PROPERTY_SETTER(HTMLSelectElementCollection), 0, 0, - NodeCollectionIndexedPropertyEnumerator<HTMLSelectElement>, + nodeCollectionIndexedPropertyEnumerator<HTMLSelectElement>, v8::Integer::New(V8ClassIndex::NODE)); break; case V8ClassIndex::HTMLDOCUMENT: { @@ -1726,7 +1726,7 @@ v8::Persistent<v8::FunctionTemplate> V8Proxy::GetTemplate( 0, 0, 0, - NodeCollectionIndexedPropertyEnumerator<HTMLFormElement>, + nodeCollectionIndexedPropertyEnumerator<HTMLFormElement>, v8::Integer::New(V8ClassIndex::NODE)); break; case V8ClassIndex::CANVASPIXELARRAY: @@ -1747,10 +1747,10 @@ v8::Persistent<v8::FunctionTemplate> V8Proxy::GetTemplate( break; } case V8ClassIndex::MEDIALIST: - SetCollectionStringOrNullIndexedGetter<MediaList>(desc); + setCollectionStringOrNullIndexedGetter<MediaList>(desc); break; case V8ClassIndex::MIMETYPEARRAY: - SetCollectionIndexedAndNamedGetters<MimeTypeArray, MimeType>( + setCollectionIndexedAndNamedGetters<MimeTypeArray, MimeType>( desc, V8ClassIndex::MIMETYPE); break; @@ -1762,28 +1762,28 @@ v8::Persistent<v8::FunctionTemplate> V8Proxy::GetTemplate( 0, 0, 0, - CollectionIndexedPropertyEnumerator<NamedNodeMap>, + collectionIndexedPropertyEnumerator<NamedNodeMap>, v8::Integer::New(V8ClassIndex::NODE)); break; case V8ClassIndex::NODELIST: - SetCollectionIndexedGetter<NodeList, Node>(desc, V8ClassIndex::NODE); + setCollectionIndexedGetter<NodeList, Node>(desc, V8ClassIndex::NODE); desc->InstanceTemplate()->SetNamedPropertyHandler( USE_NAMED_PROPERTY_GETTER(NodeList)); break; case V8ClassIndex::PLUGIN: - SetCollectionIndexedAndNamedGetters<Plugin, MimeType>( + setCollectionIndexedAndNamedGetters<Plugin, MimeType>( desc, V8ClassIndex::MIMETYPE); break; case V8ClassIndex::PLUGINARRAY: - SetCollectionIndexedAndNamedGetters<PluginArray, Plugin>( + setCollectionIndexedAndNamedGetters<PluginArray, Plugin>( desc, V8ClassIndex::PLUGIN); break; case V8ClassIndex::STYLESHEETLIST: desc->InstanceTemplate()->SetNamedPropertyHandler( USE_NAMED_PROPERTY_GETTER(StyleSheetList)); - SetCollectionIndexedGetter<StyleSheetList, StyleSheet>( + setCollectionIndexedGetter<StyleSheetList, StyleSheet>( desc, V8ClassIndex::STYLESHEET); break; |