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(FILTERS) && ENABLE(SVG)
25 #include "JSSVGFEColorMatrixElement.h"
27 #include "CSSMutableStyleDeclaration.h"
28 #include "CSSStyleDeclaration.h"
30 #include "ExceptionCode.h"
31 #include "JSCSSStyleDeclaration.h"
32 #include "JSCSSValue.h"
33 #include "JSDOMBinding.h"
34 #include "JSSVGAnimatedEnumeration.h"
35 #include "JSSVGAnimatedLength.h"
36 #include "JSSVGAnimatedNumberList.h"
37 #include "JSSVGAnimatedString.h"
38 #include "SVGFEColorMatrixElement.h"
39 #include <runtime/Error.h>
40 #include <wtf/GetPtr.h>
46 ASSERT_CLASS_FITS_IN_CELL(JSSVGFEColorMatrixElement);
50 #define THUNK_GENERATOR(generator) , generator
52 #define THUNK_GENERATOR(generator)
55 #define INTRINSIC(intrinsic) , intrinsic
57 #define INTRINSIC(intrinsic)
60 static const HashTableValue JSSVGFEColorMatrixElementTableValues[] =
62 { "in1", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEColorMatrixElementIn1), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
63 { "type", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEColorMatrixElementType), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
64 { "values", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEColorMatrixElementValues), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
65 { "x", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEColorMatrixElementX), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
66 { "y", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEColorMatrixElementY), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
67 { "width", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEColorMatrixElementWidth), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
68 { "height", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEColorMatrixElementHeight), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
69 { "result", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEColorMatrixElementResult), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
70 { "className", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEColorMatrixElementClassName), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
71 { "style", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEColorMatrixElementStyle), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
72 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEColorMatrixElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
73 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
76 #undef THUNK_GENERATOR
77 static const HashTable JSSVGFEColorMatrixElementTable = { 34, 31, JSSVGFEColorMatrixElementTableValues, 0 };
78 /* Hash table for constructor */
80 #define THUNK_GENERATOR(generator) , generator
82 #define THUNK_GENERATOR(generator)
85 #define INTRINSIC(intrinsic) , intrinsic
87 #define INTRINSIC(intrinsic)
90 static const HashTableValue JSSVGFEColorMatrixElementConstructorTableValues[] =
92 { "SVG_FECOLORMATRIX_TYPE_UNKNOWN", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEColorMatrixElementSVG_FECOLORMATRIX_TYPE_UNKNOWN), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
93 { "SVG_FECOLORMATRIX_TYPE_MATRIX", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEColorMatrixElementSVG_FECOLORMATRIX_TYPE_MATRIX), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
94 { "SVG_FECOLORMATRIX_TYPE_SATURATE", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEColorMatrixElementSVG_FECOLORMATRIX_TYPE_SATURATE), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
95 { "SVG_FECOLORMATRIX_TYPE_HUEROTATE", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEColorMatrixElementSVG_FECOLORMATRIX_TYPE_HUEROTATE), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
96 { "SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEColorMatrixElementSVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
97 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
100 #undef THUNK_GENERATOR
101 static const HashTable JSSVGFEColorMatrixElementConstructorTable = { 17, 15, JSSVGFEColorMatrixElementConstructorTableValues, 0 };
102 const ClassInfo JSSVGFEColorMatrixElementConstructor::s_info = { "SVGFEColorMatrixElementConstructor", &DOMConstructorObject::s_info, &JSSVGFEColorMatrixElementConstructorTable, 0, CREATE_METHOD_TABLE(JSSVGFEColorMatrixElementConstructor) };
104 JSSVGFEColorMatrixElementConstructor::JSSVGFEColorMatrixElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
105 : DOMConstructorObject(structure, globalObject)
109 void JSSVGFEColorMatrixElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
111 Base::finishCreation(exec->globalData());
112 ASSERT(inherits(&s_info));
113 putDirect(exec->globalData(), exec->propertyNames().prototype, JSSVGFEColorMatrixElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
116 bool JSSVGFEColorMatrixElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
118 return getStaticValueSlot<JSSVGFEColorMatrixElementConstructor, JSDOMWrapper>(exec, &JSSVGFEColorMatrixElementConstructorTable, static_cast<JSSVGFEColorMatrixElementConstructor*>(cell), propertyName, slot);
121 bool JSSVGFEColorMatrixElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
123 return getStaticValueDescriptor<JSSVGFEColorMatrixElementConstructor, JSDOMWrapper>(exec, &JSSVGFEColorMatrixElementConstructorTable, static_cast<JSSVGFEColorMatrixElementConstructor*>(object), propertyName, descriptor);
126 /* Hash table for prototype */
128 #define THUNK_GENERATOR(generator) , generator
130 #define THUNK_GENERATOR(generator)
133 #define INTRINSIC(intrinsic) , intrinsic
135 #define INTRINSIC(intrinsic)
138 static const HashTableValue JSSVGFEColorMatrixElementPrototypeTableValues[] =
140 { "SVG_FECOLORMATRIX_TYPE_UNKNOWN", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEColorMatrixElementSVG_FECOLORMATRIX_TYPE_UNKNOWN), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
141 { "SVG_FECOLORMATRIX_TYPE_MATRIX", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEColorMatrixElementSVG_FECOLORMATRIX_TYPE_MATRIX), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
142 { "SVG_FECOLORMATRIX_TYPE_SATURATE", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEColorMatrixElementSVG_FECOLORMATRIX_TYPE_SATURATE), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
143 { "SVG_FECOLORMATRIX_TYPE_HUEROTATE", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEColorMatrixElementSVG_FECOLORMATRIX_TYPE_HUEROTATE), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
144 { "SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEColorMatrixElementSVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
145 { "getPresentationAttribute", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGFEColorMatrixElementPrototypeFunctionGetPresentationAttribute), (intptr_t)1 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
146 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
149 #undef THUNK_GENERATOR
150 static const HashTable JSSVGFEColorMatrixElementPrototypeTable = { 17, 15, JSSVGFEColorMatrixElementPrototypeTableValues, 0 };
151 const ClassInfo JSSVGFEColorMatrixElementPrototype::s_info = { "SVGFEColorMatrixElementPrototype", &JSC::JSNonFinalObject::s_info, &JSSVGFEColorMatrixElementPrototypeTable, 0, CREATE_METHOD_TABLE(JSSVGFEColorMatrixElementPrototype) };
153 JSObject* JSSVGFEColorMatrixElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
155 return getDOMPrototype<JSSVGFEColorMatrixElement>(exec, globalObject);
158 bool JSSVGFEColorMatrixElementPrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
160 JSSVGFEColorMatrixElementPrototype* thisObject = jsCast<JSSVGFEColorMatrixElementPrototype*>(cell);
161 return getStaticPropertySlot<JSSVGFEColorMatrixElementPrototype, JSObject>(exec, &JSSVGFEColorMatrixElementPrototypeTable, thisObject, propertyName, slot);
164 bool JSSVGFEColorMatrixElementPrototype::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
166 JSSVGFEColorMatrixElementPrototype* thisObject = jsCast<JSSVGFEColorMatrixElementPrototype*>(object);
167 return getStaticPropertyDescriptor<JSSVGFEColorMatrixElementPrototype, JSObject>(exec, &JSSVGFEColorMatrixElementPrototypeTable, thisObject, propertyName, descriptor);
170 const ClassInfo JSSVGFEColorMatrixElement::s_info = { "SVGFEColorMatrixElement", &JSSVGElement::s_info, &JSSVGFEColorMatrixElementTable, 0 , CREATE_METHOD_TABLE(JSSVGFEColorMatrixElement) };
172 JSSVGFEColorMatrixElement::JSSVGFEColorMatrixElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFEColorMatrixElement> impl)
173 : JSSVGElement(structure, globalObject, impl)
177 void JSSVGFEColorMatrixElement::finishCreation(JSGlobalData& globalData)
179 Base::finishCreation(globalData);
180 ASSERT(inherits(&s_info));
183 JSObject* JSSVGFEColorMatrixElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
185 return JSSVGFEColorMatrixElementPrototype::create(exec->globalData(), globalObject, JSSVGFEColorMatrixElementPrototype::createStructure(exec->globalData(), globalObject, JSSVGElementPrototype::self(exec, globalObject)));
188 bool JSSVGFEColorMatrixElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
190 JSSVGFEColorMatrixElement* thisObject = jsCast<JSSVGFEColorMatrixElement*>(cell);
191 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
192 return getStaticValueSlot<JSSVGFEColorMatrixElement, Base>(exec, &JSSVGFEColorMatrixElementTable, thisObject, propertyName, slot);
195 bool JSSVGFEColorMatrixElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
197 JSSVGFEColorMatrixElement* thisObject = jsCast<JSSVGFEColorMatrixElement*>(object);
198 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
199 return getStaticValueDescriptor<JSSVGFEColorMatrixElement, Base>(exec, &JSSVGFEColorMatrixElementTable, thisObject, propertyName, descriptor);
202 JSValue jsSVGFEColorMatrixElementIn1(ExecState* exec, JSValue slotBase, const Identifier&)
204 JSSVGFEColorMatrixElement* castedThis = static_cast<JSSVGFEColorMatrixElement*>(asObject(slotBase));
206 SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(castedThis->impl());
207 RefPtr<SVGAnimatedString> obj = imp->in1Animated();
208 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
213 JSValue jsSVGFEColorMatrixElementType(ExecState* exec, JSValue slotBase, const Identifier&)
215 JSSVGFEColorMatrixElement* castedThis = static_cast<JSSVGFEColorMatrixElement*>(asObject(slotBase));
217 SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(castedThis->impl());
218 RefPtr<SVGAnimatedEnumeration> obj = imp->typeAnimated();
219 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
224 JSValue jsSVGFEColorMatrixElementValues(ExecState* exec, JSValue slotBase, const Identifier&)
226 JSSVGFEColorMatrixElement* castedThis = static_cast<JSSVGFEColorMatrixElement*>(asObject(slotBase));
228 SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(castedThis->impl());
229 RefPtr<SVGAnimatedNumberList> obj = imp->valuesAnimated();
230 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
235 JSValue jsSVGFEColorMatrixElementX(ExecState* exec, JSValue slotBase, const Identifier&)
237 JSSVGFEColorMatrixElement* castedThis = static_cast<JSSVGFEColorMatrixElement*>(asObject(slotBase));
239 SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(castedThis->impl());
240 RefPtr<SVGAnimatedLength> obj = imp->xAnimated();
241 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
246 JSValue jsSVGFEColorMatrixElementY(ExecState* exec, JSValue slotBase, const Identifier&)
248 JSSVGFEColorMatrixElement* castedThis = static_cast<JSSVGFEColorMatrixElement*>(asObject(slotBase));
250 SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(castedThis->impl());
251 RefPtr<SVGAnimatedLength> obj = imp->yAnimated();
252 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
257 JSValue jsSVGFEColorMatrixElementWidth(ExecState* exec, JSValue slotBase, const Identifier&)
259 JSSVGFEColorMatrixElement* castedThis = static_cast<JSSVGFEColorMatrixElement*>(asObject(slotBase));
261 SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(castedThis->impl());
262 RefPtr<SVGAnimatedLength> obj = imp->widthAnimated();
263 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
268 JSValue jsSVGFEColorMatrixElementHeight(ExecState* exec, JSValue slotBase, const Identifier&)
270 JSSVGFEColorMatrixElement* castedThis = static_cast<JSSVGFEColorMatrixElement*>(asObject(slotBase));
272 SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(castedThis->impl());
273 RefPtr<SVGAnimatedLength> obj = imp->heightAnimated();
274 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
279 JSValue jsSVGFEColorMatrixElementResult(ExecState* exec, JSValue slotBase, const Identifier&)
281 JSSVGFEColorMatrixElement* castedThis = static_cast<JSSVGFEColorMatrixElement*>(asObject(slotBase));
283 SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(castedThis->impl());
284 RefPtr<SVGAnimatedString> obj = imp->resultAnimated();
285 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
290 JSValue jsSVGFEColorMatrixElementClassName(ExecState* exec, JSValue slotBase, const Identifier&)
292 JSSVGFEColorMatrixElement* castedThis = static_cast<JSSVGFEColorMatrixElement*>(asObject(slotBase));
294 SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(castedThis->impl());
295 RefPtr<SVGAnimatedString> obj = imp->classNameAnimated();
296 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
301 JSValue jsSVGFEColorMatrixElementStyle(ExecState* exec, JSValue slotBase, const Identifier&)
303 JSSVGFEColorMatrixElement* castedThis = static_cast<JSSVGFEColorMatrixElement*>(asObject(slotBase));
305 SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(castedThis->impl());
306 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style()));
311 JSValue jsSVGFEColorMatrixElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
313 JSSVGFEColorMatrixElement* domObject = static_cast<JSSVGFEColorMatrixElement*>(asObject(slotBase));
314 return JSSVGFEColorMatrixElement::getConstructor(exec, domObject->globalObject());
317 JSValue JSSVGFEColorMatrixElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
319 return getDOMConstructor<JSSVGFEColorMatrixElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
322 EncodedJSValue JSC_HOST_CALL jsSVGFEColorMatrixElementPrototypeFunctionGetPresentationAttribute(ExecState* exec)
324 JSValue thisValue = exec->hostThisValue();
325 if (!thisValue.inherits(&JSSVGFEColorMatrixElement::s_info))
326 return throwVMTypeError(exec);
327 JSSVGFEColorMatrixElement* castedThis = static_cast<JSSVGFEColorMatrixElement*>(asObject(thisValue));
328 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSSVGFEColorMatrixElement::s_info);
329 SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(castedThis->impl());
330 const String& name(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toString(exec)));
331 if (exec->hadException())
332 return JSValue::encode(jsUndefined());
334 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name)));
335 return JSValue::encode(result);
340 JSValue jsSVGFEColorMatrixElementSVG_FECOLORMATRIX_TYPE_UNKNOWN(ExecState* exec, JSValue, const Identifier&)
343 return jsNumber(static_cast<int>(0));
346 JSValue jsSVGFEColorMatrixElementSVG_FECOLORMATRIX_TYPE_MATRIX(ExecState* exec, JSValue, const Identifier&)
349 return jsNumber(static_cast<int>(1));
352 JSValue jsSVGFEColorMatrixElementSVG_FECOLORMATRIX_TYPE_SATURATE(ExecState* exec, JSValue, const Identifier&)
355 return jsNumber(static_cast<int>(2));
358 JSValue jsSVGFEColorMatrixElementSVG_FECOLORMATRIX_TYPE_HUEROTATE(ExecState* exec, JSValue, const Identifier&)
361 return jsNumber(static_cast<int>(3));
364 JSValue jsSVGFEColorMatrixElementSVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA(ExecState* exec, JSValue, const Identifier&)
367 return jsNumber(static_cast<int>(4));
373 #endif // ENABLE(FILTERS) && ENABLE(SVG)