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 "JSSVGAnimatedLength.h"
27 #include "JSSVGLength.h"
28 #include "SVGLength.h"
29 #include <wtf/GetPtr.h>
35 ASSERT_CLASS_FITS_IN_CELL(JSSVGAnimatedLength);
39 #define THUNK_GENERATOR(generator) , generator
41 #define THUNK_GENERATOR(generator)
44 #define INTRINSIC(intrinsic) , intrinsic
46 #define INTRINSIC(intrinsic)
49 static const HashTableValue JSSVGAnimatedLengthTableValues[] =
51 { "baseVal", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGAnimatedLengthBaseVal), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
52 { "animVal", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGAnimatedLengthAnimVal), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
53 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGAnimatedLengthConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
54 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
57 #undef THUNK_GENERATOR
58 static const HashTable JSSVGAnimatedLengthTable = { 8, 7, JSSVGAnimatedLengthTableValues, 0 };
59 /* Hash table for constructor */
61 #define THUNK_GENERATOR(generator) , generator
63 #define THUNK_GENERATOR(generator)
66 #define INTRINSIC(intrinsic) , intrinsic
68 #define INTRINSIC(intrinsic)
71 static const HashTableValue JSSVGAnimatedLengthConstructorTableValues[] =
73 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
76 #undef THUNK_GENERATOR
77 static const HashTable JSSVGAnimatedLengthConstructorTable = { 1, 0, JSSVGAnimatedLengthConstructorTableValues, 0 };
78 const ClassInfo JSSVGAnimatedLengthConstructor::s_info = { "SVGAnimatedLengthConstructor", &DOMConstructorObject::s_info, &JSSVGAnimatedLengthConstructorTable, 0, CREATE_METHOD_TABLE(JSSVGAnimatedLengthConstructor) };
80 JSSVGAnimatedLengthConstructor::JSSVGAnimatedLengthConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
81 : DOMConstructorObject(structure, globalObject)
85 void JSSVGAnimatedLengthConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
87 Base::finishCreation(exec->globalData());
88 ASSERT(inherits(&s_info));
89 putDirect(exec->globalData(), exec->propertyNames().prototype, JSSVGAnimatedLengthPrototype::self(exec, globalObject), DontDelete | ReadOnly);
92 bool JSSVGAnimatedLengthConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
94 return getStaticValueSlot<JSSVGAnimatedLengthConstructor, JSDOMWrapper>(exec, &JSSVGAnimatedLengthConstructorTable, static_cast<JSSVGAnimatedLengthConstructor*>(cell), propertyName, slot);
97 bool JSSVGAnimatedLengthConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
99 return getStaticValueDescriptor<JSSVGAnimatedLengthConstructor, JSDOMWrapper>(exec, &JSSVGAnimatedLengthConstructorTable, static_cast<JSSVGAnimatedLengthConstructor*>(object), propertyName, descriptor);
102 /* Hash table for prototype */
104 #define THUNK_GENERATOR(generator) , generator
106 #define THUNK_GENERATOR(generator)
109 #define INTRINSIC(intrinsic) , intrinsic
111 #define INTRINSIC(intrinsic)
114 static const HashTableValue JSSVGAnimatedLengthPrototypeTableValues[] =
116 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
119 #undef THUNK_GENERATOR
120 static const HashTable JSSVGAnimatedLengthPrototypeTable = { 1, 0, JSSVGAnimatedLengthPrototypeTableValues, 0 };
121 const ClassInfo JSSVGAnimatedLengthPrototype::s_info = { "SVGAnimatedLengthPrototype", &JSC::JSNonFinalObject::s_info, &JSSVGAnimatedLengthPrototypeTable, 0, CREATE_METHOD_TABLE(JSSVGAnimatedLengthPrototype) };
123 JSObject* JSSVGAnimatedLengthPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
125 return getDOMPrototype<JSSVGAnimatedLength>(exec, globalObject);
128 const ClassInfo JSSVGAnimatedLength::s_info = { "SVGAnimatedLength", &JSDOMWrapper::s_info, &JSSVGAnimatedLengthTable, 0 , CREATE_METHOD_TABLE(JSSVGAnimatedLength) };
130 JSSVGAnimatedLength::JSSVGAnimatedLength(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGAnimatedLength> impl)
131 : JSDOMWrapper(structure, globalObject)
132 , m_impl(impl.leakRef())
136 void JSSVGAnimatedLength::finishCreation(JSGlobalData& globalData)
138 Base::finishCreation(globalData);
139 ASSERT(inherits(&s_info));
142 JSObject* JSSVGAnimatedLength::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
144 return JSSVGAnimatedLengthPrototype::create(exec->globalData(), globalObject, JSSVGAnimatedLengthPrototype::createStructure(globalObject->globalData(), globalObject, globalObject->objectPrototype()));
147 bool JSSVGAnimatedLength::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
149 JSSVGAnimatedLength* thisObject = jsCast<JSSVGAnimatedLength*>(cell);
150 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
151 return getStaticValueSlot<JSSVGAnimatedLength, Base>(exec, &JSSVGAnimatedLengthTable, thisObject, propertyName, slot);
154 bool JSSVGAnimatedLength::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
156 JSSVGAnimatedLength* thisObject = jsCast<JSSVGAnimatedLength*>(object);
157 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
158 return getStaticValueDescriptor<JSSVGAnimatedLength, Base>(exec, &JSSVGAnimatedLengthTable, thisObject, propertyName, descriptor);
161 JSValue jsSVGAnimatedLengthBaseVal(ExecState* exec, JSValue slotBase, const Identifier&)
163 JSSVGAnimatedLength* castedThis = static_cast<JSSVGAnimatedLength*>(asObject(slotBase));
165 SVGAnimatedLength* imp = static_cast<SVGAnimatedLength*>(castedThis->impl());
166 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(static_cast<SVGPropertyTearOff<SVGLength>*>(imp->baseVal())));
171 JSValue jsSVGAnimatedLengthAnimVal(ExecState* exec, JSValue slotBase, const Identifier&)
173 JSSVGAnimatedLength* castedThis = static_cast<JSSVGAnimatedLength*>(asObject(slotBase));
175 SVGAnimatedLength* imp = static_cast<SVGAnimatedLength*>(castedThis->impl());
176 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(static_cast<SVGPropertyTearOff<SVGLength>*>(imp->animVal())));
181 JSValue jsSVGAnimatedLengthConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
183 JSSVGAnimatedLength* domObject = static_cast<JSSVGAnimatedLength*>(asObject(slotBase));
184 return JSSVGAnimatedLength::getConstructor(exec, domObject->globalObject());
187 JSValue JSSVGAnimatedLength::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
189 return getDOMConstructor<JSSVGAnimatedLengthConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
192 static inline bool isObservable(JSSVGAnimatedLength* jsSVGAnimatedLength)
194 if (jsSVGAnimatedLength->hasCustomProperties())
199 bool JSSVGAnimatedLengthOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
201 JSSVGAnimatedLength* jsSVGAnimatedLength = static_cast<JSSVGAnimatedLength*>(handle.get().asCell());
202 if (!isObservable(jsSVGAnimatedLength))
204 UNUSED_PARAM(visitor);
208 void JSSVGAnimatedLengthOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
210 JSSVGAnimatedLength* jsSVGAnimatedLength = static_cast<JSSVGAnimatedLength*>(handle.get().asCell());
211 DOMWrapperWorld* world = static_cast<DOMWrapperWorld*>(context);
212 uncacheWrapper(world, jsSVGAnimatedLength->impl(), jsSVGAnimatedLength);
213 jsSVGAnimatedLength->releaseImpl();
216 JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGAnimatedLength* impl)
218 return wrap<JSSVGAnimatedLength>(exec, globalObject, impl);
221 SVGAnimatedLength* toSVGAnimatedLength(JSC::JSValue value)
223 return value.inherits(&JSSVGAnimatedLength::s_info) ? static_cast<JSSVGAnimatedLength*>(asObject(value))->impl() : 0;
228 #endif // ENABLE(SVG)