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 "JSSVGFETileElement.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 | |
41 | namespace WebCore { |
42 | using namespace JSC; |
43 | |
44 | // Attributes |
45 | |
46 | JSC::EncodedJSValue jsSVGFETileElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
47 | bool setJSSVGFETileElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
48 | JSC::EncodedJSValue jsSVGFETileElementIn1(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
49 | JSC::EncodedJSValue jsSVGFETileElementX(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
50 | JSC::EncodedJSValue jsSVGFETileElementY(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
51 | JSC::EncodedJSValue jsSVGFETileElementWidth(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
52 | JSC::EncodedJSValue jsSVGFETileElementHeight(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
53 | JSC::EncodedJSValue jsSVGFETileElementResult(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
54 | |
55 | class JSSVGFETileElementPrototype : public JSC::JSNonFinalObject { |
56 | public: |
57 | using Base = JSC::JSNonFinalObject; |
58 | static JSSVGFETileElementPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) |
59 | { |
60 | JSSVGFETileElementPrototype* ptr = new (NotNull, JSC::allocateCell<JSSVGFETileElementPrototype>(vm.heap)) JSSVGFETileElementPrototype(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 | |
71 | private: |
72 | JSSVGFETileElementPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) |
73 | : JSC::JSNonFinalObject(vm, structure) |
74 | { |
75 | } |
76 | |
77 | void finishCreation(JSC::VM&); |
78 | }; |
79 | |
80 | using JSSVGFETileElementConstructor = JSDOMConstructorNotConstructable<JSSVGFETileElement>; |
81 | |
82 | template<> JSValue JSSVGFETileElementConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject) |
83 | { |
84 | return JSSVGElement::getConstructor(vm, &globalObject); |
85 | } |
86 | |
87 | template<> void JSSVGFETileElementConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) |
88 | { |
89 | putDirect(vm, vm.propertyNames->prototype, JSSVGFETileElement::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
90 | putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("SVGFETileElement"_s )), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
91 | putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
92 | } |
93 | |
94 | template<> const ClassInfo JSSVGFETileElementConstructor::s_info = { "SVGFETileElement" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGFETileElementConstructor) }; |
95 | |
96 | /* Hash table for prototype */ |
97 | |
98 | static const HashTableValue JSSVGFETileElementPrototypeTableValues[] = |
99 | { |
100 | { "constructor" , static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFETileElementConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGFETileElementConstructor) } }, |
101 | { "in1" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFETileElementIn1), (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>(jsSVGFETileElementX), (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>(jsSVGFETileElementY), (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>(jsSVGFETileElementWidth), (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>(jsSVGFETileElementHeight), (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>(jsSVGFETileElementResult), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
107 | }; |
108 | |
109 | const ClassInfo JSSVGFETileElementPrototype::s_info = { "SVGFETileElementPrototype" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGFETileElementPrototype) }; |
110 | |
111 | void JSSVGFETileElementPrototype::finishCreation(VM& vm) |
112 | { |
113 | Base::finishCreation(vm); |
114 | reifyStaticProperties(vm, JSSVGFETileElement::info(), JSSVGFETileElementPrototypeTableValues, *this); |
115 | } |
116 | |
117 | const ClassInfo JSSVGFETileElement::s_info = { "SVGFETileElement" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGFETileElement) }; |
118 | |
119 | JSSVGFETileElement::JSSVGFETileElement(Structure* structure, JSDOMGlobalObject& globalObject, Ref<SVGFETileElement>&& impl) |
120 | : JSSVGElement(structure, globalObject, WTFMove(impl)) |
121 | { |
122 | } |
123 | |
124 | void JSSVGFETileElement::finishCreation(VM& vm) |
125 | { |
126 | Base::finishCreation(vm); |
127 | ASSERT(inherits(vm, info())); |
128 | |
129 | } |
130 | |
131 | JSObject* JSSVGFETileElement::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) |
132 | { |
133 | return JSSVGFETileElementPrototype::create(vm, &globalObject, JSSVGFETileElementPrototype::createStructure(vm, &globalObject, JSSVGElement::prototype(vm, globalObject))); |
134 | } |
135 | |
136 | JSObject* JSSVGFETileElement::prototype(VM& vm, JSDOMGlobalObject& globalObject) |
137 | { |
138 | return getDOMPrototype<JSSVGFETileElement>(vm, globalObject); |
139 | } |
140 | |
141 | JSValue JSSVGFETileElement::getConstructor(VM& vm, const JSGlobalObject* globalObject) |
142 | { |
143 | return getDOMConstructor<JSSVGFETileElementConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject)); |
144 | } |
145 | |
146 | template<> inline JSSVGFETileElement* IDLAttribute<JSSVGFETileElement>::cast(ExecState& state, EncodedJSValue thisValue) |
147 | { |
148 | return jsDynamicCast<JSSVGFETileElement*>(state.vm(), JSValue::decode(thisValue)); |
149 | } |
150 | |
151 | EncodedJSValue jsSVGFETileElementConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) |
152 | { |
153 | VM& vm = state->vm(); |
154 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
155 | auto* prototype = jsDynamicCast<JSSVGFETileElementPrototype*>(vm, JSValue::decode(thisValue)); |
156 | if (UNLIKELY(!prototype)) |
157 | return throwVMTypeError(state, throwScope); |
158 | return JSValue::encode(JSSVGFETileElement::getConstructor(state->vm(), prototype->globalObject())); |
159 | } |
160 | |
161 | bool setJSSVGFETileElementConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
162 | { |
163 | VM& vm = state->vm(); |
164 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
165 | auto* prototype = jsDynamicCast<JSSVGFETileElementPrototype*>(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 | |
174 | static inline JSValue jsSVGFETileElementIn1Getter(ExecState& state, JSSVGFETileElement& 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 | |
183 | EncodedJSValue jsSVGFETileElementIn1(ExecState* state, EncodedJSValue thisValue, PropertyName) |
184 | { |
185 | return IDLAttribute<JSSVGFETileElement>::get<jsSVGFETileElementIn1Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "in1" ); |
186 | } |
187 | |
188 | static inline JSValue jsSVGFETileElementXGetter(ExecState& state, JSSVGFETileElement& 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 | |
197 | EncodedJSValue jsSVGFETileElementX(ExecState* state, EncodedJSValue thisValue, PropertyName) |
198 | { |
199 | return IDLAttribute<JSSVGFETileElement>::get<jsSVGFETileElementXGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "x" ); |
200 | } |
201 | |
202 | static inline JSValue jsSVGFETileElementYGetter(ExecState& state, JSSVGFETileElement& 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 | |
211 | EncodedJSValue jsSVGFETileElementY(ExecState* state, EncodedJSValue thisValue, PropertyName) |
212 | { |
213 | return IDLAttribute<JSSVGFETileElement>::get<jsSVGFETileElementYGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "y" ); |
214 | } |
215 | |
216 | static inline JSValue jsSVGFETileElementWidthGetter(ExecState& state, JSSVGFETileElement& 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 | |
225 | EncodedJSValue jsSVGFETileElementWidth(ExecState* state, EncodedJSValue thisValue, PropertyName) |
226 | { |
227 | return IDLAttribute<JSSVGFETileElement>::get<jsSVGFETileElementWidthGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "width" ); |
228 | } |
229 | |
230 | static inline JSValue jsSVGFETileElementHeightGetter(ExecState& state, JSSVGFETileElement& 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 | |
239 | EncodedJSValue jsSVGFETileElementHeight(ExecState* state, EncodedJSValue thisValue, PropertyName) |
240 | { |
241 | return IDLAttribute<JSSVGFETileElement>::get<jsSVGFETileElementHeightGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "height" ); |
242 | } |
243 | |
244 | static inline JSValue jsSVGFETileElementResultGetter(ExecState& state, JSSVGFETileElement& 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 | |
253 | EncodedJSValue jsSVGFETileElementResult(ExecState* state, EncodedJSValue thisValue, PropertyName) |
254 | { |
255 | return IDLAttribute<JSSVGFETileElement>::get<jsSVGFETileElementResultGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "result" ); |
256 | } |
257 | |
258 | void JSSVGFETileElement::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) |
259 | { |
260 | auto* thisObject = jsCast<JSSVGFETileElement*>(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 | |