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.
25 #include "JSSVGCursorElement.h"
27 #include "ExceptionCode.h"
28 #include "JSDOMBinding.h"
29 #include "JSSVGAnimatedBoolean.h"
30 #include "JSSVGAnimatedLength.h"
31 #include "JSSVGAnimatedString.h"
32 #include "JSSVGStringList.h"
33 #include "SVGCursorElement.h"
34 #include "SVGStringList.h"
35 #include <runtime/Error.h>
36 #include <wtf/GetPtr.h>
42 ASSERT_CLASS_FITS_IN_CELL(JSSVGCursorElement);
46 #define THUNK_GENERATOR(generator) , generator
48 #define THUNK_GENERATOR(generator)
51 #define INTRINSIC(intrinsic) , intrinsic
53 #define INTRINSIC(intrinsic)
56 static const HashTableValue JSSVGCursorElementTableValues[] =
58 { "x", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCursorElementX), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
59 { "y", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCursorElementY), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
60 { "href", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCursorElementHref), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
61 { "requiredFeatures", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCursorElementRequiredFeatures), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
62 { "requiredExtensions", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCursorElementRequiredExtensions), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
63 { "systemLanguage", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCursorElementSystemLanguage), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
64 { "externalResourcesRequired", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCursorElementExternalResourcesRequired), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
65 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCursorElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
66 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
69 #undef THUNK_GENERATOR
70 static const HashTable JSSVGCursorElementTable = { 18, 15, JSSVGCursorElementTableValues, 0 };
71 /* Hash table for constructor */
73 #define THUNK_GENERATOR(generator) , generator
75 #define THUNK_GENERATOR(generator)
78 #define INTRINSIC(intrinsic) , intrinsic
80 #define INTRINSIC(intrinsic)
83 static const HashTableValue JSSVGCursorElementConstructorTableValues[] =
85 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
88 #undef THUNK_GENERATOR
89 static const HashTable JSSVGCursorElementConstructorTable = { 1, 0, JSSVGCursorElementConstructorTableValues, 0 };
90 const ClassInfo JSSVGCursorElementConstructor::s_info = { "SVGCursorElementConstructor", &DOMConstructorObject::s_info, &JSSVGCursorElementConstructorTable, 0, CREATE_METHOD_TABLE(JSSVGCursorElementConstructor) };
92 JSSVGCursorElementConstructor::JSSVGCursorElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
93 : DOMConstructorObject(structure, globalObject)
97 void JSSVGCursorElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
99 Base::finishCreation(exec->globalData());
100 ASSERT(inherits(&s_info));
101 putDirect(exec->globalData(), exec->propertyNames().prototype, JSSVGCursorElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
104 bool JSSVGCursorElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
106 return getStaticValueSlot<JSSVGCursorElementConstructor, JSDOMWrapper>(exec, &JSSVGCursorElementConstructorTable, static_cast<JSSVGCursorElementConstructor*>(cell), propertyName, slot);
109 bool JSSVGCursorElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
111 return getStaticValueDescriptor<JSSVGCursorElementConstructor, JSDOMWrapper>(exec, &JSSVGCursorElementConstructorTable, static_cast<JSSVGCursorElementConstructor*>(object), propertyName, descriptor);
114 /* Hash table for prototype */
116 #define THUNK_GENERATOR(generator) , generator
118 #define THUNK_GENERATOR(generator)
121 #define INTRINSIC(intrinsic) , intrinsic
123 #define INTRINSIC(intrinsic)
126 static const HashTableValue JSSVGCursorElementPrototypeTableValues[] =
128 { "hasExtension", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGCursorElementPrototypeFunctionHasExtension), (intptr_t)1 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
129 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
132 #undef THUNK_GENERATOR
133 static const HashTable JSSVGCursorElementPrototypeTable = { 2, 1, JSSVGCursorElementPrototypeTableValues, 0 };
134 const ClassInfo JSSVGCursorElementPrototype::s_info = { "SVGCursorElementPrototype", &JSC::JSNonFinalObject::s_info, &JSSVGCursorElementPrototypeTable, 0, CREATE_METHOD_TABLE(JSSVGCursorElementPrototype) };
136 JSObject* JSSVGCursorElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
138 return getDOMPrototype<JSSVGCursorElement>(exec, globalObject);
141 bool JSSVGCursorElementPrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
143 JSSVGCursorElementPrototype* thisObject = jsCast<JSSVGCursorElementPrototype*>(cell);
144 return getStaticFunctionSlot<JSObject>(exec, &JSSVGCursorElementPrototypeTable, thisObject, propertyName, slot);
147 bool JSSVGCursorElementPrototype::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
149 JSSVGCursorElementPrototype* thisObject = jsCast<JSSVGCursorElementPrototype*>(object);
150 return getStaticFunctionDescriptor<JSObject>(exec, &JSSVGCursorElementPrototypeTable, thisObject, propertyName, descriptor);
153 const ClassInfo JSSVGCursorElement::s_info = { "SVGCursorElement", &JSSVGElement::s_info, &JSSVGCursorElementTable, 0 , CREATE_METHOD_TABLE(JSSVGCursorElement) };
155 JSSVGCursorElement::JSSVGCursorElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGCursorElement> impl)
156 : JSSVGElement(structure, globalObject, impl)
160 void JSSVGCursorElement::finishCreation(JSGlobalData& globalData)
162 Base::finishCreation(globalData);
163 ASSERT(inherits(&s_info));
166 JSObject* JSSVGCursorElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
168 return JSSVGCursorElementPrototype::create(exec->globalData(), globalObject, JSSVGCursorElementPrototype::createStructure(exec->globalData(), globalObject, JSSVGElementPrototype::self(exec, globalObject)));
171 bool JSSVGCursorElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
173 JSSVGCursorElement* thisObject = jsCast<JSSVGCursorElement*>(cell);
174 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
175 return getStaticValueSlot<JSSVGCursorElement, Base>(exec, &JSSVGCursorElementTable, thisObject, propertyName, slot);
178 bool JSSVGCursorElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
180 JSSVGCursorElement* thisObject = jsCast<JSSVGCursorElement*>(object);
181 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
182 return getStaticValueDescriptor<JSSVGCursorElement, Base>(exec, &JSSVGCursorElementTable, thisObject, propertyName, descriptor);
185 JSValue jsSVGCursorElementX(ExecState* exec, JSValue slotBase, const Identifier&)
187 JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slotBase));
189 SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl());
190 RefPtr<SVGAnimatedLength> obj = imp->xAnimated();
191 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
196 JSValue jsSVGCursorElementY(ExecState* exec, JSValue slotBase, const Identifier&)
198 JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slotBase));
200 SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl());
201 RefPtr<SVGAnimatedLength> obj = imp->yAnimated();
202 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
207 JSValue jsSVGCursorElementHref(ExecState* exec, JSValue slotBase, const Identifier&)
209 JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slotBase));
211 SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl());
212 RefPtr<SVGAnimatedString> obj = imp->hrefAnimated();
213 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
218 JSValue jsSVGCursorElementRequiredFeatures(ExecState* exec, JSValue slotBase, const Identifier&)
220 JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slotBase));
222 SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl());
223 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGStaticListPropertyTearOff<SVGStringList>::create(imp, imp->requiredFeatures())));
228 JSValue jsSVGCursorElementRequiredExtensions(ExecState* exec, JSValue slotBase, const Identifier&)
230 JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slotBase));
232 SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl());
233 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGStaticListPropertyTearOff<SVGStringList>::create(imp, imp->requiredExtensions())));
238 JSValue jsSVGCursorElementSystemLanguage(ExecState* exec, JSValue slotBase, const Identifier&)
240 JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slotBase));
242 SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl());
243 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGStaticListPropertyTearOff<SVGStringList>::create(imp, imp->systemLanguage())));
248 JSValue jsSVGCursorElementExternalResourcesRequired(ExecState* exec, JSValue slotBase, const Identifier&)
250 JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slotBase));
252 SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl());
253 RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated();
254 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
259 JSValue jsSVGCursorElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
261 JSSVGCursorElement* domObject = static_cast<JSSVGCursorElement*>(asObject(slotBase));
262 return JSSVGCursorElement::getConstructor(exec, domObject->globalObject());
265 JSValue JSSVGCursorElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
267 return getDOMConstructor<JSSVGCursorElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
270 EncodedJSValue JSC_HOST_CALL jsSVGCursorElementPrototypeFunctionHasExtension(ExecState* exec)
272 JSValue thisValue = exec->hostThisValue();
273 if (!thisValue.inherits(&JSSVGCursorElement::s_info))
274 return throwVMTypeError(exec);
275 JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(thisValue));
276 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSSVGCursorElement::s_info);
277 SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl());
278 const String& extension(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toString(exec)));
279 if (exec->hadException())
280 return JSValue::encode(jsUndefined());
282 JSC::JSValue result = jsBoolean(imp->hasExtension(extension));
283 return JSValue::encode(result);
289 #endif // ENABLE(SVG)