tizen beta release
[profile/ivi/webkit-efl.git] / DerivedSources / WebCore / JSSVGAltGlyphElement.cpp
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
23 #if ENABLE(SVG) && ENABLE(SVG_FONTS)
24
25 #include "JSSVGAltGlyphElement.h"
26
27 #include "JSSVGAnimatedString.h"
28 #include "KURL.h"
29 #include "SVGAltGlyphElement.h"
30 #include <runtime/JSString.h>
31 #include <wtf/GetPtr.h>
32
33 using namespace JSC;
34
35 namespace WebCore {
36
37 ASSERT_CLASS_FITS_IN_CELL(JSSVGAltGlyphElement);
38
39 /* Hash table */
40 #if ENABLE(JIT)
41 #define THUNK_GENERATOR(generator) , generator
42 #else
43 #define THUNK_GENERATOR(generator)
44 #endif
45 #if ENABLE(DFG_JIT)
46 #define INTRINSIC(intrinsic) , intrinsic
47 #else
48 #define INTRINSIC(intrinsic)
49 #endif
50
51 static const HashTableValue JSSVGAltGlyphElementTableValues[] =
52 {
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) }
58 };
59
60 #undef THUNK_GENERATOR
61 static const HashTable JSSVGAltGlyphElementTable = { 8, 7, JSSVGAltGlyphElementTableValues, 0 };
62 /* Hash table for constructor */
63 #if ENABLE(JIT)
64 #define THUNK_GENERATOR(generator) , generator
65 #else
66 #define THUNK_GENERATOR(generator)
67 #endif
68 #if ENABLE(DFG_JIT)
69 #define INTRINSIC(intrinsic) , intrinsic
70 #else
71 #define INTRINSIC(intrinsic)
72 #endif
73
74 static const HashTableValue JSSVGAltGlyphElementConstructorTableValues[] =
75 {
76     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
77 };
78
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) };
82
83 JSSVGAltGlyphElementConstructor::JSSVGAltGlyphElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
84     : DOMConstructorObject(structure, globalObject)
85 {
86 }
87
88 void JSSVGAltGlyphElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
89 {
90     Base::finishCreation(exec->globalData());
91     ASSERT(inherits(&s_info));
92     putDirect(exec->globalData(), exec->propertyNames().prototype, JSSVGAltGlyphElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
93 }
94
95 bool JSSVGAltGlyphElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
96 {
97     return getStaticValueSlot<JSSVGAltGlyphElementConstructor, JSDOMWrapper>(exec, &JSSVGAltGlyphElementConstructorTable, static_cast<JSSVGAltGlyphElementConstructor*>(cell), propertyName, slot);
98 }
99
100 bool JSSVGAltGlyphElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
101 {
102     return getStaticValueDescriptor<JSSVGAltGlyphElementConstructor, JSDOMWrapper>(exec, &JSSVGAltGlyphElementConstructorTable, static_cast<JSSVGAltGlyphElementConstructor*>(object), propertyName, descriptor);
103 }
104
105 /* Hash table for prototype */
106 #if ENABLE(JIT)
107 #define THUNK_GENERATOR(generator) , generator
108 #else
109 #define THUNK_GENERATOR(generator)
110 #endif
111 #if ENABLE(DFG_JIT)
112 #define INTRINSIC(intrinsic) , intrinsic
113 #else
114 #define INTRINSIC(intrinsic)
115 #endif
116
117 static const HashTableValue JSSVGAltGlyphElementPrototypeTableValues[] =
118 {
119     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
120 };
121
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) };
125
126 JSObject* JSSVGAltGlyphElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
127 {
128     return getDOMPrototype<JSSVGAltGlyphElement>(exec, globalObject);
129 }
130
131 const ClassInfo JSSVGAltGlyphElement::s_info = { "SVGAltGlyphElement", &JSSVGTextPositioningElement::s_info, &JSSVGAltGlyphElementTable, 0 , CREATE_METHOD_TABLE(JSSVGAltGlyphElement) };
132
133 JSSVGAltGlyphElement::JSSVGAltGlyphElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGAltGlyphElement> impl)
134     : JSSVGTextPositioningElement(structure, globalObject, impl)
135 {
136 }
137
138 void JSSVGAltGlyphElement::finishCreation(JSGlobalData& globalData)
139 {
140     Base::finishCreation(globalData);
141     ASSERT(inherits(&s_info));
142 }
143
144 JSObject* JSSVGAltGlyphElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
145 {
146     return JSSVGAltGlyphElementPrototype::create(exec->globalData(), globalObject, JSSVGAltGlyphElementPrototype::createStructure(exec->globalData(), globalObject, JSSVGTextPositioningElementPrototype::self(exec, globalObject)));
147 }
148
149 bool JSSVGAltGlyphElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
150 {
151     JSSVGAltGlyphElement* thisObject = jsCast<JSSVGAltGlyphElement*>(cell);
152     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
153     return getStaticValueSlot<JSSVGAltGlyphElement, Base>(exec, &JSSVGAltGlyphElementTable, thisObject, propertyName, slot);
154 }
155
156 bool JSSVGAltGlyphElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
157 {
158     JSSVGAltGlyphElement* thisObject = jsCast<JSSVGAltGlyphElement*>(object);
159     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
160     return getStaticValueDescriptor<JSSVGAltGlyphElement, Base>(exec, &JSSVGAltGlyphElementTable, thisObject, propertyName, descriptor);
161 }
162
163 JSValue jsSVGAltGlyphElementGlyphRef(ExecState* exec, JSValue slotBase, const Identifier&)
164 {
165     JSSVGAltGlyphElement* castedThis = static_cast<JSSVGAltGlyphElement*>(asObject(slotBase));
166     UNUSED_PARAM(exec);
167     SVGAltGlyphElement* imp = static_cast<SVGAltGlyphElement*>(castedThis->impl());
168     JSValue result = jsString(exec, imp->glyphRef());
169     return result;
170 }
171
172
173 JSValue jsSVGAltGlyphElementFormat(ExecState* exec, JSValue slotBase, const Identifier&)
174 {
175     JSSVGAltGlyphElement* castedThis = static_cast<JSSVGAltGlyphElement*>(asObject(slotBase));
176     UNUSED_PARAM(exec);
177     SVGAltGlyphElement* imp = static_cast<SVGAltGlyphElement*>(castedThis->impl());
178     JSValue result = jsString(exec, imp->format());
179     return result;
180 }
181
182
183 JSValue jsSVGAltGlyphElementHref(ExecState* exec, JSValue slotBase, const Identifier&)
184 {
185     JSSVGAltGlyphElement* castedThis = static_cast<JSSVGAltGlyphElement*>(asObject(slotBase));
186     UNUSED_PARAM(exec);
187     SVGAltGlyphElement* imp = static_cast<SVGAltGlyphElement*>(castedThis->impl());
188     RefPtr<SVGAnimatedString> obj = imp->hrefAnimated();
189     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
190     return result;
191 }
192
193
194 JSValue jsSVGAltGlyphElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
195 {
196     JSSVGAltGlyphElement* domObject = static_cast<JSSVGAltGlyphElement*>(asObject(slotBase));
197     return JSSVGAltGlyphElement::getConstructor(exec, domObject->globalObject());
198 }
199
200 void JSSVGAltGlyphElement::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
201 {
202     JSSVGAltGlyphElement* thisObject = jsCast<JSSVGAltGlyphElement*>(cell);
203     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
204     lookupPut<JSSVGAltGlyphElement, Base>(exec, propertyName, value, &JSSVGAltGlyphElementTable, thisObject, slot);
205 }
206
207 void setJSSVGAltGlyphElementGlyphRef(ExecState* exec, JSObject* thisObject, JSValue value)
208 {
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);
214 }
215
216
217 void setJSSVGAltGlyphElementFormat(ExecState* exec, JSObject* thisObject, JSValue value)
218 {
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);
224 }
225
226
227 JSValue JSSVGAltGlyphElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
228 {
229     return getDOMConstructor<JSSVGAltGlyphElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
230 }
231
232
233 }
234
235 #endif // ENABLE(SVG) && ENABLE(SVG_FONTS)