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 "JSSVGFEComponentTransferElement.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 "JSSVGAnimatedString.h"
33#include "ScriptExecutionContext.h"
34#include <JavaScriptCore/HeapSnapshotBuilder.h>
35#include <JavaScriptCore/JSCInlines.h>
36#include <wtf/GetPtr.h>
37#include <wtf/PointerPreparations.h>
38#include <wtf/URL.h>
39
40
41namespace WebCore {
42using namespace JSC;
43
44// Attributes
45
46JSC::EncodedJSValue jsSVGFEComponentTransferElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
47bool setJSSVGFEComponentTransferElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
48JSC::EncodedJSValue jsSVGFEComponentTransferElementIn1(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
49JSC::EncodedJSValue jsSVGFEComponentTransferElementX(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
50JSC::EncodedJSValue jsSVGFEComponentTransferElementY(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
51JSC::EncodedJSValue jsSVGFEComponentTransferElementWidth(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
52JSC::EncodedJSValue jsSVGFEComponentTransferElementHeight(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
53JSC::EncodedJSValue jsSVGFEComponentTransferElementResult(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
54
55class JSSVGFEComponentTransferElementPrototype : public JSC::JSNonFinalObject {
56public:
57 using Base = JSC::JSNonFinalObject;
58 static JSSVGFEComponentTransferElementPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
59 {
60 JSSVGFEComponentTransferElementPrototype* ptr = new (NotNull, JSC::allocateCell<JSSVGFEComponentTransferElementPrototype>(vm.heap)) JSSVGFEComponentTransferElementPrototype(vm, globalObject, structure);
61 ptr->finishCreation(vm);
62 return ptr;
63 }
64
65 DECLARE_INFO;
66 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
67 {
68 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
69 }
70
71private:
72 JSSVGFEComponentTransferElementPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
73 : JSC::JSNonFinalObject(vm, structure)
74 {
75 }
76
77 void finishCreation(JSC::VM&);
78};
79
80using JSSVGFEComponentTransferElementConstructor = JSDOMConstructorNotConstructable<JSSVGFEComponentTransferElement>;
81
82template<> JSValue JSSVGFEComponentTransferElementConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
83{
84 return JSSVGElement::getConstructor(vm, &globalObject);
85}
86
87template<> void JSSVGFEComponentTransferElementConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
88{
89 putDirect(vm, vm.propertyNames->prototype, JSSVGFEComponentTransferElement::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
90 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("SVGFEComponentTransferElement"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
91 putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
92}
93
94template<> const ClassInfo JSSVGFEComponentTransferElementConstructor::s_info = { "SVGFEComponentTransferElement", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGFEComponentTransferElementConstructor) };
95
96/* Hash table for prototype */
97
98static const HashTableValue JSSVGFEComponentTransferElementPrototypeTableValues[] =
99{
100 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEComponentTransferElementConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGFEComponentTransferElementConstructor) } },
101 { "in1", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEComponentTransferElementIn1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
102 { "x", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEComponentTransferElementX), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
103 { "y", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEComponentTransferElementY), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
104 { "width", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEComponentTransferElementWidth), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
105 { "height", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEComponentTransferElementHeight), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
106 { "result", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEComponentTransferElementResult), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
107};
108
109const ClassInfo JSSVGFEComponentTransferElementPrototype::s_info = { "SVGFEComponentTransferElementPrototype", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGFEComponentTransferElementPrototype) };
110
111void JSSVGFEComponentTransferElementPrototype::finishCreation(VM& vm)
112{
113 Base::finishCreation(vm);
114 reifyStaticProperties(vm, JSSVGFEComponentTransferElement::info(), JSSVGFEComponentTransferElementPrototypeTableValues, *this);
115}
116
117const ClassInfo JSSVGFEComponentTransferElement::s_info = { "SVGFEComponentTransferElement", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGFEComponentTransferElement) };
118
119JSSVGFEComponentTransferElement::JSSVGFEComponentTransferElement(Structure* structure, JSDOMGlobalObject& globalObject, Ref<SVGFEComponentTransferElement>&& impl)
120 : JSSVGElement(structure, globalObject, WTFMove(impl))
121{
122}
123
124void JSSVGFEComponentTransferElement::finishCreation(VM& vm)
125{
126 Base::finishCreation(vm);
127 ASSERT(inherits(vm, info()));
128
129}
130
131JSObject* JSSVGFEComponentTransferElement::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
132{
133 return JSSVGFEComponentTransferElementPrototype::create(vm, &globalObject, JSSVGFEComponentTransferElementPrototype::createStructure(vm, &globalObject, JSSVGElement::prototype(vm, globalObject)));
134}
135
136JSObject* JSSVGFEComponentTransferElement::prototype(VM& vm, JSDOMGlobalObject& globalObject)
137{
138 return getDOMPrototype<JSSVGFEComponentTransferElement>(vm, globalObject);
139}
140
141JSValue JSSVGFEComponentTransferElement::getConstructor(VM& vm, const JSGlobalObject* globalObject)
142{
143 return getDOMConstructor<JSSVGFEComponentTransferElementConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
144}
145
146template<> inline JSSVGFEComponentTransferElement* IDLAttribute<JSSVGFEComponentTransferElement>::cast(ExecState& state, EncodedJSValue thisValue)
147{
148 return jsDynamicCast<JSSVGFEComponentTransferElement*>(state.vm(), JSValue::decode(thisValue));
149}
150
151EncodedJSValue jsSVGFEComponentTransferElementConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
152{
153 VM& vm = state->vm();
154 auto throwScope = DECLARE_THROW_SCOPE(vm);
155 auto* prototype = jsDynamicCast<JSSVGFEComponentTransferElementPrototype*>(vm, JSValue::decode(thisValue));
156 if (UNLIKELY(!prototype))
157 return throwVMTypeError(state, throwScope);
158 return JSValue::encode(JSSVGFEComponentTransferElement::getConstructor(state->vm(), prototype->globalObject()));
159}
160
161bool setJSSVGFEComponentTransferElementConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
162{
163 VM& vm = state->vm();
164 auto throwScope = DECLARE_THROW_SCOPE(vm);
165 auto* prototype = jsDynamicCast<JSSVGFEComponentTransferElementPrototype*>(vm, JSValue::decode(thisValue));
166 if (UNLIKELY(!prototype)) {
167 throwVMTypeError(state, throwScope);
168 return false;
169 }
170 // Shadowing a built-in constructor
171 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));
172}
173
174static inline JSValue jsSVGFEComponentTransferElementIn1Getter(ExecState& state, JSSVGFEComponentTransferElement& thisObject, ThrowScope& throwScope)
175{
176 UNUSED_PARAM(throwScope);
177 UNUSED_PARAM(state);
178 auto& impl = thisObject.wrapped();
179 JSValue result = toJS<IDLInterface<SVGAnimatedString>>(state, *thisObject.globalObject(), throwScope, impl.in1Animated());
180 return result;
181}
182
183EncodedJSValue jsSVGFEComponentTransferElementIn1(ExecState* state, EncodedJSValue thisValue, PropertyName)
184{
185 return IDLAttribute<JSSVGFEComponentTransferElement>::get<jsSVGFEComponentTransferElementIn1Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "in1");
186}
187
188static inline JSValue jsSVGFEComponentTransferElementXGetter(ExecState& state, JSSVGFEComponentTransferElement& thisObject, ThrowScope& throwScope)
189{
190 UNUSED_PARAM(throwScope);
191 UNUSED_PARAM(state);
192 auto& impl = thisObject.wrapped();
193 JSValue result = toJS<IDLInterface<SVGAnimatedLength>>(state, *thisObject.globalObject(), throwScope, impl.xAnimated());
194 return result;
195}
196
197EncodedJSValue jsSVGFEComponentTransferElementX(ExecState* state, EncodedJSValue thisValue, PropertyName)
198{
199 return IDLAttribute<JSSVGFEComponentTransferElement>::get<jsSVGFEComponentTransferElementXGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "x");
200}
201
202static inline JSValue jsSVGFEComponentTransferElementYGetter(ExecState& state, JSSVGFEComponentTransferElement& thisObject, ThrowScope& throwScope)
203{
204 UNUSED_PARAM(throwScope);
205 UNUSED_PARAM(state);
206 auto& impl = thisObject.wrapped();
207 JSValue result = toJS<IDLInterface<SVGAnimatedLength>>(state, *thisObject.globalObject(), throwScope, impl.yAnimated());
208 return result;
209}
210
211EncodedJSValue jsSVGFEComponentTransferElementY(ExecState* state, EncodedJSValue thisValue, PropertyName)
212{
213 return IDLAttribute<JSSVGFEComponentTransferElement>::get<jsSVGFEComponentTransferElementYGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "y");
214}
215
216static inline JSValue jsSVGFEComponentTransferElementWidthGetter(ExecState& state, JSSVGFEComponentTransferElement& thisObject, ThrowScope& throwScope)
217{
218 UNUSED_PARAM(throwScope);
219 UNUSED_PARAM(state);
220 auto& impl = thisObject.wrapped();
221 JSValue result = toJS<IDLInterface<SVGAnimatedLength>>(state, *thisObject.globalObject(), throwScope, impl.widthAnimated());
222 return result;
223}
224
225EncodedJSValue jsSVGFEComponentTransferElementWidth(ExecState* state, EncodedJSValue thisValue, PropertyName)
226{
227 return IDLAttribute<JSSVGFEComponentTransferElement>::get<jsSVGFEComponentTransferElementWidthGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "width");
228}
229
230static inline JSValue jsSVGFEComponentTransferElementHeightGetter(ExecState& state, JSSVGFEComponentTransferElement& thisObject, ThrowScope& throwScope)
231{
232 UNUSED_PARAM(throwScope);
233 UNUSED_PARAM(state);
234 auto& impl = thisObject.wrapped();
235 JSValue result = toJS<IDLInterface<SVGAnimatedLength>>(state, *thisObject.globalObject(), throwScope, impl.heightAnimated());
236 return result;
237}
238
239EncodedJSValue jsSVGFEComponentTransferElementHeight(ExecState* state, EncodedJSValue thisValue, PropertyName)
240{
241 return IDLAttribute<JSSVGFEComponentTransferElement>::get<jsSVGFEComponentTransferElementHeightGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "height");
242}
243
244static inline JSValue jsSVGFEComponentTransferElementResultGetter(ExecState& state, JSSVGFEComponentTransferElement& thisObject, ThrowScope& throwScope)
245{
246 UNUSED_PARAM(throwScope);
247 UNUSED_PARAM(state);
248 auto& impl = thisObject.wrapped();
249 JSValue result = toJS<IDLInterface<SVGAnimatedString>>(state, *thisObject.globalObject(), throwScope, impl.resultAnimated());
250 return result;
251}
252
253EncodedJSValue jsSVGFEComponentTransferElementResult(ExecState* state, EncodedJSValue thisValue, PropertyName)
254{
255 return IDLAttribute<JSSVGFEComponentTransferElement>::get<jsSVGFEComponentTransferElementResultGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "result");
256}
257
258void JSSVGFEComponentTransferElement::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder)
259{
260 auto* thisObject = jsCast<JSSVGFEComponentTransferElement*>(cell);
261 builder.setWrappedObjectForCell(cell, &thisObject->wrapped());
262 if (thisObject->scriptExecutionContext())
263 builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string());
264 Base::heapSnapshot(cell, builder);
265}
266
267
268}
269