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