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 "JSSVGViewElement.h"
27 #include "JSSVGAnimatedBoolean.h"
28 #include "JSSVGAnimatedPreserveAspectRatio.h"
29 #include "JSSVGAnimatedRect.h"
30 #include "JSSVGStringList.h"
31 #include "SVGStringList.h"
32 #include "SVGViewElement.h"
33 #include <wtf/GetPtr.h>
39 ASSERT_CLASS_FITS_IN_CELL(JSSVGViewElement);
43 #define THUNK_GENERATOR(generator) , generator
45 #define THUNK_GENERATOR(generator)
48 #define INTRINSIC(intrinsic) , intrinsic
50 #define INTRINSIC(intrinsic)
53 static const HashTableValue JSSVGViewElementTableValues[] =
55 { "viewTarget", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGViewElementViewTarget), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
56 { "externalResourcesRequired", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGViewElementExternalResourcesRequired), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
57 { "viewBox", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGViewElementViewBox), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
58 { "preserveAspectRatio", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGViewElementPreserveAspectRatio), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
59 { "zoomAndPan", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGViewElementZoomAndPan), (intptr_t)setJSSVGViewElementZoomAndPan THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
60 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGViewElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
61 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
64 #undef THUNK_GENERATOR
65 static const HashTable JSSVGViewElementTable = { 16, 15, JSSVGViewElementTableValues, 0 };
66 /* Hash table for constructor */
68 #define THUNK_GENERATOR(generator) , generator
70 #define THUNK_GENERATOR(generator)
73 #define INTRINSIC(intrinsic) , intrinsic
75 #define INTRINSIC(intrinsic)
78 static const HashTableValue JSSVGViewElementConstructorTableValues[] =
80 { "SVG_ZOOMANDPAN_UNKNOWN", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGViewElementSVG_ZOOMANDPAN_UNKNOWN), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
81 { "SVG_ZOOMANDPAN_DISABLE", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGViewElementSVG_ZOOMANDPAN_DISABLE), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
82 { "SVG_ZOOMANDPAN_MAGNIFY", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGViewElementSVG_ZOOMANDPAN_MAGNIFY), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
83 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
86 #undef THUNK_GENERATOR
87 static const HashTable JSSVGViewElementConstructorTable = { 9, 7, JSSVGViewElementConstructorTableValues, 0 };
89 COMPILE_ASSERT(0 == SVGViewElement::SVG_ZOOMANDPAN_UNKNOWN, SVGViewElementEnumSVG_ZOOMANDPAN_UNKNOWNIsWrongUseDontCheckEnums);
90 COMPILE_ASSERT(1 == SVGViewElement::SVG_ZOOMANDPAN_DISABLE, SVGViewElementEnumSVG_ZOOMANDPAN_DISABLEIsWrongUseDontCheckEnums);
91 COMPILE_ASSERT(2 == SVGViewElement::SVG_ZOOMANDPAN_MAGNIFY, SVGViewElementEnumSVG_ZOOMANDPAN_MAGNIFYIsWrongUseDontCheckEnums);
93 const ClassInfo JSSVGViewElementConstructor::s_info = { "SVGViewElementConstructor", &DOMConstructorObject::s_info, &JSSVGViewElementConstructorTable, 0, CREATE_METHOD_TABLE(JSSVGViewElementConstructor) };
95 JSSVGViewElementConstructor::JSSVGViewElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
96 : DOMConstructorObject(structure, globalObject)
100 void JSSVGViewElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
102 Base::finishCreation(exec->globalData());
103 ASSERT(inherits(&s_info));
104 putDirect(exec->globalData(), exec->propertyNames().prototype, JSSVGViewElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
107 bool JSSVGViewElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
109 return getStaticValueSlot<JSSVGViewElementConstructor, JSDOMWrapper>(exec, &JSSVGViewElementConstructorTable, static_cast<JSSVGViewElementConstructor*>(cell), propertyName, slot);
112 bool JSSVGViewElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
114 return getStaticValueDescriptor<JSSVGViewElementConstructor, JSDOMWrapper>(exec, &JSSVGViewElementConstructorTable, static_cast<JSSVGViewElementConstructor*>(object), propertyName, descriptor);
117 /* Hash table for prototype */
119 #define THUNK_GENERATOR(generator) , generator
121 #define THUNK_GENERATOR(generator)
124 #define INTRINSIC(intrinsic) , intrinsic
126 #define INTRINSIC(intrinsic)
129 static const HashTableValue JSSVGViewElementPrototypeTableValues[] =
131 { "SVG_ZOOMANDPAN_UNKNOWN", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGViewElementSVG_ZOOMANDPAN_UNKNOWN), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
132 { "SVG_ZOOMANDPAN_DISABLE", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGViewElementSVG_ZOOMANDPAN_DISABLE), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
133 { "SVG_ZOOMANDPAN_MAGNIFY", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGViewElementSVG_ZOOMANDPAN_MAGNIFY), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
134 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
137 #undef THUNK_GENERATOR
138 static const HashTable JSSVGViewElementPrototypeTable = { 9, 7, JSSVGViewElementPrototypeTableValues, 0 };
139 const ClassInfo JSSVGViewElementPrototype::s_info = { "SVGViewElementPrototype", &JSC::JSNonFinalObject::s_info, &JSSVGViewElementPrototypeTable, 0, CREATE_METHOD_TABLE(JSSVGViewElementPrototype) };
141 JSObject* JSSVGViewElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
143 return getDOMPrototype<JSSVGViewElement>(exec, globalObject);
146 bool JSSVGViewElementPrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
148 JSSVGViewElementPrototype* thisObject = jsCast<JSSVGViewElementPrototype*>(cell);
149 return getStaticValueSlot<JSSVGViewElementPrototype, JSObject>(exec, &JSSVGViewElementPrototypeTable, thisObject, propertyName, slot);
152 bool JSSVGViewElementPrototype::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
154 JSSVGViewElementPrototype* thisObject = jsCast<JSSVGViewElementPrototype*>(object);
155 return getStaticValueDescriptor<JSSVGViewElementPrototype, JSObject>(exec, &JSSVGViewElementPrototypeTable, thisObject, propertyName, descriptor);
158 const ClassInfo JSSVGViewElement::s_info = { "SVGViewElement", &JSSVGElement::s_info, &JSSVGViewElementTable, 0 , CREATE_METHOD_TABLE(JSSVGViewElement) };
160 JSSVGViewElement::JSSVGViewElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGViewElement> impl)
161 : JSSVGElement(structure, globalObject, impl)
165 void JSSVGViewElement::finishCreation(JSGlobalData& globalData)
167 Base::finishCreation(globalData);
168 ASSERT(inherits(&s_info));
171 JSObject* JSSVGViewElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
173 return JSSVGViewElementPrototype::create(exec->globalData(), globalObject, JSSVGViewElementPrototype::createStructure(exec->globalData(), globalObject, JSSVGElementPrototype::self(exec, globalObject)));
176 bool JSSVGViewElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
178 JSSVGViewElement* thisObject = jsCast<JSSVGViewElement*>(cell);
179 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
180 return getStaticValueSlot<JSSVGViewElement, Base>(exec, &JSSVGViewElementTable, thisObject, propertyName, slot);
183 bool JSSVGViewElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
185 JSSVGViewElement* thisObject = jsCast<JSSVGViewElement*>(object);
186 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
187 return getStaticValueDescriptor<JSSVGViewElement, Base>(exec, &JSSVGViewElementTable, thisObject, propertyName, descriptor);
190 JSValue jsSVGViewElementViewTarget(ExecState* exec, JSValue slotBase, const Identifier&)
192 JSSVGViewElement* castedThis = static_cast<JSSVGViewElement*>(asObject(slotBase));
194 SVGViewElement* imp = static_cast<SVGViewElement*>(castedThis->impl());
195 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGStaticListPropertyTearOff<SVGStringList>::create(imp, imp->viewTarget())));
200 JSValue jsSVGViewElementExternalResourcesRequired(ExecState* exec, JSValue slotBase, const Identifier&)
202 JSSVGViewElement* castedThis = static_cast<JSSVGViewElement*>(asObject(slotBase));
204 SVGViewElement* imp = static_cast<SVGViewElement*>(castedThis->impl());
205 RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated();
206 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
211 JSValue jsSVGViewElementViewBox(ExecState* exec, JSValue slotBase, const Identifier&)
213 JSSVGViewElement* castedThis = static_cast<JSSVGViewElement*>(asObject(slotBase));
215 SVGViewElement* imp = static_cast<SVGViewElement*>(castedThis->impl());
216 RefPtr<SVGAnimatedRect> obj = imp->viewBoxAnimated();
217 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
222 JSValue jsSVGViewElementPreserveAspectRatio(ExecState* exec, JSValue slotBase, const Identifier&)
224 JSSVGViewElement* castedThis = static_cast<JSSVGViewElement*>(asObject(slotBase));
226 SVGViewElement* imp = static_cast<SVGViewElement*>(castedThis->impl());
227 RefPtr<SVGAnimatedPreserveAspectRatio> obj = imp->preserveAspectRatioAnimated();
228 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
233 JSValue jsSVGViewElementZoomAndPan(ExecState* exec, JSValue slotBase, const Identifier&)
235 JSSVGViewElement* castedThis = static_cast<JSSVGViewElement*>(asObject(slotBase));
237 SVGViewElement* imp = static_cast<SVGViewElement*>(castedThis->impl());
238 JSValue result = jsNumber(imp->zoomAndPan());
243 JSValue jsSVGViewElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
245 JSSVGViewElement* domObject = static_cast<JSSVGViewElement*>(asObject(slotBase));
246 return JSSVGViewElement::getConstructor(exec, domObject->globalObject());
249 void JSSVGViewElement::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
251 JSSVGViewElement* thisObject = jsCast<JSSVGViewElement*>(cell);
252 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
253 lookupPut<JSSVGViewElement, Base>(exec, propertyName, value, &JSSVGViewElementTable, thisObject, slot);
256 void setJSSVGViewElementZoomAndPan(ExecState* exec, JSObject* thisObject, JSValue value)
258 JSSVGViewElement* castedThis = static_cast<JSSVGViewElement*>(thisObject);
259 SVGViewElement* imp = static_cast<SVGViewElement*>(castedThis->impl());
260 imp->setZoomAndPan(value.toUInt32(exec));
264 JSValue JSSVGViewElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
266 return getDOMConstructor<JSSVGViewElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
271 JSValue jsSVGViewElementSVG_ZOOMANDPAN_UNKNOWN(ExecState* exec, JSValue, const Identifier&)
274 return jsNumber(static_cast<int>(0));
277 JSValue jsSVGViewElementSVG_ZOOMANDPAN_DISABLE(ExecState* exec, JSValue, const Identifier&)
280 return jsNumber(static_cast<int>(1));
283 JSValue jsSVGViewElementSVG_ZOOMANDPAN_MAGNIFY(ExecState* exec, JSValue, const Identifier&)
286 return jsNumber(static_cast<int>(2));
292 #endif // ENABLE(SVG)