tizen beta release
[framework/web/webkit-efl.git] / DerivedSources / WebCore / JSSVGMPathElement.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)
24
25 #include "JSSVGMPathElement.h"
26
27 #include "JSSVGAnimatedBoolean.h"
28 #include "JSSVGAnimatedString.h"
29 #include "SVGMPathElement.h"
30 #include <wtf/GetPtr.h>
31
32 using namespace JSC;
33
34 namespace WebCore {
35
36 ASSERT_CLASS_FITS_IN_CELL(JSSVGMPathElement);
37
38 /* Hash table */
39 #if ENABLE(JIT)
40 #define THUNK_GENERATOR(generator) , generator
41 #else
42 #define THUNK_GENERATOR(generator)
43 #endif
44 #if ENABLE(DFG_JIT)
45 #define INTRINSIC(intrinsic) , intrinsic
46 #else
47 #define INTRINSIC(intrinsic)
48 #endif
49
50 static const HashTableValue JSSVGMPathElementTableValues[] =
51 {
52     { "href", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGMPathElementHref), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
53     { "externalResourcesRequired", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGMPathElementExternalResourcesRequired), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
54     { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGMPathElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
55     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
56 };
57
58 #undef THUNK_GENERATOR
59 static const HashTable JSSVGMPathElementTable = { 9, 7, JSSVGMPathElementTableValues, 0 };
60 /* Hash table for constructor */
61 #if ENABLE(JIT)
62 #define THUNK_GENERATOR(generator) , generator
63 #else
64 #define THUNK_GENERATOR(generator)
65 #endif
66 #if ENABLE(DFG_JIT)
67 #define INTRINSIC(intrinsic) , intrinsic
68 #else
69 #define INTRINSIC(intrinsic)
70 #endif
71
72 static const HashTableValue JSSVGMPathElementConstructorTableValues[] =
73 {
74     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
75 };
76
77 #undef THUNK_GENERATOR
78 static const HashTable JSSVGMPathElementConstructorTable = { 1, 0, JSSVGMPathElementConstructorTableValues, 0 };
79 const ClassInfo JSSVGMPathElementConstructor::s_info = { "SVGMPathElementConstructor", &DOMConstructorObject::s_info, &JSSVGMPathElementConstructorTable, 0, CREATE_METHOD_TABLE(JSSVGMPathElementConstructor) };
80
81 JSSVGMPathElementConstructor::JSSVGMPathElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
82     : DOMConstructorObject(structure, globalObject)
83 {
84 }
85
86 void JSSVGMPathElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
87 {
88     Base::finishCreation(exec->globalData());
89     ASSERT(inherits(&s_info));
90     putDirect(exec->globalData(), exec->propertyNames().prototype, JSSVGMPathElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
91 }
92
93 bool JSSVGMPathElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
94 {
95     return getStaticValueSlot<JSSVGMPathElementConstructor, JSDOMWrapper>(exec, &JSSVGMPathElementConstructorTable, static_cast<JSSVGMPathElementConstructor*>(cell), propertyName, slot);
96 }
97
98 bool JSSVGMPathElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
99 {
100     return getStaticValueDescriptor<JSSVGMPathElementConstructor, JSDOMWrapper>(exec, &JSSVGMPathElementConstructorTable, static_cast<JSSVGMPathElementConstructor*>(object), propertyName, descriptor);
101 }
102
103 /* Hash table for prototype */
104 #if ENABLE(JIT)
105 #define THUNK_GENERATOR(generator) , generator
106 #else
107 #define THUNK_GENERATOR(generator)
108 #endif
109 #if ENABLE(DFG_JIT)
110 #define INTRINSIC(intrinsic) , intrinsic
111 #else
112 #define INTRINSIC(intrinsic)
113 #endif
114
115 static const HashTableValue JSSVGMPathElementPrototypeTableValues[] =
116 {
117     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
118 };
119
120 #undef THUNK_GENERATOR
121 static const HashTable JSSVGMPathElementPrototypeTable = { 1, 0, JSSVGMPathElementPrototypeTableValues, 0 };
122 const ClassInfo JSSVGMPathElementPrototype::s_info = { "SVGMPathElementPrototype", &JSC::JSNonFinalObject::s_info, &JSSVGMPathElementPrototypeTable, 0, CREATE_METHOD_TABLE(JSSVGMPathElementPrototype) };
123
124 JSObject* JSSVGMPathElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
125 {
126     return getDOMPrototype<JSSVGMPathElement>(exec, globalObject);
127 }
128
129 const ClassInfo JSSVGMPathElement::s_info = { "SVGMPathElement", &JSSVGElement::s_info, &JSSVGMPathElementTable, 0 , CREATE_METHOD_TABLE(JSSVGMPathElement) };
130
131 JSSVGMPathElement::JSSVGMPathElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGMPathElement> impl)
132     : JSSVGElement(structure, globalObject, impl)
133 {
134 }
135
136 void JSSVGMPathElement::finishCreation(JSGlobalData& globalData)
137 {
138     Base::finishCreation(globalData);
139     ASSERT(inherits(&s_info));
140 }
141
142 JSObject* JSSVGMPathElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
143 {
144     return JSSVGMPathElementPrototype::create(exec->globalData(), globalObject, JSSVGMPathElementPrototype::createStructure(exec->globalData(), globalObject, JSSVGElementPrototype::self(exec, globalObject)));
145 }
146
147 bool JSSVGMPathElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
148 {
149     JSSVGMPathElement* thisObject = jsCast<JSSVGMPathElement*>(cell);
150     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
151     return getStaticValueSlot<JSSVGMPathElement, Base>(exec, &JSSVGMPathElementTable, thisObject, propertyName, slot);
152 }
153
154 bool JSSVGMPathElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
155 {
156     JSSVGMPathElement* thisObject = jsCast<JSSVGMPathElement*>(object);
157     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
158     return getStaticValueDescriptor<JSSVGMPathElement, Base>(exec, &JSSVGMPathElementTable, thisObject, propertyName, descriptor);
159 }
160
161 JSValue jsSVGMPathElementHref(ExecState* exec, JSValue slotBase, const Identifier&)
162 {
163     JSSVGMPathElement* castedThis = static_cast<JSSVGMPathElement*>(asObject(slotBase));
164     UNUSED_PARAM(exec);
165     SVGMPathElement* imp = static_cast<SVGMPathElement*>(castedThis->impl());
166     RefPtr<SVGAnimatedString> obj = imp->hrefAnimated();
167     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
168     return result;
169 }
170
171
172 JSValue jsSVGMPathElementExternalResourcesRequired(ExecState* exec, JSValue slotBase, const Identifier&)
173 {
174     JSSVGMPathElement* castedThis = static_cast<JSSVGMPathElement*>(asObject(slotBase));
175     UNUSED_PARAM(exec);
176     SVGMPathElement* imp = static_cast<SVGMPathElement*>(castedThis->impl());
177     RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated();
178     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
179     return result;
180 }
181
182
183 JSValue jsSVGMPathElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
184 {
185     JSSVGMPathElement* domObject = static_cast<JSSVGMPathElement*>(asObject(slotBase));
186     return JSSVGMPathElement::getConstructor(exec, domObject->globalObject());
187 }
188
189 JSValue JSSVGMPathElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
190 {
191     return getDOMConstructor<JSSVGMPathElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
192 }
193
194
195 }
196
197 #endif // ENABLE(SVG)