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
42namespace WebCore {
43using namespace JSC;
44
45// Attributes
46
47JSC::EncodedJSValue jsSVGFESpecularLightingElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
48bool setJSSVGFESpecularLightingElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
49JSC::EncodedJSValue jsSVGFESpecularLightingElementIn1(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
50JSC::EncodedJSValue jsSVGFESpecularLightingElementSurfaceScale(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
51JSC::EncodedJSValue jsSVGFESpecularLightingElementSpecularConstant(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
52JSC::EncodedJSValue jsSVGFESpecularLightingElementSpecularExponent(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
53JSC::EncodedJSValue jsSVGFESpecularLightingElementX(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
54JSC::EncodedJSValue jsSVGFESpecularLightingElementY(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
55JSC::EncodedJSValue jsSVGFESpecularLightingElementWidth(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
56JSC::EncodedJSValue jsSVGFESpecularLightingElementHeight(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
57JSC::EncodedJSValue jsSVGFESpecularLightingElementResult(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
58
59class JSSVGFESpecularLightingElementPrototype : public JSC::JSNonFinalObject {
60public:
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
75private:
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
84using JSSVGFESpecularLightingElementConstructor = JSDOMConstructorNotConstructable<JSSVGFESpecularLightingElement>;
85
86template<> JSValue JSSVGFESpecularLightingElementConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
87{
88 return JSSVGElement::getConstructor(vm, &globalObject);
89}
90
91template<> 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
98template<> const ClassInfo JSSVGFESpecularLightingElementConstructor::s_info = { "SVGFESpecularLightingElement", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGFESpecularLightingElementConstructor) };
99
100/* Hash table for prototype */
101
102static 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
116const ClassInfo JSSVGFESpecularLightingElementPrototype::s_info = { "SVGFESpecularLightingElementPrototype", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGFESpecularLightingElementPrototype) };
117
118void JSSVGFESpecularLightingElementPrototype::finishCreation(VM& vm)
119{
120 Base::finishCreation(vm);
121 reifyStaticProperties(vm, JSSVGFESpecularLightingElement::info(), JSSVGFESpecularLightingElementPrototypeTableValues, *this);
122}
123
124const ClassInfo JSSVGFESpecularLightingElement::s_info = { "SVGFESpecularLightingElement", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGFESpecularLightingElement) };
125
126JSSVGFESpecularLightingElement::JSSVGFESpecularLightingElement(Structure* structure, JSDOMGlobalObject& globalObject, Ref<SVGFESpecularLightingElement>&& impl)
127 : JSSVGElement(structure, globalObject, WTFMove(impl))
128{
129}
130
131void JSSVGFESpecularLightingElement::finishCreation(VM& vm)
132{
133 Base::finishCreation(vm);
134 ASSERT(inherits(vm, info()));
135
136}
137
138JSObject* JSSVGFESpecularLightingElement::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
139{
140 return JSSVGFESpecularLightingElementPrototype::create(vm, &globalObject, JSSVGFESpecularLightingElementPrototype::createStructure(vm, &globalObject, JSSVGElement::prototype(vm, globalObject)));
141}
142
143JSObject* JSSVGFESpecularLightingElement::prototype(VM& vm, JSDOMGlobalObject& globalObject)
144{
145 return getDOMPrototype<JSSVGFESpecularLightingElement>(vm, globalObject);
146}
147
148JSValue JSSVGFESpecularLightingElement::getConstructor(VM& vm, const JSGlobalObject* globalObject)
149{
150 return getDOMConstructor<JSSVGFESpecularLightingElementConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
151}
152
153template<> inline JSSVGFESpecularLightingElement* IDLAttribute<JSSVGFESpecularLightingElement>::cast(ExecState& state, EncodedJSValue thisValue)
154{
155 return jsDynamicCast<JSSVGFESpecularLightingElement*>(state.vm(), JSValue::decode(thisValue));
156}
157
158EncodedJSValue 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
168bool 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
181static 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
190EncodedJSValue jsSVGFESpecularLightingElementIn1(ExecState* state, EncodedJSValue thisValue, PropertyName)
191{
192 return IDLAttribute<JSSVGFESpecularLightingElement>::get<jsSVGFESpecularLightingElementIn1Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "in1");
193}
194
195static 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
204EncodedJSValue jsSVGFESpecularLightingElementSurfaceScale(ExecState* state, EncodedJSValue thisValue, PropertyName)
205{
206 return IDLAttribute<JSSVGFESpecularLightingElement>::get<jsSVGFESpecularLightingElementSurfaceScaleGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "surfaceScale");
207}
208
209static 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
218EncodedJSValue jsSVGFESpecularLightingElementSpecularConstant(ExecState* state, EncodedJSValue thisValue, PropertyName)
219{
220 return IDLAttribute<JSSVGFESpecularLightingElement>::get<jsSVGFESpecularLightingElementSpecularConstantGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "specularConstant");
221}
222
223static 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
232EncodedJSValue jsSVGFESpecularLightingElementSpecularExponent(ExecState* state, EncodedJSValue thisValue, PropertyName)
233{
234 return IDLAttribute<JSSVGFESpecularLightingElement>::get<jsSVGFESpecularLightingElementSpecularExponentGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "specularExponent");
235}
236
237static 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
246EncodedJSValue jsSVGFESpecularLightingElementX(ExecState* state, EncodedJSValue thisValue, PropertyName)
247{
248 return IDLAttribute<JSSVGFESpecularLightingElement>::get<jsSVGFESpecularLightingElementXGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "x");
249}
250
251static 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
260EncodedJSValue jsSVGFESpecularLightingElementY(ExecState* state, EncodedJSValue thisValue, PropertyName)
261{
262 return IDLAttribute<JSSVGFESpecularLightingElement>::get<jsSVGFESpecularLightingElementYGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "y");
263}
264
265static 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
274EncodedJSValue jsSVGFESpecularLightingElementWidth(ExecState* state, EncodedJSValue thisValue, PropertyName)
275{
276 return IDLAttribute<JSSVGFESpecularLightingElement>::get<jsSVGFESpecularLightingElementWidthGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "width");
277}
278
279static 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
288EncodedJSValue jsSVGFESpecularLightingElementHeight(ExecState* state, EncodedJSValue thisValue, PropertyName)
289{
290 return IDLAttribute<JSSVGFESpecularLightingElement>::get<jsSVGFESpecularLightingElementHeightGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "height");
291}
292
293static 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
302EncodedJSValue jsSVGFESpecularLightingElementResult(ExecState* state, EncodedJSValue thisValue, PropertyName)
303{
304 return IDLAttribute<JSSVGFESpecularLightingElement>::get<jsSVGFESpecularLightingElementResultGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "result");
305}
306
307void 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