|
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 "JSHTMLDivElement.h" |
|
23 |
|
24 #include "HTMLDivElement.h" |
|
25 #include "HTMLNames.h" |
|
26 #include "KURL.h" |
|
27 #include <runtime/JSString.h> |
|
28 #include <wtf/GetPtr.h> |
|
29 |
|
30 using namespace JSC; |
|
31 |
|
32 namespace WebCore { |
|
33 |
|
34 ASSERT_CLASS_FITS_IN_CELL(JSHTMLDivElement); |
|
35 |
|
36 /* Hash table */ |
|
37 #if ENABLE(JIT) |
|
38 #define THUNK_GENERATOR(generator) , generator |
|
39 #else |
|
40 #define THUNK_GENERATOR(generator) |
|
41 #endif |
|
42 |
|
43 static const HashTableValue JSHTMLDivElementTableValues[3] = |
|
44 { |
|
45 { "align", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLDivElementAlign), (intptr_t)setJSHTMLDivElementAlign THUNK_GENERATOR(0) }, |
|
46 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLDivElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
47 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
48 }; |
|
49 |
|
50 #undef THUNK_GENERATOR |
|
51 static JSC_CONST_HASHTABLE HashTable JSHTMLDivElementTable = { 5, 3, JSHTMLDivElementTableValues, 0 }; |
|
52 /* Hash table for constructor */ |
|
53 #if ENABLE(JIT) |
|
54 #define THUNK_GENERATOR(generator) , generator |
|
55 #else |
|
56 #define THUNK_GENERATOR(generator) |
|
57 #endif |
|
58 |
|
59 static const HashTableValue JSHTMLDivElementConstructorTableValues[1] = |
|
60 { |
|
61 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
62 }; |
|
63 |
|
64 #undef THUNK_GENERATOR |
|
65 static JSC_CONST_HASHTABLE HashTable JSHTMLDivElementConstructorTable = { 1, 0, JSHTMLDivElementConstructorTableValues, 0 }; |
|
66 class JSHTMLDivElementConstructor : public DOMConstructorObject { |
|
67 public: |
|
68 JSHTMLDivElementConstructor(JSC::ExecState*, JSDOMGlobalObject*); |
|
69 |
|
70 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); |
|
71 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); |
|
72 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } |
|
73 static const JSC::ClassInfo s_info; |
|
74 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) |
|
75 { |
|
76 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); |
|
77 } |
|
78 protected: |
|
79 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; |
|
80 }; |
|
81 |
|
82 const ClassInfo JSHTMLDivElementConstructor::s_info = { "HTMLDivElementConstructor", 0, &JSHTMLDivElementConstructorTable, 0 }; |
|
83 |
|
84 JSHTMLDivElementConstructor::JSHTMLDivElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) |
|
85 : DOMConstructorObject(JSHTMLDivElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) |
|
86 { |
|
87 putDirect(exec->propertyNames().prototype, JSHTMLDivElementPrototype::self(exec, globalObject), DontDelete | ReadOnly); |
|
88 } |
|
89 |
|
90 bool JSHTMLDivElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
91 { |
|
92 return getStaticValueSlot<JSHTMLDivElementConstructor, DOMObject>(exec, &JSHTMLDivElementConstructorTable, this, propertyName, slot); |
|
93 } |
|
94 |
|
95 bool JSHTMLDivElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
96 { |
|
97 return getStaticValueDescriptor<JSHTMLDivElementConstructor, DOMObject>(exec, &JSHTMLDivElementConstructorTable, this, propertyName, descriptor); |
|
98 } |
|
99 |
|
100 /* Hash table for prototype */ |
|
101 #if ENABLE(JIT) |
|
102 #define THUNK_GENERATOR(generator) , generator |
|
103 #else |
|
104 #define THUNK_GENERATOR(generator) |
|
105 #endif |
|
106 |
|
107 static const HashTableValue JSHTMLDivElementPrototypeTableValues[1] = |
|
108 { |
|
109 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
110 }; |
|
111 |
|
112 #undef THUNK_GENERATOR |
|
113 static JSC_CONST_HASHTABLE HashTable JSHTMLDivElementPrototypeTable = { 1, 0, JSHTMLDivElementPrototypeTableValues, 0 }; |
|
114 const ClassInfo JSHTMLDivElementPrototype::s_info = { "HTMLDivElementPrototype", 0, &JSHTMLDivElementPrototypeTable, 0 }; |
|
115 |
|
116 JSObject* JSHTMLDivElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject) |
|
117 { |
|
118 return getDOMPrototype<JSHTMLDivElement>(exec, globalObject); |
|
119 } |
|
120 |
|
121 const ClassInfo JSHTMLDivElement::s_info = { "HTMLDivElement", &JSHTMLElement::s_info, &JSHTMLDivElementTable, 0 }; |
|
122 |
|
123 JSHTMLDivElement::JSHTMLDivElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLDivElement> impl) |
|
124 : JSHTMLElement(structure, globalObject, impl) |
|
125 { |
|
126 } |
|
127 |
|
128 JSObject* JSHTMLDivElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject) |
|
129 { |
|
130 return new (exec) JSHTMLDivElementPrototype(globalObject, JSHTMLDivElementPrototype::createStructure(JSHTMLElementPrototype::self(exec, globalObject))); |
|
131 } |
|
132 |
|
133 bool JSHTMLDivElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
134 { |
|
135 return getStaticValueSlot<JSHTMLDivElement, Base>(exec, &JSHTMLDivElementTable, this, propertyName, slot); |
|
136 } |
|
137 |
|
138 bool JSHTMLDivElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
139 { |
|
140 return getStaticValueDescriptor<JSHTMLDivElement, Base>(exec, &JSHTMLDivElementTable, this, propertyName, descriptor); |
|
141 } |
|
142 |
|
143 JSValue jsHTMLDivElementAlign(ExecState* exec, JSValue slotBase, const Identifier&) |
|
144 { |
|
145 JSHTMLDivElement* castedThis = static_cast<JSHTMLDivElement*>(asObject(slotBase)); |
|
146 UNUSED_PARAM(exec); |
|
147 HTMLDivElement* imp = static_cast<HTMLDivElement*>(castedThis->impl()); |
|
148 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::alignAttr)); |
|
149 return result; |
|
150 } |
|
151 |
|
152 JSValue jsHTMLDivElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&) |
|
153 { |
|
154 JSHTMLDivElement* domObject = static_cast<JSHTMLDivElement*>(asObject(slotBase)); |
|
155 return JSHTMLDivElement::getConstructor(exec, domObject->globalObject()); |
|
156 } |
|
157 void JSHTMLDivElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) |
|
158 { |
|
159 lookupPut<JSHTMLDivElement, Base>(exec, propertyName, value, &JSHTMLDivElementTable, this, slot); |
|
160 } |
|
161 |
|
162 void setJSHTMLDivElementAlign(ExecState* exec, JSObject* thisObject, JSValue value) |
|
163 { |
|
164 JSHTMLDivElement* castedThis = static_cast<JSHTMLDivElement*>(thisObject); |
|
165 HTMLDivElement* imp = static_cast<HTMLDivElement*>(castedThis->impl()); |
|
166 imp->setAttribute(WebCore::HTMLNames::alignAttr, valueToStringWithNullCheck(exec, value)); |
|
167 } |
|
168 |
|
169 JSValue JSHTMLDivElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) |
|
170 { |
|
171 return getDOMConstructor<JSHTMLDivElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); |
|
172 } |
|
173 |
|
174 |
|
175 } |