2 This file is part of the WebKit open source project.
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY!
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
24 #include "JSDOMBinding.h"
26 #include <runtime/JSGlobalObject.h>
27 #include <runtime/JSObject.h>
28 #include <runtime/ObjectPrototype.h>
32 class JSNodeList : public JSDOMWrapper {
34 typedef JSDOMWrapper Base;
35 static JSNodeList* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<NodeList> impl)
37 JSNodeList* ptr = new (JSC::allocateCell<JSNodeList>(globalObject->globalData().heap)) JSNodeList(structure, globalObject, impl);
38 ptr->finishCreation(globalObject->globalData());
42 static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
43 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
44 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
45 static bool getOwnPropertySlotByIndex(JSC::JSCell*, JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&);
46 static const JSC::ClassInfo s_info;
48 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
50 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
53 static void getOwnPropertyNames(JSC::JSObject*, JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode mode = JSC::ExcludeDontEnumProperties);
54 static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
55 NodeList* impl() const { return m_impl; }
56 void releaseImpl() { m_impl->deref(); m_impl = 0; }
61 JSNodeList(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<NodeList>);
62 void finishCreation(JSC::JSGlobalData&);
63 static const unsigned StructureFlags = JSC::OverridesGetPropertyNames | JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
64 static JSC::JSValue indexGetter(JSC::ExecState*, JSC::JSValue, unsigned);
66 static bool canGetItemsForName(JSC::ExecState*, NodeList*, const JSC::Identifier&);
67 static JSC::JSValue nameGetter(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
70 class JSNodeListOwner : public JSC::WeakHandleOwner {
71 virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
72 virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
75 inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, NodeList*)
77 DEFINE_STATIC_LOCAL(JSNodeListOwner, jsNodeListOwner, ());
78 return &jsNodeListOwner;
81 inline void* wrapperContext(DOMWrapperWorld* world, NodeList*)
86 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, NodeList*);
87 NodeList* toNodeList(JSC::JSValue);
89 class JSNodeListPrototype : public JSC::JSNonFinalObject {
91 typedef JSC::JSNonFinalObject Base;
92 static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
93 static JSNodeListPrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
95 JSNodeListPrototype* ptr = new (JSC::allocateCell<JSNodeListPrototype>(globalData.heap)) JSNodeListPrototype(globalData, globalObject, structure);
96 ptr->finishCreation(globalData);
100 static const JSC::ClassInfo s_info;
101 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
102 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
103 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
105 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
109 JSNodeListPrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(globalData, structure) { }
111 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
114 class JSNodeListConstructor : public DOMConstructorObject {
116 JSNodeListConstructor(JSC::Structure*, JSDOMGlobalObject*);
117 void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
120 typedef DOMConstructorObject Base;
121 static JSNodeListConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
123 JSNodeListConstructor* ptr = new (JSC::allocateCell<JSNodeListConstructor>(*exec->heap())) JSNodeListConstructor(structure, globalObject);
124 ptr->finishCreation(exec, globalObject);
128 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
129 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
130 static const JSC::ClassInfo s_info;
131 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
133 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
136 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
141 JSC::EncodedJSValue JSC_HOST_CALL jsNodeListPrototypeFunctionItem(JSC::ExecState*);
144 JSC::JSValue jsNodeListLength(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
145 JSC::JSValue jsNodeListConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
147 } // namespace WebCore