|
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(FILTERS) |
|
24 |
|
25 #include "JSSVGFEMorphologyElement.h" |
|
26 |
|
27 #include "CSSMutableStyleDeclaration.h" |
|
28 #include "CSSStyleDeclaration.h" |
|
29 #include "CSSValue.h" |
|
30 #include "JSCSSStyleDeclaration.h" |
|
31 #include "JSCSSValue.h" |
|
32 #include "JSSVGAnimatedEnumeration.h" |
|
33 #include "JSSVGAnimatedLength.h" |
|
34 #include "JSSVGAnimatedNumber.h" |
|
35 #include "JSSVGAnimatedString.h" |
|
36 #include "SVGFEMorphologyElement.h" |
|
37 #include <runtime/Error.h> |
|
38 #include <wtf/GetPtr.h> |
|
39 |
|
40 using namespace JSC; |
|
41 |
|
42 namespace WebCore { |
|
43 |
|
44 ASSERT_CLASS_FITS_IN_CELL(JSSVGFEMorphologyElement); |
|
45 |
|
46 /* Hash table */ |
|
47 #if ENABLE(JIT) |
|
48 #define THUNK_GENERATOR(generator) , generator |
|
49 #else |
|
50 #define THUNK_GENERATOR(generator) |
|
51 #endif |
|
52 |
|
53 static const HashTableValue JSSVGFEMorphologyElementTableValues[13] = |
|
54 { |
|
55 { "in1", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementIn1), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
56 { "operator", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementOperator), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
57 { "radiusX", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementRadiusX), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
58 { "radiusY", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementRadiusY), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
59 { "x", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementX), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
60 { "y", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementY), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
61 { "width", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementWidth), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
62 { "height", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementHeight), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
63 { "result", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementResult), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
64 { "className", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementClassName), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
65 { "style", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementStyle), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
66 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
67 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
68 }; |
|
69 |
|
70 #undef THUNK_GENERATOR |
|
71 static JSC_CONST_HASHTABLE HashTable JSSVGFEMorphologyElementTable = { 34, 31, JSSVGFEMorphologyElementTableValues, 0 }; |
|
72 /* Hash table for constructor */ |
|
73 #if ENABLE(JIT) |
|
74 #define THUNK_GENERATOR(generator) , generator |
|
75 #else |
|
76 #define THUNK_GENERATOR(generator) |
|
77 #endif |
|
78 |
|
79 static const HashTableValue JSSVGFEMorphologyElementConstructorTableValues[4] = |
|
80 { |
|
81 { "SVG_MORPHOLOGY_OPERATOR_UNKNOWN", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementSVG_MORPHOLOGY_OPERATOR_UNKNOWN), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
82 { "SVG_MORPHOLOGY_OPERATOR_ERODE", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementSVG_MORPHOLOGY_OPERATOR_ERODE), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
83 { "SVG_MORPHOLOGY_OPERATOR_DILATE", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementSVG_MORPHOLOGY_OPERATOR_DILATE), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
84 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
85 }; |
|
86 |
|
87 #undef THUNK_GENERATOR |
|
88 static JSC_CONST_HASHTABLE HashTable JSSVGFEMorphologyElementConstructorTable = { 8, 7, JSSVGFEMorphologyElementConstructorTableValues, 0 }; |
|
89 class JSSVGFEMorphologyElementConstructor : public DOMConstructorObject { |
|
90 public: |
|
91 JSSVGFEMorphologyElementConstructor(JSC::ExecState*, JSDOMGlobalObject*); |
|
92 |
|
93 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); |
|
94 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); |
|
95 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } |
|
96 static const JSC::ClassInfo s_info; |
|
97 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) |
|
98 { |
|
99 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); |
|
100 } |
|
101 protected: |
|
102 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; |
|
103 }; |
|
104 |
|
105 const ClassInfo JSSVGFEMorphologyElementConstructor::s_info = { "SVGFEMorphologyElementConstructor", 0, &JSSVGFEMorphologyElementConstructorTable, 0 }; |
|
106 |
|
107 JSSVGFEMorphologyElementConstructor::JSSVGFEMorphologyElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) |
|
108 : DOMConstructorObject(JSSVGFEMorphologyElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) |
|
109 { |
|
110 putDirect(exec->propertyNames().prototype, JSSVGFEMorphologyElementPrototype::self(exec, globalObject), DontDelete | ReadOnly); |
|
111 } |
|
112 |
|
113 bool JSSVGFEMorphologyElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
114 { |
|
115 return getStaticValueSlot<JSSVGFEMorphologyElementConstructor, DOMObject>(exec, &JSSVGFEMorphologyElementConstructorTable, this, propertyName, slot); |
|
116 } |
|
117 |
|
118 bool JSSVGFEMorphologyElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
119 { |
|
120 return getStaticValueDescriptor<JSSVGFEMorphologyElementConstructor, DOMObject>(exec, &JSSVGFEMorphologyElementConstructorTable, this, propertyName, descriptor); |
|
121 } |
|
122 |
|
123 /* Hash table for prototype */ |
|
124 #if ENABLE(JIT) |
|
125 #define THUNK_GENERATOR(generator) , generator |
|
126 #else |
|
127 #define THUNK_GENERATOR(generator) |
|
128 #endif |
|
129 |
|
130 static const HashTableValue JSSVGFEMorphologyElementPrototypeTableValues[6] = |
|
131 { |
|
132 { "SVG_MORPHOLOGY_OPERATOR_UNKNOWN", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementSVG_MORPHOLOGY_OPERATOR_UNKNOWN), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
133 { "SVG_MORPHOLOGY_OPERATOR_ERODE", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementSVG_MORPHOLOGY_OPERATOR_ERODE), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
134 { "SVG_MORPHOLOGY_OPERATOR_DILATE", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementSVG_MORPHOLOGY_OPERATOR_DILATE), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
135 { "setRadius", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGFEMorphologyElementPrototypeFunctionSetRadius), (intptr_t)2 THUNK_GENERATOR(0) }, |
|
136 { "getPresentationAttribute", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGFEMorphologyElementPrototypeFunctionGetPresentationAttribute), (intptr_t)1 THUNK_GENERATOR(0) }, |
|
137 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
138 }; |
|
139 |
|
140 #undef THUNK_GENERATOR |
|
141 static JSC_CONST_HASHTABLE HashTable JSSVGFEMorphologyElementPrototypeTable = { 17, 15, JSSVGFEMorphologyElementPrototypeTableValues, 0 }; |
|
142 const ClassInfo JSSVGFEMorphologyElementPrototype::s_info = { "SVGFEMorphologyElementPrototype", 0, &JSSVGFEMorphologyElementPrototypeTable, 0 }; |
|
143 |
|
144 JSObject* JSSVGFEMorphologyElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject) |
|
145 { |
|
146 return getDOMPrototype<JSSVGFEMorphologyElement>(exec, globalObject); |
|
147 } |
|
148 |
|
149 bool JSSVGFEMorphologyElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
150 { |
|
151 return getStaticPropertySlot<JSSVGFEMorphologyElementPrototype, JSObject>(exec, &JSSVGFEMorphologyElementPrototypeTable, this, propertyName, slot); |
|
152 } |
|
153 |
|
154 bool JSSVGFEMorphologyElementPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
155 { |
|
156 return getStaticPropertyDescriptor<JSSVGFEMorphologyElementPrototype, JSObject>(exec, &JSSVGFEMorphologyElementPrototypeTable, this, propertyName, descriptor); |
|
157 } |
|
158 |
|
159 const ClassInfo JSSVGFEMorphologyElement::s_info = { "SVGFEMorphologyElement", &JSSVGElement::s_info, &JSSVGFEMorphologyElementTable, 0 }; |
|
160 |
|
161 JSSVGFEMorphologyElement::JSSVGFEMorphologyElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFEMorphologyElement> impl) |
|
162 : JSSVGElement(structure, globalObject, impl) |
|
163 { |
|
164 } |
|
165 |
|
166 JSObject* JSSVGFEMorphologyElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject) |
|
167 { |
|
168 return new (exec) JSSVGFEMorphologyElementPrototype(globalObject, JSSVGFEMorphologyElementPrototype::createStructure(JSSVGElementPrototype::self(exec, globalObject))); |
|
169 } |
|
170 |
|
171 bool JSSVGFEMorphologyElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
172 { |
|
173 return getStaticValueSlot<JSSVGFEMorphologyElement, Base>(exec, &JSSVGFEMorphologyElementTable, this, propertyName, slot); |
|
174 } |
|
175 |
|
176 bool JSSVGFEMorphologyElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
177 { |
|
178 return getStaticValueDescriptor<JSSVGFEMorphologyElement, Base>(exec, &JSSVGFEMorphologyElementTable, this, propertyName, descriptor); |
|
179 } |
|
180 |
|
181 JSValue jsSVGFEMorphologyElementIn1(ExecState* exec, JSValue slotBase, const Identifier&) |
|
182 { |
|
183 JSSVGFEMorphologyElement* castedThis = static_cast<JSSVGFEMorphologyElement*>(asObject(slotBase)); |
|
184 UNUSED_PARAM(exec); |
|
185 SVGFEMorphologyElement* imp = static_cast<SVGFEMorphologyElement*>(castedThis->impl()); |
|
186 RefPtr<SVGAnimatedString> obj = imp->in1Animated(); |
|
187 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
188 return result; |
|
189 } |
|
190 |
|
191 JSValue jsSVGFEMorphologyElementOperator(ExecState* exec, JSValue slotBase, const Identifier&) |
|
192 { |
|
193 JSSVGFEMorphologyElement* castedThis = static_cast<JSSVGFEMorphologyElement*>(asObject(slotBase)); |
|
194 UNUSED_PARAM(exec); |
|
195 SVGFEMorphologyElement* imp = static_cast<SVGFEMorphologyElement*>(castedThis->impl()); |
|
196 RefPtr<SVGAnimatedEnumeration> obj = imp->_operatorAnimated(); |
|
197 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
198 return result; |
|
199 } |
|
200 |
|
201 JSValue jsSVGFEMorphologyElementRadiusX(ExecState* exec, JSValue slotBase, const Identifier&) |
|
202 { |
|
203 JSSVGFEMorphologyElement* castedThis = static_cast<JSSVGFEMorphologyElement*>(asObject(slotBase)); |
|
204 UNUSED_PARAM(exec); |
|
205 SVGFEMorphologyElement* imp = static_cast<SVGFEMorphologyElement*>(castedThis->impl()); |
|
206 RefPtr<SVGAnimatedNumber> obj = imp->radiusXAnimated(); |
|
207 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
208 return result; |
|
209 } |
|
210 |
|
211 JSValue jsSVGFEMorphologyElementRadiusY(ExecState* exec, JSValue slotBase, const Identifier&) |
|
212 { |
|
213 JSSVGFEMorphologyElement* castedThis = static_cast<JSSVGFEMorphologyElement*>(asObject(slotBase)); |
|
214 UNUSED_PARAM(exec); |
|
215 SVGFEMorphologyElement* imp = static_cast<SVGFEMorphologyElement*>(castedThis->impl()); |
|
216 RefPtr<SVGAnimatedNumber> obj = imp->radiusYAnimated(); |
|
217 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
218 return result; |
|
219 } |
|
220 |
|
221 JSValue jsSVGFEMorphologyElementX(ExecState* exec, JSValue slotBase, const Identifier&) |
|
222 { |
|
223 JSSVGFEMorphologyElement* castedThis = static_cast<JSSVGFEMorphologyElement*>(asObject(slotBase)); |
|
224 UNUSED_PARAM(exec); |
|
225 SVGFEMorphologyElement* imp = static_cast<SVGFEMorphologyElement*>(castedThis->impl()); |
|
226 RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); |
|
227 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
228 return result; |
|
229 } |
|
230 |
|
231 JSValue jsSVGFEMorphologyElementY(ExecState* exec, JSValue slotBase, const Identifier&) |
|
232 { |
|
233 JSSVGFEMorphologyElement* castedThis = static_cast<JSSVGFEMorphologyElement*>(asObject(slotBase)); |
|
234 UNUSED_PARAM(exec); |
|
235 SVGFEMorphologyElement* imp = static_cast<SVGFEMorphologyElement*>(castedThis->impl()); |
|
236 RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); |
|
237 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
238 return result; |
|
239 } |
|
240 |
|
241 JSValue jsSVGFEMorphologyElementWidth(ExecState* exec, JSValue slotBase, const Identifier&) |
|
242 { |
|
243 JSSVGFEMorphologyElement* castedThis = static_cast<JSSVGFEMorphologyElement*>(asObject(slotBase)); |
|
244 UNUSED_PARAM(exec); |
|
245 SVGFEMorphologyElement* imp = static_cast<SVGFEMorphologyElement*>(castedThis->impl()); |
|
246 RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); |
|
247 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
248 return result; |
|
249 } |
|
250 |
|
251 JSValue jsSVGFEMorphologyElementHeight(ExecState* exec, JSValue slotBase, const Identifier&) |
|
252 { |
|
253 JSSVGFEMorphologyElement* castedThis = static_cast<JSSVGFEMorphologyElement*>(asObject(slotBase)); |
|
254 UNUSED_PARAM(exec); |
|
255 SVGFEMorphologyElement* imp = static_cast<SVGFEMorphologyElement*>(castedThis->impl()); |
|
256 RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); |
|
257 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
258 return result; |
|
259 } |
|
260 |
|
261 JSValue jsSVGFEMorphologyElementResult(ExecState* exec, JSValue slotBase, const Identifier&) |
|
262 { |
|
263 JSSVGFEMorphologyElement* castedThis = static_cast<JSSVGFEMorphologyElement*>(asObject(slotBase)); |
|
264 UNUSED_PARAM(exec); |
|
265 SVGFEMorphologyElement* imp = static_cast<SVGFEMorphologyElement*>(castedThis->impl()); |
|
266 RefPtr<SVGAnimatedString> obj = imp->resultAnimated(); |
|
267 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
268 return result; |
|
269 } |
|
270 |
|
271 JSValue jsSVGFEMorphologyElementClassName(ExecState* exec, JSValue slotBase, const Identifier&) |
|
272 { |
|
273 JSSVGFEMorphologyElement* castedThis = static_cast<JSSVGFEMorphologyElement*>(asObject(slotBase)); |
|
274 UNUSED_PARAM(exec); |
|
275 SVGFEMorphologyElement* imp = static_cast<SVGFEMorphologyElement*>(castedThis->impl()); |
|
276 RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); |
|
277 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
278 return result; |
|
279 } |
|
280 |
|
281 JSValue jsSVGFEMorphologyElementStyle(ExecState* exec, JSValue slotBase, const Identifier&) |
|
282 { |
|
283 JSSVGFEMorphologyElement* castedThis = static_cast<JSSVGFEMorphologyElement*>(asObject(slotBase)); |
|
284 UNUSED_PARAM(exec); |
|
285 SVGFEMorphologyElement* imp = static_cast<SVGFEMorphologyElement*>(castedThis->impl()); |
|
286 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); |
|
287 return result; |
|
288 } |
|
289 |
|
290 JSValue jsSVGFEMorphologyElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&) |
|
291 { |
|
292 JSSVGFEMorphologyElement* domObject = static_cast<JSSVGFEMorphologyElement*>(asObject(slotBase)); |
|
293 return JSSVGFEMorphologyElement::getConstructor(exec, domObject->globalObject()); |
|
294 } |
|
295 JSValue JSSVGFEMorphologyElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) |
|
296 { |
|
297 return getDOMConstructor<JSSVGFEMorphologyElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); |
|
298 } |
|
299 |
|
300 EncodedJSValue JSC_HOST_CALL jsSVGFEMorphologyElementPrototypeFunctionSetRadius(ExecState* exec) |
|
301 { |
|
302 JSValue thisValue = exec->hostThisValue(); |
|
303 if (!thisValue.inherits(&JSSVGFEMorphologyElement::s_info)) |
|
304 return throwVMTypeError(exec); |
|
305 JSSVGFEMorphologyElement* castedThis = static_cast<JSSVGFEMorphologyElement*>(asObject(thisValue)); |
|
306 SVGFEMorphologyElement* imp = static_cast<SVGFEMorphologyElement*>(castedThis->impl()); |
|
307 float radiusX = exec->argument(0).toFloat(exec); |
|
308 float radiusY = exec->argument(1).toFloat(exec); |
|
309 |
|
310 imp->setRadius(radiusX, radiusY); |
|
311 return JSValue::encode(jsUndefined()); |
|
312 } |
|
313 |
|
314 EncodedJSValue JSC_HOST_CALL jsSVGFEMorphologyElementPrototypeFunctionGetPresentationAttribute(ExecState* exec) |
|
315 { |
|
316 JSValue thisValue = exec->hostThisValue(); |
|
317 if (!thisValue.inherits(&JSSVGFEMorphologyElement::s_info)) |
|
318 return throwVMTypeError(exec); |
|
319 JSSVGFEMorphologyElement* castedThis = static_cast<JSSVGFEMorphologyElement*>(asObject(thisValue)); |
|
320 SVGFEMorphologyElement* imp = static_cast<SVGFEMorphologyElement*>(castedThis->impl()); |
|
321 const String& name = ustringToString(exec->argument(0).toString(exec)); |
|
322 |
|
323 |
|
324 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); |
|
325 return JSValue::encode(result); |
|
326 } |
|
327 |
|
328 // Constant getters |
|
329 |
|
330 JSValue jsSVGFEMorphologyElementSVG_MORPHOLOGY_OPERATOR_UNKNOWN(ExecState* exec, JSValue, const Identifier&) |
|
331 { |
|
332 return jsNumber(exec, static_cast<int>(0)); |
|
333 } |
|
334 |
|
335 JSValue jsSVGFEMorphologyElementSVG_MORPHOLOGY_OPERATOR_ERODE(ExecState* exec, JSValue, const Identifier&) |
|
336 { |
|
337 return jsNumber(exec, static_cast<int>(1)); |
|
338 } |
|
339 |
|
340 JSValue jsSVGFEMorphologyElementSVG_MORPHOLOGY_OPERATOR_DILATE(ExecState* exec, JSValue, const Identifier&) |
|
341 { |
|
342 return jsNumber(exec, static_cast<int>(2)); |
|
343 } |
|
344 |
|
345 |
|
346 } |
|
347 |
|
348 #endif // ENABLE(SVG) && ENABLE(FILTERS) |