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.
23 #if ENABLE(SVG) && ENABLE(SVG_FONTS)
25 #include "JSSVGAltGlyphElement.h"
27 #include "JSSVGAnimatedString.h"
29 #include "SVGAltGlyphElement.h"
30 #include <runtime/JSString.h>
31 #include <wtf/GetPtr.h>
37 ASSERT_CLASS_FITS_IN_CELL(JSSVGAltGlyphElement);
41 #define THUNK_GENERATOR(generator) , generator
43 #define THUNK_GENERATOR(generator)
46 #define INTRINSIC(intrinsic) , intrinsic
48 #define INTRINSIC(intrinsic)
51 static const HashTableValue JSSVGAltGlyphElementTableValues[] =
53 { "glyphRef", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGAltGlyphElementGlyphRef), (intptr_t)setJSSVGAltGlyphElementGlyphRef THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
54 { "format", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGAltGlyphElementFormat), (intptr_t)setJSSVGAltGlyphElementFormat THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
55 { "href", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGAltGlyphElementHref), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
56 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGAltGlyphElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
57 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
60 #undef THUNK_GENERATOR
61 static const HashTable JSSVGAltGlyphElementTable = { 8, 7, JSSVGAltGlyphElementTableValues, 0 };
62 /* Hash table for constructor */
64 #define THUNK_GENERATOR(generator) , generator
66 #define THUNK_GENERATOR(generator)
69 #define INTRINSIC(intrinsic) , intrinsic
71 #define INTRINSIC(intrinsic)
74 static const HashTableValue JSSVGAltGlyphElementConstructorTableValues[] =
76 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
79 #undef THUNK_GENERATOR
80 static const HashTable JSSVGAltGlyphElementConstructorTable = { 1, 0, JSSVGAltGlyphElementConstructorTableValues, 0 };
81 const ClassInfo JSSVGAltGlyphElementConstructor::s_info = { "SVGAltGlyphElementConstructor", &DOMConstructorObject::s_info, &JSSVGAltGlyphElementConstructorTable, 0, CREATE_METHOD_TABLE(JSSVGAltGlyphElementConstructor) };
83 JSSVGAltGlyphElementConstructor::JSSVGAltGlyphElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
84 : DOMConstructorObject(structure, globalObject)
88 void JSSVGAltGlyphElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
90 Base::finishCreation(exec->globalData());
91 ASSERT(inherits(&s_info));
92 putDirect(exec->globalData(), exec->propertyNames().prototype, JSSVGAltGlyphElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
95 bool JSSVGAltGlyphElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
97 return getStaticValueSlot<JSSVGAltGlyphElementConstructor, JSDOMWrapper>(exec, &JSSVGAltGlyphElementConstructorTable, static_cast<JSSVGAltGlyphElementConstructor*>(cell), propertyName, slot);
100 bool JSSVGAltGlyphElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
102 return getStaticValueDescriptor<JSSVGAltGlyphElementConstructor, JSDOMWrapper>(exec, &JSSVGAltGlyphElementConstructorTable, static_cast<JSSVGAltGlyphElementConstructor*>(object), propertyName, descriptor);
105 /* Hash table for prototype */
107 #define THUNK_GENERATOR(generator) , generator
109 #define THUNK_GENERATOR(generator)
112 #define INTRINSIC(intrinsic) , intrinsic
114 #define INTRINSIC(intrinsic)
117 static const HashTableValue JSSVGAltGlyphElementPrototypeTableValues[] =
119 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
122 #undef THUNK_GENERATOR
123 static const HashTable JSSVGAltGlyphElementPrototypeTable = { 1, 0, JSSVGAltGlyphElementPrototypeTableValues, 0 };
124 const ClassInfo JSSVGAltGlyphElementPrototype::s_info = { "SVGAltGlyphElementPrototype", &JSC::JSNonFinalObject::s_info, &JSSVGAltGlyphElementPrototypeTable, 0, CREATE_METHOD_TABLE(JSSVGAltGlyphElementPrototype) };
126 JSObject* JSSVGAltGlyphElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
128 return getDOMPrototype<JSSVGAltGlyphElement>(exec, globalObject);
131 const ClassInfo JSSVGAltGlyphElement::s_info = { "SVGAltGlyphElement", &JSSVGTextPositioningElement::s_info, &JSSVGAltGlyphElementTable, 0 , CREATE_METHOD_TABLE(JSSVGAltGlyphElement) };
133 JSSVGAltGlyphElement::JSSVGAltGlyphElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGAltGlyphElement> impl)
134 : JSSVGTextPositioningElement(structure, globalObject, impl)
138 void JSSVGAltGlyphElement::finishCreation(JSGlobalData& globalData)
140 Base::finishCreation(globalData);
141 ASSERT(inherits(&s_info));
144 JSObject* JSSVGAltGlyphElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
146 return JSSVGAltGlyphElementPrototype::create(exec->globalData(), globalObject, JSSVGAltGlyphElementPrototype::createStructure(exec->globalData(), globalObject, JSSVGTextPositioningElementPrototype::self(exec, globalObject)));
149 bool JSSVGAltGlyphElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
151 JSSVGAltGlyphElement* thisObject = jsCast<JSSVGAltGlyphElement*>(cell);
152 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
153 return getStaticValueSlot<JSSVGAltGlyphElement, Base>(exec, &JSSVGAltGlyphElementTable, thisObject, propertyName, slot);
156 bool JSSVGAltGlyphElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
158 JSSVGAltGlyphElement* thisObject = jsCast<JSSVGAltGlyphElement*>(object);
159 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
160 return getStaticValueDescriptor<JSSVGAltGlyphElement, Base>(exec, &JSSVGAltGlyphElementTable, thisObject, propertyName, descriptor);
163 JSValue jsSVGAltGlyphElementGlyphRef(ExecState* exec, JSValue slotBase, const Identifier&)
165 JSSVGAltGlyphElement* castedThis = static_cast<JSSVGAltGlyphElement*>(asObject(slotBase));
167 SVGAltGlyphElement* imp = static_cast<SVGAltGlyphElement*>(castedThis->impl());
168 JSValue result = jsString(exec, imp->glyphRef());
173 JSValue jsSVGAltGlyphElementFormat(ExecState* exec, JSValue slotBase, const Identifier&)
175 JSSVGAltGlyphElement* castedThis = static_cast<JSSVGAltGlyphElement*>(asObject(slotBase));
177 SVGAltGlyphElement* imp = static_cast<SVGAltGlyphElement*>(castedThis->impl());
178 JSValue result = jsString(exec, imp->format());
183 JSValue jsSVGAltGlyphElementHref(ExecState* exec, JSValue slotBase, const Identifier&)
185 JSSVGAltGlyphElement* castedThis = static_cast<JSSVGAltGlyphElement*>(asObject(slotBase));
187 SVGAltGlyphElement* imp = static_cast<SVGAltGlyphElement*>(castedThis->impl());
188 RefPtr<SVGAnimatedString> obj = imp->hrefAnimated();
189 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
194 JSValue jsSVGAltGlyphElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
196 JSSVGAltGlyphElement* domObject = static_cast<JSSVGAltGlyphElement*>(asObject(slotBase));
197 return JSSVGAltGlyphElement::getConstructor(exec, domObject->globalObject());
200 void JSSVGAltGlyphElement::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
202 JSSVGAltGlyphElement* thisObject = jsCast<JSSVGAltGlyphElement*>(cell);
203 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
204 lookupPut<JSSVGAltGlyphElement, Base>(exec, propertyName, value, &JSSVGAltGlyphElementTable, thisObject, slot);
207 void setJSSVGAltGlyphElementGlyphRef(ExecState* exec, JSObject* thisObject, JSValue value)
209 JSSVGAltGlyphElement* castedThis = static_cast<JSSVGAltGlyphElement*>(thisObject);
210 SVGAltGlyphElement* imp = static_cast<SVGAltGlyphElement*>(castedThis->impl());
211 ExceptionCode ec = 0;
212 imp->setGlyphRef(ustringToString(value.isEmpty() ? UString() : value.toString(exec)), ec);
213 setDOMException(exec, ec);
217 void setJSSVGAltGlyphElementFormat(ExecState* exec, JSObject* thisObject, JSValue value)
219 JSSVGAltGlyphElement* castedThis = static_cast<JSSVGAltGlyphElement*>(thisObject);
220 SVGAltGlyphElement* imp = static_cast<SVGAltGlyphElement*>(castedThis->impl());
221 ExceptionCode ec = 0;
222 imp->setFormat(ustringToString(value.isEmpty() ? UString() : value.toString(exec)), ec);
223 setDOMException(exec, ec);
227 JSValue JSSVGAltGlyphElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
229 return getDOMConstructor<JSSVGAltGlyphElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
235 #endif // ENABLE(SVG) && ENABLE(SVG_FONTS)