Updated WebKit from /home/shausman/src/webkit/trunk to origin/qtwebkit-4.5 ( bd7262be...
[qt:qt-l10n-hu.git] / src / 3rdparty / webkit / WebCore / generated / JSSVGPolygonElement.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
24 #if ENABLE(SVG)
25
26 #include "SVGElement.h"
27 #include "JSSVGPolygonElement.h"
28
29 #include <wtf/GetPtr.h>
30
31 #include "CSSMutableStyleDeclaration.h"
32 #include "CSSStyleDeclaration.h"
33 #include "CSSValue.h"
34 #include "JSCSSStyleDeclaration.h"
35 #include "JSCSSValue.h"
36 #include "JSSVGAnimatedBoolean.h"
37 #include "JSSVGAnimatedString.h"
38 #include "JSSVGAnimatedTransformList.h"
39 #include "JSSVGElement.h"
40 #include "JSSVGMatrix.h"
41 #include "JSSVGPointList.h"
42 #include "JSSVGRect.h"
43 #include "JSSVGStringList.h"
44 #include "KURL.h"
45 #include "SVGElement.h"
46 #include "SVGPointList.h"
47 #include "SVGPolygonElement.h"
48 #include "SVGStringList.h"
49
50 #include <runtime/Error.h>
51 #include <runtime/JSString.h>
52
53 using namespace JSC;
54
55 namespace WebCore {
56
57 ASSERT_CLASS_FITS_IN_CELL(JSSVGPolygonElement)
58
59 /* Hash table */
60
61 static const HashTableValue JSSVGPolygonElementTableValues[14] =
62 {
63     { "requiredFeatures", DontDelete|ReadOnly, (intptr_t)jsSVGPolygonElementRequiredFeatures, (intptr_t)0 },
64     { "requiredExtensions", DontDelete|ReadOnly, (intptr_t)jsSVGPolygonElementRequiredExtensions, (intptr_t)0 },
65     { "systemLanguage", DontDelete|ReadOnly, (intptr_t)jsSVGPolygonElementSystemLanguage, (intptr_t)0 },
66     { "xmllang", DontDelete, (intptr_t)jsSVGPolygonElementXmllang, (intptr_t)setJSSVGPolygonElementXmllang },
67     { "xmlspace", DontDelete, (intptr_t)jsSVGPolygonElementXmlspace, (intptr_t)setJSSVGPolygonElementXmlspace },
68     { "externalResourcesRequired", DontDelete|ReadOnly, (intptr_t)jsSVGPolygonElementExternalResourcesRequired, (intptr_t)0 },
69     { "className", DontDelete|ReadOnly, (intptr_t)jsSVGPolygonElementClassName, (intptr_t)0 },
70     { "style", DontDelete|ReadOnly, (intptr_t)jsSVGPolygonElementStyle, (intptr_t)0 },
71     { "transform", DontDelete|ReadOnly, (intptr_t)jsSVGPolygonElementTransform, (intptr_t)0 },
72     { "nearestViewportElement", DontDelete|ReadOnly, (intptr_t)jsSVGPolygonElementNearestViewportElement, (intptr_t)0 },
73     { "farthestViewportElement", DontDelete|ReadOnly, (intptr_t)jsSVGPolygonElementFarthestViewportElement, (intptr_t)0 },
74     { "points", DontDelete|ReadOnly, (intptr_t)jsSVGPolygonElementPoints, (intptr_t)0 },
75     { "animatedPoints", DontDelete|ReadOnly, (intptr_t)jsSVGPolygonElementAnimatedPoints, (intptr_t)0 },
76     { 0, 0, 0, 0 }
77 };
78
79 static const HashTable JSSVGPolygonElementTable =
80 #if ENABLE(PERFECT_HASH_SIZE)
81     { 127, JSSVGPolygonElementTableValues, 0 };
82 #else
83     { 33, 31, JSSVGPolygonElementTableValues, 0 };
84 #endif
85
86 /* Hash table for prototype */
87
88 static const HashTableValue JSSVGPolygonElementPrototypeTableValues[7] =
89 {
90     { "hasExtension", DontDelete|Function, (intptr_t)jsSVGPolygonElementPrototypeFunctionHasExtension, (intptr_t)1 },
91     { "getPresentationAttribute", DontDelete|Function, (intptr_t)jsSVGPolygonElementPrototypeFunctionGetPresentationAttribute, (intptr_t)1 },
92     { "getBBox", DontDelete|Function, (intptr_t)jsSVGPolygonElementPrototypeFunctionGetBBox, (intptr_t)0 },
93     { "getCTM", DontDelete|Function, (intptr_t)jsSVGPolygonElementPrototypeFunctionGetCTM, (intptr_t)0 },
94     { "getScreenCTM", DontDelete|Function, (intptr_t)jsSVGPolygonElementPrototypeFunctionGetScreenCTM, (intptr_t)0 },
95     { "getTransformToElement", DontDelete|Function, (intptr_t)jsSVGPolygonElementPrototypeFunctionGetTransformToElement, (intptr_t)1 },
96     { 0, 0, 0, 0 }
97 };
98
99 static const HashTable JSSVGPolygonElementPrototypeTable =
100 #if ENABLE(PERFECT_HASH_SIZE)
101     { 2047, JSSVGPolygonElementPrototypeTableValues, 0 };
102 #else
103     { 17, 15, JSSVGPolygonElementPrototypeTableValues, 0 };
104 #endif
105
106 const ClassInfo JSSVGPolygonElementPrototype::s_info = { "SVGPolygonElementPrototype", 0, &JSSVGPolygonElementPrototypeTable, 0 };
107
108 JSObject* JSSVGPolygonElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
109 {
110     return getDOMPrototype<JSSVGPolygonElement>(exec, globalObject);
111 }
112
113 bool JSSVGPolygonElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
114 {
115     return getStaticFunctionSlot<JSObject>(exec, &JSSVGPolygonElementPrototypeTable, this, propertyName, slot);
116 }
117
118 const ClassInfo JSSVGPolygonElement::s_info = { "SVGPolygonElement", &JSSVGElement::s_info, &JSSVGPolygonElementTable, 0 };
119
120 JSSVGPolygonElement::JSSVGPolygonElement(PassRefPtr<Structure> structure, PassRefPtr<SVGPolygonElement> impl)
121     : JSSVGElement(structure, impl)
122 {
123 }
124
125 JSObject* JSSVGPolygonElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
126 {
127     return new (exec) JSSVGPolygonElementPrototype(JSSVGPolygonElementPrototype::createStructure(JSSVGElementPrototype::self(exec, globalObject)));
128 }
129
130 bool JSSVGPolygonElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
131 {
132     return getStaticValueSlot<JSSVGPolygonElement, Base>(exec, &JSSVGPolygonElementTable, this, propertyName, slot);
133 }
134
135 JSValuePtr jsSVGPolygonElementRequiredFeatures(ExecState* exec, const Identifier&, const PropertySlot& slot)
136 {
137     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase()))->impl());
138     return toJS(exec, WTF::getPtr(imp->requiredFeatures()), imp);
139 }
140
141 JSValuePtr jsSVGPolygonElementRequiredExtensions(ExecState* exec, const Identifier&, const PropertySlot& slot)
142 {
143     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase()))->impl());
144     return toJS(exec, WTF::getPtr(imp->requiredExtensions()), imp);
145 }
146
147 JSValuePtr jsSVGPolygonElementSystemLanguage(ExecState* exec, const Identifier&, const PropertySlot& slot)
148 {
149     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase()))->impl());
150     return toJS(exec, WTF::getPtr(imp->systemLanguage()), imp);
151 }
152
153 JSValuePtr jsSVGPolygonElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot)
154 {
155     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase()))->impl());
156     return jsString(exec, imp->xmllang());
157 }
158
159 JSValuePtr jsSVGPolygonElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot)
160 {
161     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase()))->impl());
162     return jsString(exec, imp->xmlspace());
163 }
164
165 JSValuePtr jsSVGPolygonElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot)
166 {
167     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase()))->impl());
168     RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated();
169     return toJS(exec, obj.get(), imp);
170 }
171
172 JSValuePtr jsSVGPolygonElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot)
173 {
174     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase()))->impl());
175     RefPtr<SVGAnimatedString> obj = imp->classNameAnimated();
176     return toJS(exec, obj.get(), imp);
177 }
178
179 JSValuePtr jsSVGPolygonElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot)
180 {
181     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase()))->impl());
182     return toJS(exec, WTF::getPtr(imp->style()));
183 }
184
185 JSValuePtr jsSVGPolygonElementTransform(ExecState* exec, const Identifier&, const PropertySlot& slot)
186 {
187     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase()))->impl());
188     RefPtr<SVGAnimatedTransformList> obj = imp->transformAnimated();
189     return toJS(exec, obj.get(), imp);
190 }
191
192 JSValuePtr jsSVGPolygonElementNearestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot)
193 {
194     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase()))->impl());
195     return toJS(exec, WTF::getPtr(imp->nearestViewportElement()));
196 }
197
198 JSValuePtr jsSVGPolygonElementFarthestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot)
199 {
200     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase()))->impl());
201     return toJS(exec, WTF::getPtr(imp->farthestViewportElement()));
202 }
203
204 JSValuePtr jsSVGPolygonElementPoints(ExecState* exec, const Identifier&, const PropertySlot& slot)
205 {
206     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase()))->impl());
207     return toJS(exec, WTF::getPtr(imp->points()), imp);
208 }
209
210 JSValuePtr jsSVGPolygonElementAnimatedPoints(ExecState* exec, const Identifier&, const PropertySlot& slot)
211 {
212     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase()))->impl());
213     return toJS(exec, WTF::getPtr(imp->animatedPoints()), imp);
214 }
215
216 void JSSVGPolygonElement::put(ExecState* exec, const Identifier& propertyName, JSValuePtr value, PutPropertySlot& slot)
217 {
218     lookupPut<JSSVGPolygonElement, Base>(exec, propertyName, value, &JSSVGPolygonElementTable, this, slot);
219 }
220
221 void setJSSVGPolygonElementXmllang(ExecState* exec, JSObject* thisObject, JSValuePtr value)
222 {
223     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(thisObject)->impl());
224     imp->setXmllang(value->toString(exec));
225 }
226
227 void setJSSVGPolygonElementXmlspace(ExecState* exec, JSObject* thisObject, JSValuePtr value)
228 {
229     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(thisObject)->impl());
230     imp->setXmlspace(value->toString(exec));
231 }
232
233 JSValuePtr jsSVGPolygonElementPrototypeFunctionHasExtension(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
234 {
235     if (!thisValue->isObject(&JSSVGPolygonElement::s_info))
236         return throwError(exec, TypeError);
237     JSSVGPolygonElement* castedThisObj = static_cast<JSSVGPolygonElement*>(asObject(thisValue));
238     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThisObj->impl());
239     const UString& extension = args.at(exec, 0)->toString(exec);
240
241
242     JSC::JSValuePtr result = jsBoolean(imp->hasExtension(extension));
243     return result;
244 }
245
246 JSValuePtr jsSVGPolygonElementPrototypeFunctionGetPresentationAttribute(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
247 {
248     if (!thisValue->isObject(&JSSVGPolygonElement::s_info))
249         return throwError(exec, TypeError);
250     JSSVGPolygonElement* castedThisObj = static_cast<JSSVGPolygonElement*>(asObject(thisValue));
251     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThisObj->impl());
252     const UString& name = args.at(exec, 0)->toString(exec);
253
254
255     JSC::JSValuePtr result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name)));
256     return result;
257 }
258
259 JSValuePtr jsSVGPolygonElementPrototypeFunctionGetBBox(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
260 {
261     if (!thisValue->isObject(&JSSVGPolygonElement::s_info))
262         return throwError(exec, TypeError);
263     JSSVGPolygonElement* castedThisObj = static_cast<JSSVGPolygonElement*>(asObject(thisValue));
264     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThisObj->impl());
265
266
267     JSC::JSValuePtr result = toJS(exec, JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp);
268     return result;
269 }
270
271 JSValuePtr jsSVGPolygonElementPrototypeFunctionGetCTM(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
272 {
273     if (!thisValue->isObject(&JSSVGPolygonElement::s_info))
274         return throwError(exec, TypeError);
275     JSSVGPolygonElement* castedThisObj = static_cast<JSSVGPolygonElement*>(asObject(thisValue));
276     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThisObj->impl());
277
278
279     JSC::JSValuePtr result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp);
280     return result;
281 }
282
283 JSValuePtr jsSVGPolygonElementPrototypeFunctionGetScreenCTM(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
284 {
285     if (!thisValue->isObject(&JSSVGPolygonElement::s_info))
286         return throwError(exec, TypeError);
287     JSSVGPolygonElement* castedThisObj = static_cast<JSSVGPolygonElement*>(asObject(thisValue));
288     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThisObj->impl());
289
290
291     JSC::JSValuePtr result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp);
292     return result;
293 }
294
295 JSValuePtr jsSVGPolygonElementPrototypeFunctionGetTransformToElement(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
296 {
297     if (!thisValue->isObject(&JSSVGPolygonElement::s_info))
298         return throwError(exec, TypeError);
299     JSSVGPolygonElement* castedThisObj = static_cast<JSSVGPolygonElement*>(asObject(thisValue));
300     SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThisObj->impl());
301     ExceptionCode ec = 0;
302     SVGElement* element = toSVGElement(args.at(exec, 0));
303
304
305     JSC::JSValuePtr result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp);
306     setDOMException(exec, ec);
307     return result;
308 }
309
310
311 }
312
313 #endif // ENABLE(SVG)