|
1 /* |
|
2 This file is part of the WebKit open source project. |
|
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY! |
|
4 |
|
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. |
|
9 |
|
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. |
|
14 |
|
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. |
|
19 */ |
|
20 |
|
21 #include "config.h" |
|
22 #include "JSHTMLDirectoryElement.h" |
|
23 |
|
24 #include "HTMLDirectoryElement.h" |
|
25 #include "HTMLNames.h" |
|
26 #include <wtf/GetPtr.h> |
|
27 |
|
28 using namespace JSC; |
|
29 |
|
30 namespace WebCore { |
|
31 |
|
32 ASSERT_CLASS_FITS_IN_CELL(JSHTMLDirectoryElement); |
|
33 |
|
34 /* Hash table */ |
|
35 #if ENABLE(JIT) |
|
36 #define THUNK_GENERATOR(generator) , generator |
|
37 #else |
|
38 #define THUNK_GENERATOR(generator) |
|
39 #endif |
|
40 |
|
41 static const HashTableValue JSHTMLDirectoryElementTableValues[3] = |
|
42 { |
|
43 { "compact", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLDirectoryElementCompact), (intptr_t)setJSHTMLDirectoryElementCompact THUNK_GENERATOR(0) }, |
|
44 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLDirectoryElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
45 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
46 }; |
|
47 |
|
48 #undef THUNK_GENERATOR |
|
49 static JSC_CONST_HASHTABLE HashTable JSHTMLDirectoryElementTable = { 4, 3, JSHTMLDirectoryElementTableValues, 0 }; |
|
50 /* Hash table for constructor */ |
|
51 #if ENABLE(JIT) |
|
52 #define THUNK_GENERATOR(generator) , generator |
|
53 #else |
|
54 #define THUNK_GENERATOR(generator) |
|
55 #endif |
|
56 |
|
57 static const HashTableValue JSHTMLDirectoryElementConstructorTableValues[1] = |
|
58 { |
|
59 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
60 }; |
|
61 |
|
62 #undef THUNK_GENERATOR |
|
63 static JSC_CONST_HASHTABLE HashTable JSHTMLDirectoryElementConstructorTable = { 1, 0, JSHTMLDirectoryElementConstructorTableValues, 0 }; |
|
64 class JSHTMLDirectoryElementConstructor : public DOMConstructorObject { |
|
65 public: |
|
66 JSHTMLDirectoryElementConstructor(JSC::ExecState*, JSDOMGlobalObject*); |
|
67 |
|
68 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); |
|
69 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); |
|
70 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } |
|
71 static const JSC::ClassInfo s_info; |
|
72 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) |
|
73 { |
|
74 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); |
|
75 } |
|
76 protected: |
|
77 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; |
|
78 }; |
|
79 |
|
80 const ClassInfo JSHTMLDirectoryElementConstructor::s_info = { "HTMLDirectoryElementConstructor", 0, &JSHTMLDirectoryElementConstructorTable, 0 }; |
|
81 |
|
82 JSHTMLDirectoryElementConstructor::JSHTMLDirectoryElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) |
|
83 : DOMConstructorObject(JSHTMLDirectoryElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) |
|
84 { |
|
85 putDirect(exec->propertyNames().prototype, JSHTMLDirectoryElementPrototype::self(exec, globalObject), DontDelete | ReadOnly); |
|
86 } |
|
87 |
|
88 bool JSHTMLDirectoryElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
89 { |
|
90 return getStaticValueSlot<JSHTMLDirectoryElementConstructor, DOMObject>(exec, &JSHTMLDirectoryElementConstructorTable, this, propertyName, slot); |
|
91 } |
|
92 |
|
93 bool JSHTMLDirectoryElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
94 { |
|
95 return getStaticValueDescriptor<JSHTMLDirectoryElementConstructor, DOMObject>(exec, &JSHTMLDirectoryElementConstructorTable, this, propertyName, descriptor); |
|
96 } |
|
97 |
|
98 /* Hash table for prototype */ |
|
99 #if ENABLE(JIT) |
|
100 #define THUNK_GENERATOR(generator) , generator |
|
101 #else |
|
102 #define THUNK_GENERATOR(generator) |
|
103 #endif |
|
104 |
|
105 static const HashTableValue JSHTMLDirectoryElementPrototypeTableValues[1] = |
|
106 { |
|
107 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
108 }; |
|
109 |
|
110 #undef THUNK_GENERATOR |
|
111 static JSC_CONST_HASHTABLE HashTable JSHTMLDirectoryElementPrototypeTable = { 1, 0, JSHTMLDirectoryElementPrototypeTableValues, 0 }; |
|
112 const ClassInfo JSHTMLDirectoryElementPrototype::s_info = { "HTMLDirectoryElementPrototype", 0, &JSHTMLDirectoryElementPrototypeTable, 0 }; |
|
113 |
|
114 JSObject* JSHTMLDirectoryElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject) |
|
115 { |
|
116 return getDOMPrototype<JSHTMLDirectoryElement>(exec, globalObject); |
|
117 } |
|
118 |
|
119 const ClassInfo JSHTMLDirectoryElement::s_info = { "HTMLDirectoryElement", &JSHTMLElement::s_info, &JSHTMLDirectoryElementTable, 0 }; |
|
120 |
|
121 JSHTMLDirectoryElement::JSHTMLDirectoryElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLDirectoryElement> impl) |
|
122 : JSHTMLElement(structure, globalObject, impl) |
|
123 { |
|
124 } |
|
125 |
|
126 JSObject* JSHTMLDirectoryElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject) |
|
127 { |
|
128 return new (exec) JSHTMLDirectoryElementPrototype(globalObject, JSHTMLDirectoryElementPrototype::createStructure(JSHTMLElementPrototype::self(exec, globalObject))); |
|
129 } |
|
130 |
|
131 bool JSHTMLDirectoryElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
132 { |
|
133 return getStaticValueSlot<JSHTMLDirectoryElement, Base>(exec, &JSHTMLDirectoryElementTable, this, propertyName, slot); |
|
134 } |
|
135 |
|
136 bool JSHTMLDirectoryElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
137 { |
|
138 return getStaticValueDescriptor<JSHTMLDirectoryElement, Base>(exec, &JSHTMLDirectoryElementTable, this, propertyName, descriptor); |
|
139 } |
|
140 |
|
141 JSValue jsHTMLDirectoryElementCompact(ExecState* exec, JSValue slotBase, const Identifier&) |
|
142 { |
|
143 JSHTMLDirectoryElement* castedThis = static_cast<JSHTMLDirectoryElement*>(asObject(slotBase)); |
|
144 UNUSED_PARAM(exec); |
|
145 HTMLDirectoryElement* imp = static_cast<HTMLDirectoryElement*>(castedThis->impl()); |
|
146 JSValue result = jsBoolean(imp->hasAttribute(WebCore::HTMLNames::compactAttr)); |
|
147 return result; |
|
148 } |
|
149 |
|
150 JSValue jsHTMLDirectoryElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&) |
|
151 { |
|
152 JSHTMLDirectoryElement* domObject = static_cast<JSHTMLDirectoryElement*>(asObject(slotBase)); |
|
153 return JSHTMLDirectoryElement::getConstructor(exec, domObject->globalObject()); |
|
154 } |
|
155 void JSHTMLDirectoryElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) |
|
156 { |
|
157 lookupPut<JSHTMLDirectoryElement, Base>(exec, propertyName, value, &JSHTMLDirectoryElementTable, this, slot); |
|
158 } |
|
159 |
|
160 void setJSHTMLDirectoryElementCompact(ExecState* exec, JSObject* thisObject, JSValue value) |
|
161 { |
|
162 JSHTMLDirectoryElement* castedThis = static_cast<JSHTMLDirectoryElement*>(thisObject); |
|
163 HTMLDirectoryElement* imp = static_cast<HTMLDirectoryElement*>(castedThis->impl()); |
|
164 imp->setBooleanAttribute(WebCore::HTMLNames::compactAttr, value.toBoolean(exec)); |
|
165 } |
|
166 |
|
167 JSValue JSHTMLDirectoryElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) |
|
168 { |
|
169 return getDOMConstructor<JSHTMLDirectoryElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); |
|
170 } |
|
171 |
|
172 |
|
173 } |