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 "JSSVGAnimationElement.h" |
23 | |
24 | #include "JSDOMAttribute.h" |
25 | #include "JSDOMBinding.h" |
26 | #include "JSDOMConstructorNotConstructable.h" |
27 | #include "JSDOMConvertBoolean.h" |
28 | #include "JSDOMConvertInterface.h" |
29 | #include "JSDOMConvertNumbers.h" |
30 | #include "JSDOMConvertStrings.h" |
31 | #include "JSDOMExceptionHandling.h" |
32 | #include "JSDOMGlobalObject.h" |
33 | #include "JSDOMOperation.h" |
34 | #include "JSDOMWrapperCache.h" |
35 | #include "JSSVGAnimatedBoolean.h" |
36 | #include "JSSVGStringList.h" |
37 | #include "ScriptExecutionContext.h" |
38 | #include <JavaScriptCore/HeapSnapshotBuilder.h> |
39 | #include <JavaScriptCore/JSCInlines.h> |
40 | #include <wtf/GetPtr.h> |
41 | #include <wtf/PointerPreparations.h> |
42 | #include <wtf/URL.h> |
43 | |
44 | |
45 | namespace WebCore { |
46 | using namespace JSC; |
47 | |
48 | // Functions |
49 | |
50 | JSC::EncodedJSValue JSC_HOST_CALL jsSVGAnimationElementPrototypeFunctionGetStartTime(JSC::ExecState*); |
51 | JSC::EncodedJSValue JSC_HOST_CALL jsSVGAnimationElementPrototypeFunctionGetCurrentTime(JSC::ExecState*); |
52 | JSC::EncodedJSValue JSC_HOST_CALL jsSVGAnimationElementPrototypeFunctionGetSimpleDuration(JSC::ExecState*); |
53 | JSC::EncodedJSValue JSC_HOST_CALL jsSVGAnimationElementPrototypeFunctionBeginElement(JSC::ExecState*); |
54 | JSC::EncodedJSValue JSC_HOST_CALL jsSVGAnimationElementPrototypeFunctionBeginElementAt(JSC::ExecState*); |
55 | JSC::EncodedJSValue JSC_HOST_CALL jsSVGAnimationElementPrototypeFunctionEndElement(JSC::ExecState*); |
56 | JSC::EncodedJSValue JSC_HOST_CALL jsSVGAnimationElementPrototypeFunctionEndElementAt(JSC::ExecState*); |
57 | JSC::EncodedJSValue JSC_HOST_CALL jsSVGAnimationElementPrototypeFunctionHasExtension(JSC::ExecState*); |
58 | |
59 | // Attributes |
60 | |
61 | JSC::EncodedJSValue jsSVGAnimationElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
62 | bool setJSSVGAnimationElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
63 | JSC::EncodedJSValue jsSVGAnimationElementTargetElement(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
64 | JSC::EncodedJSValue jsSVGAnimationElementExternalResourcesRequired(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
65 | JSC::EncodedJSValue jsSVGAnimationElementRequiredFeatures(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
66 | JSC::EncodedJSValue jsSVGAnimationElementRequiredExtensions(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
67 | JSC::EncodedJSValue jsSVGAnimationElementSystemLanguage(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
68 | |
69 | class JSSVGAnimationElementPrototype : public JSC::JSNonFinalObject { |
70 | public: |
71 | using Base = JSC::JSNonFinalObject; |
72 | static JSSVGAnimationElementPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) |
73 | { |
74 | JSSVGAnimationElementPrototype* ptr = new (NotNull, JSC::allocateCell<JSSVGAnimationElementPrototype>(vm.heap)) JSSVGAnimationElementPrototype(vm, globalObject, structure); |
75 | ptr->finishCreation(vm); |
76 | return ptr; |
77 | } |
78 | |
79 | DECLARE_INFO; |
80 | static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) |
81 | { |
82 | return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); |
83 | } |
84 | |
85 | private: |
86 | JSSVGAnimationElementPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) |
87 | : JSC::JSNonFinalObject(vm, structure) |
88 | { |
89 | } |
90 | |
91 | void finishCreation(JSC::VM&); |
92 | }; |
93 | |
94 | using JSSVGAnimationElementConstructor = JSDOMConstructorNotConstructable<JSSVGAnimationElement>; |
95 | |
96 | template<> JSValue JSSVGAnimationElementConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject) |
97 | { |
98 | return JSSVGElement::getConstructor(vm, &globalObject); |
99 | } |
100 | |
101 | template<> void JSSVGAnimationElementConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) |
102 | { |
103 | putDirect(vm, vm.propertyNames->prototype, JSSVGAnimationElement::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
104 | putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("SVGAnimationElement"_s )), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
105 | putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
106 | } |
107 | |
108 | template<> const ClassInfo JSSVGAnimationElementConstructor::s_info = { "SVGAnimationElement" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGAnimationElementConstructor) }; |
109 | |
110 | /* Hash table for prototype */ |
111 | |
112 | static const HashTableValue JSSVGAnimationElementPrototypeTableValues[] = |
113 | { |
114 | { "constructor" , static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGAnimationElementConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGAnimationElementConstructor) } }, |
115 | { "targetElement" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGAnimationElementTargetElement), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
116 | { "externalResourcesRequired" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGAnimationElementExternalResourcesRequired), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
117 | { "requiredFeatures" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGAnimationElementRequiredFeatures), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
118 | { "requiredExtensions" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGAnimationElementRequiredExtensions), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
119 | { "systemLanguage" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGAnimationElementSystemLanguage), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
120 | { "getStartTime" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGAnimationElementPrototypeFunctionGetStartTime), (intptr_t) (0) } }, |
121 | { "getCurrentTime" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGAnimationElementPrototypeFunctionGetCurrentTime), (intptr_t) (0) } }, |
122 | { "getSimpleDuration" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGAnimationElementPrototypeFunctionGetSimpleDuration), (intptr_t) (0) } }, |
123 | { "beginElement" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGAnimationElementPrototypeFunctionBeginElement), (intptr_t) (0) } }, |
124 | { "beginElementAt" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGAnimationElementPrototypeFunctionBeginElementAt), (intptr_t) (0) } }, |
125 | { "endElement" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGAnimationElementPrototypeFunctionEndElement), (intptr_t) (0) } }, |
126 | { "endElementAt" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGAnimationElementPrototypeFunctionEndElementAt), (intptr_t) (0) } }, |
127 | { "hasExtension" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGAnimationElementPrototypeFunctionHasExtension), (intptr_t) (0) } }, |
128 | }; |
129 | |
130 | const ClassInfo JSSVGAnimationElementPrototype::s_info = { "SVGAnimationElementPrototype" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGAnimationElementPrototype) }; |
131 | |
132 | void JSSVGAnimationElementPrototype::finishCreation(VM& vm) |
133 | { |
134 | Base::finishCreation(vm); |
135 | reifyStaticProperties(vm, JSSVGAnimationElement::info(), JSSVGAnimationElementPrototypeTableValues, *this); |
136 | } |
137 | |
138 | const ClassInfo JSSVGAnimationElement::s_info = { "SVGAnimationElement" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGAnimationElement) }; |
139 | |
140 | JSSVGAnimationElement::JSSVGAnimationElement(Structure* structure, JSDOMGlobalObject& globalObject, Ref<SVGAnimationElement>&& impl) |
141 | : JSSVGElement(structure, globalObject, WTFMove(impl)) |
142 | { |
143 | } |
144 | |
145 | void JSSVGAnimationElement::finishCreation(VM& vm) |
146 | { |
147 | Base::finishCreation(vm); |
148 | ASSERT(inherits(vm, info())); |
149 | |
150 | } |
151 | |
152 | JSObject* JSSVGAnimationElement::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) |
153 | { |
154 | return JSSVGAnimationElementPrototype::create(vm, &globalObject, JSSVGAnimationElementPrototype::createStructure(vm, &globalObject, JSSVGElement::prototype(vm, globalObject))); |
155 | } |
156 | |
157 | JSObject* JSSVGAnimationElement::prototype(VM& vm, JSDOMGlobalObject& globalObject) |
158 | { |
159 | return getDOMPrototype<JSSVGAnimationElement>(vm, globalObject); |
160 | } |
161 | |
162 | JSValue JSSVGAnimationElement::getConstructor(VM& vm, const JSGlobalObject* globalObject) |
163 | { |
164 | return getDOMConstructor<JSSVGAnimationElementConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject)); |
165 | } |
166 | |
167 | template<> inline JSSVGAnimationElement* IDLAttribute<JSSVGAnimationElement>::cast(ExecState& state, EncodedJSValue thisValue) |
168 | { |
169 | return jsDynamicCast<JSSVGAnimationElement*>(state.vm(), JSValue::decode(thisValue)); |
170 | } |
171 | |
172 | template<> inline JSSVGAnimationElement* IDLOperation<JSSVGAnimationElement>::cast(ExecState& state) |
173 | { |
174 | return jsDynamicCast<JSSVGAnimationElement*>(state.vm(), state.thisValue()); |
175 | } |
176 | |
177 | EncodedJSValue jsSVGAnimationElementConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) |
178 | { |
179 | VM& vm = state->vm(); |
180 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
181 | auto* prototype = jsDynamicCast<JSSVGAnimationElementPrototype*>(vm, JSValue::decode(thisValue)); |
182 | if (UNLIKELY(!prototype)) |
183 | return throwVMTypeError(state, throwScope); |
184 | return JSValue::encode(JSSVGAnimationElement::getConstructor(state->vm(), prototype->globalObject())); |
185 | } |
186 | |
187 | bool setJSSVGAnimationElementConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
188 | { |
189 | VM& vm = state->vm(); |
190 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
191 | auto* prototype = jsDynamicCast<JSSVGAnimationElementPrototype*>(vm, JSValue::decode(thisValue)); |
192 | if (UNLIKELY(!prototype)) { |
193 | throwVMTypeError(state, throwScope); |
194 | return false; |
195 | } |
196 | // Shadowing a built-in constructor |
197 | return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue)); |
198 | } |
199 | |
200 | static inline JSValue jsSVGAnimationElementTargetElementGetter(ExecState& state, JSSVGAnimationElement& thisObject, ThrowScope& throwScope) |
201 | { |
202 | UNUSED_PARAM(throwScope); |
203 | UNUSED_PARAM(state); |
204 | auto& impl = thisObject.wrapped(); |
205 | JSValue result = toJS<IDLInterface<SVGElement>>(state, *thisObject.globalObject(), throwScope, impl.targetElement()); |
206 | return result; |
207 | } |
208 | |
209 | EncodedJSValue jsSVGAnimationElementTargetElement(ExecState* state, EncodedJSValue thisValue, PropertyName) |
210 | { |
211 | return IDLAttribute<JSSVGAnimationElement>::get<jsSVGAnimationElementTargetElementGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "targetElement" ); |
212 | } |
213 | |
214 | static inline JSValue jsSVGAnimationElementExternalResourcesRequiredGetter(ExecState& state, JSSVGAnimationElement& thisObject, ThrowScope& throwScope) |
215 | { |
216 | UNUSED_PARAM(throwScope); |
217 | UNUSED_PARAM(state); |
218 | auto& impl = thisObject.wrapped(); |
219 | JSValue result = toJS<IDLInterface<SVGAnimatedBoolean>>(state, *thisObject.globalObject(), throwScope, impl.externalResourcesRequiredAnimated()); |
220 | return result; |
221 | } |
222 | |
223 | EncodedJSValue jsSVGAnimationElementExternalResourcesRequired(ExecState* state, EncodedJSValue thisValue, PropertyName) |
224 | { |
225 | return IDLAttribute<JSSVGAnimationElement>::get<jsSVGAnimationElementExternalResourcesRequiredGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "externalResourcesRequired" ); |
226 | } |
227 | |
228 | static inline JSValue jsSVGAnimationElementRequiredFeaturesGetter(ExecState& state, JSSVGAnimationElement& thisObject, ThrowScope& throwScope) |
229 | { |
230 | UNUSED_PARAM(throwScope); |
231 | UNUSED_PARAM(state); |
232 | auto& impl = thisObject.wrapped(); |
233 | JSValue result = toJS<IDLInterface<SVGStringList>>(state, *thisObject.globalObject(), throwScope, impl.requiredFeatures()); |
234 | return result; |
235 | } |
236 | |
237 | EncodedJSValue jsSVGAnimationElementRequiredFeatures(ExecState* state, EncodedJSValue thisValue, PropertyName) |
238 | { |
239 | return IDLAttribute<JSSVGAnimationElement>::get<jsSVGAnimationElementRequiredFeaturesGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "requiredFeatures" ); |
240 | } |
241 | |
242 | static inline JSValue jsSVGAnimationElementRequiredExtensionsGetter(ExecState& state, JSSVGAnimationElement& thisObject, ThrowScope& throwScope) |
243 | { |
244 | UNUSED_PARAM(throwScope); |
245 | UNUSED_PARAM(state); |
246 | auto& impl = thisObject.wrapped(); |
247 | JSValue result = toJS<IDLInterface<SVGStringList>>(state, *thisObject.globalObject(), throwScope, impl.requiredExtensions()); |
248 | return result; |
249 | } |
250 | |
251 | EncodedJSValue jsSVGAnimationElementRequiredExtensions(ExecState* state, EncodedJSValue thisValue, PropertyName) |
252 | { |
253 | return IDLAttribute<JSSVGAnimationElement>::get<jsSVGAnimationElementRequiredExtensionsGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "requiredExtensions" ); |
254 | } |
255 | |
256 | static inline JSValue jsSVGAnimationElementSystemLanguageGetter(ExecState& state, JSSVGAnimationElement& thisObject, ThrowScope& throwScope) |
257 | { |
258 | UNUSED_PARAM(throwScope); |
259 | UNUSED_PARAM(state); |
260 | auto& impl = thisObject.wrapped(); |
261 | JSValue result = toJS<IDLInterface<SVGStringList>>(state, *thisObject.globalObject(), throwScope, impl.systemLanguage()); |
262 | return result; |
263 | } |
264 | |
265 | EncodedJSValue jsSVGAnimationElementSystemLanguage(ExecState* state, EncodedJSValue thisValue, PropertyName) |
266 | { |
267 | return IDLAttribute<JSSVGAnimationElement>::get<jsSVGAnimationElementSystemLanguageGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "systemLanguage" ); |
268 | } |
269 | |
270 | static inline JSC::EncodedJSValue jsSVGAnimationElementPrototypeFunctionGetStartTimeBody(JSC::ExecState* state, typename IDLOperation<JSSVGAnimationElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
271 | { |
272 | UNUSED_PARAM(state); |
273 | UNUSED_PARAM(throwScope); |
274 | auto& impl = castedThis->wrapped(); |
275 | return JSValue::encode(toJS<IDLUnrestrictedFloat>(impl.getStartTime())); |
276 | } |
277 | |
278 | EncodedJSValue JSC_HOST_CALL jsSVGAnimationElementPrototypeFunctionGetStartTime(ExecState* state) |
279 | { |
280 | return IDLOperation<JSSVGAnimationElement>::call<jsSVGAnimationElementPrototypeFunctionGetStartTimeBody>(*state, "getStartTime" ); |
281 | } |
282 | |
283 | static inline JSC::EncodedJSValue jsSVGAnimationElementPrototypeFunctionGetCurrentTimeBody(JSC::ExecState* state, typename IDLOperation<JSSVGAnimationElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
284 | { |
285 | UNUSED_PARAM(state); |
286 | UNUSED_PARAM(throwScope); |
287 | auto& impl = castedThis->wrapped(); |
288 | return JSValue::encode(toJS<IDLUnrestrictedFloat>(impl.getCurrentTime())); |
289 | } |
290 | |
291 | EncodedJSValue JSC_HOST_CALL jsSVGAnimationElementPrototypeFunctionGetCurrentTime(ExecState* state) |
292 | { |
293 | return IDLOperation<JSSVGAnimationElement>::call<jsSVGAnimationElementPrototypeFunctionGetCurrentTimeBody>(*state, "getCurrentTime" ); |
294 | } |
295 | |
296 | static inline JSC::EncodedJSValue jsSVGAnimationElementPrototypeFunctionGetSimpleDurationBody(JSC::ExecState* state, typename IDLOperation<JSSVGAnimationElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
297 | { |
298 | UNUSED_PARAM(state); |
299 | UNUSED_PARAM(throwScope); |
300 | auto& impl = castedThis->wrapped(); |
301 | return JSValue::encode(toJS<IDLUnrestrictedFloat>(impl.getSimpleDuration())); |
302 | } |
303 | |
304 | EncodedJSValue JSC_HOST_CALL jsSVGAnimationElementPrototypeFunctionGetSimpleDuration(ExecState* state) |
305 | { |
306 | return IDLOperation<JSSVGAnimationElement>::call<jsSVGAnimationElementPrototypeFunctionGetSimpleDurationBody>(*state, "getSimpleDuration" ); |
307 | } |
308 | |
309 | static inline JSC::EncodedJSValue jsSVGAnimationElementPrototypeFunctionBeginElementBody(JSC::ExecState* state, typename IDLOperation<JSSVGAnimationElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
310 | { |
311 | UNUSED_PARAM(state); |
312 | UNUSED_PARAM(throwScope); |
313 | auto& impl = castedThis->wrapped(); |
314 | impl.beginElement(); |
315 | return JSValue::encode(jsUndefined()); |
316 | } |
317 | |
318 | EncodedJSValue JSC_HOST_CALL jsSVGAnimationElementPrototypeFunctionBeginElement(ExecState* state) |
319 | { |
320 | return IDLOperation<JSSVGAnimationElement>::call<jsSVGAnimationElementPrototypeFunctionBeginElementBody>(*state, "beginElement" ); |
321 | } |
322 | |
323 | static inline JSC::EncodedJSValue jsSVGAnimationElementPrototypeFunctionBeginElementAtBody(JSC::ExecState* state, typename IDLOperation<JSSVGAnimationElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
324 | { |
325 | UNUSED_PARAM(state); |
326 | UNUSED_PARAM(throwScope); |
327 | auto& impl = castedThis->wrapped(); |
328 | auto offset = convert<IDLUnrestrictedFloat>(*state, state->argument(0)); |
329 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
330 | impl.beginElementAt(WTFMove(offset)); |
331 | return JSValue::encode(jsUndefined()); |
332 | } |
333 | |
334 | EncodedJSValue JSC_HOST_CALL jsSVGAnimationElementPrototypeFunctionBeginElementAt(ExecState* state) |
335 | { |
336 | return IDLOperation<JSSVGAnimationElement>::call<jsSVGAnimationElementPrototypeFunctionBeginElementAtBody>(*state, "beginElementAt" ); |
337 | } |
338 | |
339 | static inline JSC::EncodedJSValue jsSVGAnimationElementPrototypeFunctionEndElementBody(JSC::ExecState* state, typename IDLOperation<JSSVGAnimationElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
340 | { |
341 | UNUSED_PARAM(state); |
342 | UNUSED_PARAM(throwScope); |
343 | auto& impl = castedThis->wrapped(); |
344 | impl.endElement(); |
345 | return JSValue::encode(jsUndefined()); |
346 | } |
347 | |
348 | EncodedJSValue JSC_HOST_CALL jsSVGAnimationElementPrototypeFunctionEndElement(ExecState* state) |
349 | { |
350 | return IDLOperation<JSSVGAnimationElement>::call<jsSVGAnimationElementPrototypeFunctionEndElementBody>(*state, "endElement" ); |
351 | } |
352 | |
353 | static inline JSC::EncodedJSValue jsSVGAnimationElementPrototypeFunctionEndElementAtBody(JSC::ExecState* state, typename IDLOperation<JSSVGAnimationElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
354 | { |
355 | UNUSED_PARAM(state); |
356 | UNUSED_PARAM(throwScope); |
357 | auto& impl = castedThis->wrapped(); |
358 | auto offset = convert<IDLUnrestrictedFloat>(*state, state->argument(0)); |
359 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
360 | impl.endElementAt(WTFMove(offset)); |
361 | return JSValue::encode(jsUndefined()); |
362 | } |
363 | |
364 | EncodedJSValue JSC_HOST_CALL jsSVGAnimationElementPrototypeFunctionEndElementAt(ExecState* state) |
365 | { |
366 | return IDLOperation<JSSVGAnimationElement>::call<jsSVGAnimationElementPrototypeFunctionEndElementAtBody>(*state, "endElementAt" ); |
367 | } |
368 | |
369 | static inline JSC::EncodedJSValue jsSVGAnimationElementPrototypeFunctionHasExtensionBody(JSC::ExecState* state, typename IDLOperation<JSSVGAnimationElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
370 | { |
371 | UNUSED_PARAM(state); |
372 | UNUSED_PARAM(throwScope); |
373 | auto& impl = castedThis->wrapped(); |
374 | auto extension = convert<IDLDOMString>(*state, state->argument(0)); |
375 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
376 | return JSValue::encode(toJS<IDLBoolean>(impl.hasExtension(WTFMove(extension)))); |
377 | } |
378 | |
379 | EncodedJSValue JSC_HOST_CALL jsSVGAnimationElementPrototypeFunctionHasExtension(ExecState* state) |
380 | { |
381 | return IDLOperation<JSSVGAnimationElement>::call<jsSVGAnimationElementPrototypeFunctionHasExtensionBody>(*state, "hasExtension" ); |
382 | } |
383 | |
384 | void JSSVGAnimationElement::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) |
385 | { |
386 | auto* thisObject = jsCast<JSSVGAnimationElement*>(cell); |
387 | builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); |
388 | if (thisObject->scriptExecutionContext()) |
389 | builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); |
390 | Base::heapSnapshot(cell, builder); |
391 | } |
392 | |
393 | |
394 | } |
395 | |