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 | #include "JSSVGFESpecularLightingElement.h" |
23 | |
24 | #include "JSDOMAttribute.h" |
25 | #include "JSDOMBinding.h" |
26 | #include "JSDOMConstructorNotConstructable.h" |
27 | #include "JSDOMConvertInterface.h" |
28 | #include "JSDOMExceptionHandling.h" |
29 | #include "JSDOMGlobalObject.h" |
30 | #include "JSDOMWrapperCache.h" |
31 | #include "JSSVGAnimatedLength.h" |
32 | #include "JSSVGAnimatedNumber.h" |
33 | #include "JSSVGAnimatedString.h" |
34 | #include "ScriptExecutionContext.h" |
35 | #include <JavaScriptCore/HeapSnapshotBuilder.h> |
36 | #include <JavaScriptCore/JSCInlines.h> |
37 | #include <wtf/GetPtr.h> |
38 | #include <wtf/PointerPreparations.h> |
39 | #include <wtf/URL.h> |
40 | |
41 | |
42 | namespace WebCore { |
43 | using namespace JSC; |
44 | |
45 | // Attributes |
46 | |
47 | JSC::EncodedJSValue jsSVGFESpecularLightingElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
48 | bool setJSSVGFESpecularLightingElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
49 | JSC::EncodedJSValue jsSVGFESpecularLightingElementIn1(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
50 | JSC::EncodedJSValue jsSVGFESpecularLightingElementSurfaceScale(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
51 | JSC::EncodedJSValue jsSVGFESpecularLightingElementSpecularConstant(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
52 | JSC::EncodedJSValue jsSVGFESpecularLightingElementSpecularExponent(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
53 | JSC::EncodedJSValue jsSVGFESpecularLightingElementX(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
54 | JSC::EncodedJSValue jsSVGFESpecularLightingElementY(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
55 | JSC::EncodedJSValue jsSVGFESpecularLightingElementWidth(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
56 | JSC::EncodedJSValue jsSVGFESpecularLightingElementHeight(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
57 | JSC::EncodedJSValue jsSVGFESpecularLightingElementResult(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
58 | |
59 | class JSSVGFESpecularLightingElementPrototype : public JSC::JSNonFinalObject { |
60 | public: |
61 | using Base = JSC::JSNonFinalObject; |
62 | static JSSVGFESpecularLightingElementPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) |
63 | { |
64 | JSSVGFESpecularLightingElementPrototype* ptr = new (NotNull, JSC::allocateCell<JSSVGFESpecularLightingElementPrototype>(vm.heap)) JSSVGFESpecularLightingElementPrototype(vm, globalObject, structure); |
65 | ptr->finishCreation(vm); |
66 | return ptr; |
67 | } |
68 | |
69 | DECLARE_INFO; |
70 | static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) |
71 | { |
72 | return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); |
73 | } |
74 | |
75 | private: |
76 | JSSVGFESpecularLightingElementPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) |
77 | : JSC::JSNonFinalObject(vm, structure) |
78 | { |
79 | } |
80 | |
81 | void finishCreation(JSC::VM&); |
82 | }; |
83 | |
84 | using JSSVGFESpecularLightingElementConstructor = JSDOMConstructorNotConstructable<JSSVGFESpecularLightingElement>; |
85 | |
86 | template<> JSValue JSSVGFESpecularLightingElementConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject) |
87 | { |
88 | return JSSVGElement::getConstructor(vm, &globalObject); |
89 | } |
90 | |
91 | template<> void JSSVGFESpecularLightingElementConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) |
92 | { |
93 | putDirect(vm, vm.propertyNames->prototype, JSSVGFESpecularLightingElement::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
94 | putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("SVGFESpecularLightingElement"_s )), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
95 | putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
96 | } |
97 | |
98 | template<> const ClassInfo JSSVGFESpecularLightingElementConstructor::s_info = { "SVGFESpecularLightingElement" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGFESpecularLightingElementConstructor) }; |
99 | |
100 | /* Hash table for prototype */ |
101 | |
102 | static const HashTableValue JSSVGFESpecularLightingElementPrototypeTableValues[] = |
103 | { |
104 | { "constructor" , static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFESpecularLightingElementConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGFESpecularLightingElementConstructor) } }, |
105 | { "in1" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFESpecularLightingElementIn1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
106 | { "surfaceScale" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFESpecularLightingElementSurfaceScale), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
107 | { "specularConstant" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFESpecularLightingElementSpecularConstant), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
108 | { "specularExponent" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFESpecularLightingElementSpecularExponent), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
109 | { "x" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFESpecularLightingElementX), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
110 | { "y" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFESpecularLightingElementY), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
111 | { "width" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFESpecularLightingElementWidth), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
112 | { "height" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFESpecularLightingElementHeight), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
113 | { "result" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFESpecularLightingElementResult), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
114 | }; |
115 | |
116 | const ClassInfo JSSVGFESpecularLightingElementPrototype::s_info = { "SVGFESpecularLightingElementPrototype" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGFESpecularLightingElementPrototype) }; |
117 | |
118 | void JSSVGFESpecularLightingElementPrototype::finishCreation(VM& vm) |
119 | { |
120 | Base::finishCreation(vm); |
121 | reifyStaticProperties(vm, JSSVGFESpecularLightingElement::info(), JSSVGFESpecularLightingElementPrototypeTableValues, *this); |
122 | } |
123 | |
124 | const ClassInfo JSSVGFESpecularLightingElement::s_info = { "SVGFESpecularLightingElement" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGFESpecularLightingElement) }; |
125 | |
126 | JSSVGFESpecularLightingElement::JSSVGFESpecularLightingElement(Structure* structure, JSDOMGlobalObject& globalObject, Ref<SVGFESpecularLightingElement>&& impl) |
127 | : JSSVGElement(structure, globalObject, WTFMove(impl)) |
128 | { |
129 | } |
130 | |
131 | void JSSVGFESpecularLightingElement::finishCreation(VM& vm) |
132 | { |
133 | Base::finishCreation(vm); |
134 | ASSERT(inherits(vm, info())); |
135 | |
136 | } |
137 | |
138 | JSObject* JSSVGFESpecularLightingElement::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) |
139 | { |
140 | return JSSVGFESpecularLightingElementPrototype::create(vm, &globalObject, JSSVGFESpecularLightingElementPrototype::createStructure(vm, &globalObject, JSSVGElement::prototype(vm, globalObject))); |
141 | } |
142 | |
143 | JSObject* JSSVGFESpecularLightingElement::prototype(VM& vm, JSDOMGlobalObject& globalObject) |
144 | { |
145 | return getDOMPrototype<JSSVGFESpecularLightingElement>(vm, globalObject); |
146 | } |
147 | |
148 | JSValue JSSVGFESpecularLightingElement::getConstructor(VM& vm, const JSGlobalObject* globalObject) |
149 | { |
150 | return getDOMConstructor<JSSVGFESpecularLightingElementConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject)); |
151 | } |
152 | |
153 | template<> inline JSSVGFESpecularLightingElement* IDLAttribute<JSSVGFESpecularLightingElement>::cast(ExecState& state, EncodedJSValue thisValue) |
154 | { |
155 | return jsDynamicCast<JSSVGFESpecularLightingElement*>(state.vm(), JSValue::decode(thisValue)); |
156 | } |
157 | |
158 | EncodedJSValue jsSVGFESpecularLightingElementConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) |
159 | { |
160 | VM& vm = state->vm(); |
161 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
162 | auto* prototype = jsDynamicCast<JSSVGFESpecularLightingElementPrototype*>(vm, JSValue::decode(thisValue)); |
163 | if (UNLIKELY(!prototype)) |
164 | return throwVMTypeError(state, throwScope); |
165 | return JSValue::encode(JSSVGFESpecularLightingElement::getConstructor(state->vm(), prototype->globalObject())); |
166 | } |
167 | |
168 | bool setJSSVGFESpecularLightingElementConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
169 | { |
170 | VM& vm = state->vm(); |
171 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
172 | auto* prototype = jsDynamicCast<JSSVGFESpecularLightingElementPrototype*>(vm, JSValue::decode(thisValue)); |
173 | if (UNLIKELY(!prototype)) { |
174 | throwVMTypeError(state, throwScope); |
175 | return false; |
176 | } |
177 | // Shadowing a built-in constructor |
178 | return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue)); |
179 | } |
180 | |
181 | static inline JSValue jsSVGFESpecularLightingElementIn1Getter(ExecState& state, JSSVGFESpecularLightingElement& thisObject, ThrowScope& throwScope) |
182 | { |
183 | UNUSED_PARAM(throwScope); |
184 | UNUSED_PARAM(state); |
185 | auto& impl = thisObject.wrapped(); |
186 | JSValue result = toJS<IDLInterface<SVGAnimatedString>>(state, *thisObject.globalObject(), throwScope, impl.in1Animated()); |
187 | return result; |
188 | } |
189 | |
190 | EncodedJSValue jsSVGFESpecularLightingElementIn1(ExecState* state, EncodedJSValue thisValue, PropertyName) |
191 | { |
192 | return IDLAttribute<JSSVGFESpecularLightingElement>::get<jsSVGFESpecularLightingElementIn1Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "in1" ); |
193 | } |
194 | |
195 | static inline JSValue jsSVGFESpecularLightingElementSurfaceScaleGetter(ExecState& state, JSSVGFESpecularLightingElement& thisObject, ThrowScope& throwScope) |
196 | { |
197 | UNUSED_PARAM(throwScope); |
198 | UNUSED_PARAM(state); |
199 | auto& impl = thisObject.wrapped(); |
200 | JSValue result = toJS<IDLInterface<SVGAnimatedNumber>>(state, *thisObject.globalObject(), throwScope, impl.surfaceScaleAnimated()); |
201 | return result; |
202 | } |
203 | |
204 | EncodedJSValue jsSVGFESpecularLightingElementSurfaceScale(ExecState* state, EncodedJSValue thisValue, PropertyName) |
205 | { |
206 | return IDLAttribute<JSSVGFESpecularLightingElement>::get<jsSVGFESpecularLightingElementSurfaceScaleGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "surfaceScale" ); |
207 | } |
208 | |
209 | static inline JSValue jsSVGFESpecularLightingElementSpecularConstantGetter(ExecState& state, JSSVGFESpecularLightingElement& thisObject, ThrowScope& throwScope) |
210 | { |
211 | UNUSED_PARAM(throwScope); |
212 | UNUSED_PARAM(state); |
213 | auto& impl = thisObject.wrapped(); |
214 | JSValue result = toJS<IDLInterface<SVGAnimatedNumber>>(state, *thisObject.globalObject(), throwScope, impl.specularConstantAnimated()); |
215 | return result; |
216 | } |
217 | |
218 | EncodedJSValue jsSVGFESpecularLightingElementSpecularConstant(ExecState* state, EncodedJSValue thisValue, PropertyName) |
219 | { |
220 | return IDLAttribute<JSSVGFESpecularLightingElement>::get<jsSVGFESpecularLightingElementSpecularConstantGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "specularConstant" ); |
221 | } |
222 | |
223 | static inline JSValue jsSVGFESpecularLightingElementSpecularExponentGetter(ExecState& state, JSSVGFESpecularLightingElement& thisObject, ThrowScope& throwScope) |
224 | { |
225 | UNUSED_PARAM(throwScope); |
226 | UNUSED_PARAM(state); |
227 | auto& impl = thisObject.wrapped(); |
228 | JSValue result = toJS<IDLInterface<SVGAnimatedNumber>>(state, *thisObject.globalObject(), throwScope, impl.specularExponentAnimated()); |
229 | return result; |
230 | } |
231 | |
232 | EncodedJSValue jsSVGFESpecularLightingElementSpecularExponent(ExecState* state, EncodedJSValue thisValue, PropertyName) |
233 | { |
234 | return IDLAttribute<JSSVGFESpecularLightingElement>::get<jsSVGFESpecularLightingElementSpecularExponentGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "specularExponent" ); |
235 | } |
236 | |
237 | static inline JSValue jsSVGFESpecularLightingElementXGetter(ExecState& state, JSSVGFESpecularLightingElement& thisObject, ThrowScope& throwScope) |
238 | { |
239 | UNUSED_PARAM(throwScope); |
240 | UNUSED_PARAM(state); |
241 | auto& impl = thisObject.wrapped(); |
242 | JSValue result = toJS<IDLInterface<SVGAnimatedLength>>(state, *thisObject.globalObject(), throwScope, impl.xAnimated()); |
243 | return result; |
244 | } |
245 | |
246 | EncodedJSValue jsSVGFESpecularLightingElementX(ExecState* state, EncodedJSValue thisValue, PropertyName) |
247 | { |
248 | return IDLAttribute<JSSVGFESpecularLightingElement>::get<jsSVGFESpecularLightingElementXGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "x" ); |
249 | } |
250 | |
251 | static inline JSValue jsSVGFESpecularLightingElementYGetter(ExecState& state, JSSVGFESpecularLightingElement& thisObject, ThrowScope& throwScope) |
252 | { |
253 | UNUSED_PARAM(throwScope); |
254 | UNUSED_PARAM(state); |
255 | auto& impl = thisObject.wrapped(); |
256 | JSValue result = toJS<IDLInterface<SVGAnimatedLength>>(state, *thisObject.globalObject(), throwScope, impl.yAnimated()); |
257 | return result; |
258 | } |
259 | |
260 | EncodedJSValue jsSVGFESpecularLightingElementY(ExecState* state, EncodedJSValue thisValue, PropertyName) |
261 | { |
262 | return IDLAttribute<JSSVGFESpecularLightingElement>::get<jsSVGFESpecularLightingElementYGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "y" ); |
263 | } |
264 | |
265 | static inline JSValue jsSVGFESpecularLightingElementWidthGetter(ExecState& state, JSSVGFESpecularLightingElement& thisObject, ThrowScope& throwScope) |
266 | { |
267 | UNUSED_PARAM(throwScope); |
268 | UNUSED_PARAM(state); |
269 | auto& impl = thisObject.wrapped(); |
270 | JSValue result = toJS<IDLInterface<SVGAnimatedLength>>(state, *thisObject.globalObject(), throwScope, impl.widthAnimated()); |
271 | return result; |
272 | } |
273 | |
274 | EncodedJSValue jsSVGFESpecularLightingElementWidth(ExecState* state, EncodedJSValue thisValue, PropertyName) |
275 | { |
276 | return IDLAttribute<JSSVGFESpecularLightingElement>::get<jsSVGFESpecularLightingElementWidthGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "width" ); |
277 | } |
278 | |
279 | static inline JSValue jsSVGFESpecularLightingElementHeightGetter(ExecState& state, JSSVGFESpecularLightingElement& thisObject, ThrowScope& throwScope) |
280 | { |
281 | UNUSED_PARAM(throwScope); |
282 | UNUSED_PARAM(state); |
283 | auto& impl = thisObject.wrapped(); |
284 | JSValue result = toJS<IDLInterface<SVGAnimatedLength>>(state, *thisObject.globalObject(), throwScope, impl.heightAnimated()); |
285 | return result; |
286 | } |
287 | |
288 | EncodedJSValue jsSVGFESpecularLightingElementHeight(ExecState* state, EncodedJSValue thisValue, PropertyName) |
289 | { |
290 | return IDLAttribute<JSSVGFESpecularLightingElement>::get<jsSVGFESpecularLightingElementHeightGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "height" ); |
291 | } |
292 | |
293 | static inline JSValue jsSVGFESpecularLightingElementResultGetter(ExecState& state, JSSVGFESpecularLightingElement& thisObject, ThrowScope& throwScope) |
294 | { |
295 | UNUSED_PARAM(throwScope); |
296 | UNUSED_PARAM(state); |
297 | auto& impl = thisObject.wrapped(); |
298 | JSValue result = toJS<IDLInterface<SVGAnimatedString>>(state, *thisObject.globalObject(), throwScope, impl.resultAnimated()); |
299 | return result; |
300 | } |
301 | |
302 | EncodedJSValue jsSVGFESpecularLightingElementResult(ExecState* state, EncodedJSValue thisValue, PropertyName) |
303 | { |
304 | return IDLAttribute<JSSVGFESpecularLightingElement>::get<jsSVGFESpecularLightingElementResultGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "result" ); |
305 | } |
306 | |
307 | void JSSVGFESpecularLightingElement::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) |
308 | { |
309 | auto* thisObject = jsCast<JSSVGFESpecularLightingElement*>(cell); |
310 | builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); |
311 | if (thisObject->scriptExecutionContext()) |
312 | builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); |
313 | Base::heapSnapshot(cell, builder); |
314 | } |
315 | |
316 | |
317 | } |
318 | |