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 "JSSVGPatternElement.h" |
23 | |
24 | #include "JSDOMAttribute.h" |
25 | #include "JSDOMBinding.h" |
26 | #include "JSDOMConstructorNotConstructable.h" |
27 | #include "JSDOMConvertBoolean.h" |
28 | #include "JSDOMConvertInterface.h" |
29 | #include "JSDOMConvertStrings.h" |
30 | #include "JSDOMExceptionHandling.h" |
31 | #include "JSDOMGlobalObject.h" |
32 | #include "JSDOMOperation.h" |
33 | #include "JSDOMWrapperCache.h" |
34 | #include "JSSVGAnimatedBoolean.h" |
35 | #include "JSSVGAnimatedEnumeration.h" |
36 | #include "JSSVGAnimatedLength.h" |
37 | #include "JSSVGAnimatedPreserveAspectRatio.h" |
38 | #include "JSSVGAnimatedRect.h" |
39 | #include "JSSVGAnimatedString.h" |
40 | #include "JSSVGAnimatedTransformList.h" |
41 | #include "JSSVGStringList.h" |
42 | #include "ScriptExecutionContext.h" |
43 | #include <JavaScriptCore/HeapSnapshotBuilder.h> |
44 | #include <JavaScriptCore/JSCInlines.h> |
45 | #include <wtf/GetPtr.h> |
46 | #include <wtf/PointerPreparations.h> |
47 | #include <wtf/URL.h> |
48 | |
49 | |
50 | namespace WebCore { |
51 | using namespace JSC; |
52 | |
53 | // Functions |
54 | |
55 | JSC::EncodedJSValue JSC_HOST_CALL jsSVGPatternElementPrototypeFunctionHasExtension(JSC::ExecState*); |
56 | |
57 | // Attributes |
58 | |
59 | JSC::EncodedJSValue jsSVGPatternElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
60 | bool setJSSVGPatternElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
61 | JSC::EncodedJSValue jsSVGPatternElementPatternUnits(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
62 | JSC::EncodedJSValue jsSVGPatternElementPatternContentUnits(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
63 | JSC::EncodedJSValue jsSVGPatternElementPatternTransform(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
64 | JSC::EncodedJSValue jsSVGPatternElementX(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
65 | JSC::EncodedJSValue jsSVGPatternElementY(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
66 | JSC::EncodedJSValue jsSVGPatternElementWidth(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
67 | JSC::EncodedJSValue jsSVGPatternElementHeight(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
68 | JSC::EncodedJSValue jsSVGPatternElementExternalResourcesRequired(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
69 | JSC::EncodedJSValue jsSVGPatternElementViewBox(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
70 | JSC::EncodedJSValue jsSVGPatternElementPreserveAspectRatio(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
71 | JSC::EncodedJSValue jsSVGPatternElementRequiredFeatures(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
72 | JSC::EncodedJSValue jsSVGPatternElementRequiredExtensions(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
73 | JSC::EncodedJSValue jsSVGPatternElementSystemLanguage(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
74 | JSC::EncodedJSValue jsSVGPatternElementHref(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
75 | |
76 | class JSSVGPatternElementPrototype : public JSC::JSNonFinalObject { |
77 | public: |
78 | using Base = JSC::JSNonFinalObject; |
79 | static JSSVGPatternElementPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) |
80 | { |
81 | JSSVGPatternElementPrototype* ptr = new (NotNull, JSC::allocateCell<JSSVGPatternElementPrototype>(vm.heap)) JSSVGPatternElementPrototype(vm, globalObject, structure); |
82 | ptr->finishCreation(vm); |
83 | return ptr; |
84 | } |
85 | |
86 | DECLARE_INFO; |
87 | static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) |
88 | { |
89 | return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); |
90 | } |
91 | |
92 | private: |
93 | JSSVGPatternElementPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) |
94 | : JSC::JSNonFinalObject(vm, structure) |
95 | { |
96 | } |
97 | |
98 | void finishCreation(JSC::VM&); |
99 | }; |
100 | |
101 | using JSSVGPatternElementConstructor = JSDOMConstructorNotConstructable<JSSVGPatternElement>; |
102 | |
103 | template<> JSValue JSSVGPatternElementConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject) |
104 | { |
105 | return JSSVGElement::getConstructor(vm, &globalObject); |
106 | } |
107 | |
108 | template<> void JSSVGPatternElementConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) |
109 | { |
110 | putDirect(vm, vm.propertyNames->prototype, JSSVGPatternElement::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
111 | putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("SVGPatternElement"_s )), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
112 | putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
113 | } |
114 | |
115 | template<> const ClassInfo JSSVGPatternElementConstructor::s_info = { "SVGPatternElement" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGPatternElementConstructor) }; |
116 | |
117 | /* Hash table for prototype */ |
118 | |
119 | static const HashTableValue JSSVGPatternElementPrototypeTableValues[] = |
120 | { |
121 | { "constructor" , static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPatternElementConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPatternElementConstructor) } }, |
122 | { "patternUnits" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPatternElementPatternUnits), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
123 | { "patternContentUnits" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPatternElementPatternContentUnits), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
124 | { "patternTransform" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPatternElementPatternTransform), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
125 | { "x" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPatternElementX), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
126 | { "y" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPatternElementY), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
127 | { "width" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPatternElementWidth), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
128 | { "height" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPatternElementHeight), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
129 | { "externalResourcesRequired" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPatternElementExternalResourcesRequired), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
130 | { "viewBox" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPatternElementViewBox), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
131 | { "preserveAspectRatio" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPatternElementPreserveAspectRatio), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
132 | { "requiredFeatures" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPatternElementRequiredFeatures), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
133 | { "requiredExtensions" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPatternElementRequiredExtensions), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
134 | { "systemLanguage" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPatternElementSystemLanguage), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
135 | { "href" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPatternElementHref), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
136 | { "hasExtension" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGPatternElementPrototypeFunctionHasExtension), (intptr_t) (0) } }, |
137 | }; |
138 | |
139 | const ClassInfo JSSVGPatternElementPrototype::s_info = { "SVGPatternElementPrototype" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGPatternElementPrototype) }; |
140 | |
141 | void JSSVGPatternElementPrototype::finishCreation(VM& vm) |
142 | { |
143 | Base::finishCreation(vm); |
144 | reifyStaticProperties(vm, JSSVGPatternElement::info(), JSSVGPatternElementPrototypeTableValues, *this); |
145 | } |
146 | |
147 | const ClassInfo JSSVGPatternElement::s_info = { "SVGPatternElement" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGPatternElement) }; |
148 | |
149 | JSSVGPatternElement::JSSVGPatternElement(Structure* structure, JSDOMGlobalObject& globalObject, Ref<SVGPatternElement>&& impl) |
150 | : JSSVGElement(structure, globalObject, WTFMove(impl)) |
151 | { |
152 | } |
153 | |
154 | void JSSVGPatternElement::finishCreation(VM& vm) |
155 | { |
156 | Base::finishCreation(vm); |
157 | ASSERT(inherits(vm, info())); |
158 | |
159 | } |
160 | |
161 | JSObject* JSSVGPatternElement::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) |
162 | { |
163 | return JSSVGPatternElementPrototype::create(vm, &globalObject, JSSVGPatternElementPrototype::createStructure(vm, &globalObject, JSSVGElement::prototype(vm, globalObject))); |
164 | } |
165 | |
166 | JSObject* JSSVGPatternElement::prototype(VM& vm, JSDOMGlobalObject& globalObject) |
167 | { |
168 | return getDOMPrototype<JSSVGPatternElement>(vm, globalObject); |
169 | } |
170 | |
171 | JSValue JSSVGPatternElement::getConstructor(VM& vm, const JSGlobalObject* globalObject) |
172 | { |
173 | return getDOMConstructor<JSSVGPatternElementConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject)); |
174 | } |
175 | |
176 | template<> inline JSSVGPatternElement* IDLAttribute<JSSVGPatternElement>::cast(ExecState& state, EncodedJSValue thisValue) |
177 | { |
178 | return jsDynamicCast<JSSVGPatternElement*>(state.vm(), JSValue::decode(thisValue)); |
179 | } |
180 | |
181 | template<> inline JSSVGPatternElement* IDLOperation<JSSVGPatternElement>::cast(ExecState& state) |
182 | { |
183 | return jsDynamicCast<JSSVGPatternElement*>(state.vm(), state.thisValue()); |
184 | } |
185 | |
186 | EncodedJSValue jsSVGPatternElementConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) |
187 | { |
188 | VM& vm = state->vm(); |
189 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
190 | auto* prototype = jsDynamicCast<JSSVGPatternElementPrototype*>(vm, JSValue::decode(thisValue)); |
191 | if (UNLIKELY(!prototype)) |
192 | return throwVMTypeError(state, throwScope); |
193 | return JSValue::encode(JSSVGPatternElement::getConstructor(state->vm(), prototype->globalObject())); |
194 | } |
195 | |
196 | bool setJSSVGPatternElementConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
197 | { |
198 | VM& vm = state->vm(); |
199 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
200 | auto* prototype = jsDynamicCast<JSSVGPatternElementPrototype*>(vm, JSValue::decode(thisValue)); |
201 | if (UNLIKELY(!prototype)) { |
202 | throwVMTypeError(state, throwScope); |
203 | return false; |
204 | } |
205 | // Shadowing a built-in constructor |
206 | return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue)); |
207 | } |
208 | |
209 | static inline JSValue jsSVGPatternElementPatternUnitsGetter(ExecState& state, JSSVGPatternElement& thisObject, ThrowScope& throwScope) |
210 | { |
211 | UNUSED_PARAM(throwScope); |
212 | UNUSED_PARAM(state); |
213 | auto& impl = thisObject.wrapped(); |
214 | JSValue result = toJS<IDLInterface<SVGAnimatedEnumeration>>(state, *thisObject.globalObject(), throwScope, impl.patternUnitsAnimated()); |
215 | return result; |
216 | } |
217 | |
218 | EncodedJSValue jsSVGPatternElementPatternUnits(ExecState* state, EncodedJSValue thisValue, PropertyName) |
219 | { |
220 | return IDLAttribute<JSSVGPatternElement>::get<jsSVGPatternElementPatternUnitsGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "patternUnits" ); |
221 | } |
222 | |
223 | static inline JSValue jsSVGPatternElementPatternContentUnitsGetter(ExecState& state, JSSVGPatternElement& thisObject, ThrowScope& throwScope) |
224 | { |
225 | UNUSED_PARAM(throwScope); |
226 | UNUSED_PARAM(state); |
227 | auto& impl = thisObject.wrapped(); |
228 | JSValue result = toJS<IDLInterface<SVGAnimatedEnumeration>>(state, *thisObject.globalObject(), throwScope, impl.patternContentUnitsAnimated()); |
229 | return result; |
230 | } |
231 | |
232 | EncodedJSValue jsSVGPatternElementPatternContentUnits(ExecState* state, EncodedJSValue thisValue, PropertyName) |
233 | { |
234 | return IDLAttribute<JSSVGPatternElement>::get<jsSVGPatternElementPatternContentUnitsGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "patternContentUnits" ); |
235 | } |
236 | |
237 | static inline JSValue jsSVGPatternElementPatternTransformGetter(ExecState& state, JSSVGPatternElement& thisObject, ThrowScope& throwScope) |
238 | { |
239 | UNUSED_PARAM(throwScope); |
240 | UNUSED_PARAM(state); |
241 | auto& impl = thisObject.wrapped(); |
242 | JSValue result = toJS<IDLInterface<SVGAnimatedTransformList>>(state, *thisObject.globalObject(), throwScope, impl.patternTransformAnimated()); |
243 | return result; |
244 | } |
245 | |
246 | EncodedJSValue jsSVGPatternElementPatternTransform(ExecState* state, EncodedJSValue thisValue, PropertyName) |
247 | { |
248 | return IDLAttribute<JSSVGPatternElement>::get<jsSVGPatternElementPatternTransformGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "patternTransform" ); |
249 | } |
250 | |
251 | static inline JSValue jsSVGPatternElementXGetter(ExecState& state, JSSVGPatternElement& 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.xAnimated()); |
257 | return result; |
258 | } |
259 | |
260 | EncodedJSValue jsSVGPatternElementX(ExecState* state, EncodedJSValue thisValue, PropertyName) |
261 | { |
262 | return IDLAttribute<JSSVGPatternElement>::get<jsSVGPatternElementXGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "x" ); |
263 | } |
264 | |
265 | static inline JSValue jsSVGPatternElementYGetter(ExecState& state, JSSVGPatternElement& 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.yAnimated()); |
271 | return result; |
272 | } |
273 | |
274 | EncodedJSValue jsSVGPatternElementY(ExecState* state, EncodedJSValue thisValue, PropertyName) |
275 | { |
276 | return IDLAttribute<JSSVGPatternElement>::get<jsSVGPatternElementYGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "y" ); |
277 | } |
278 | |
279 | static inline JSValue jsSVGPatternElementWidthGetter(ExecState& state, JSSVGPatternElement& 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.widthAnimated()); |
285 | return result; |
286 | } |
287 | |
288 | EncodedJSValue jsSVGPatternElementWidth(ExecState* state, EncodedJSValue thisValue, PropertyName) |
289 | { |
290 | return IDLAttribute<JSSVGPatternElement>::get<jsSVGPatternElementWidthGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "width" ); |
291 | } |
292 | |
293 | static inline JSValue jsSVGPatternElementHeightGetter(ExecState& state, JSSVGPatternElement& thisObject, ThrowScope& throwScope) |
294 | { |
295 | UNUSED_PARAM(throwScope); |
296 | UNUSED_PARAM(state); |
297 | auto& impl = thisObject.wrapped(); |
298 | JSValue result = toJS<IDLInterface<SVGAnimatedLength>>(state, *thisObject.globalObject(), throwScope, impl.heightAnimated()); |
299 | return result; |
300 | } |
301 | |
302 | EncodedJSValue jsSVGPatternElementHeight(ExecState* state, EncodedJSValue thisValue, PropertyName) |
303 | { |
304 | return IDLAttribute<JSSVGPatternElement>::get<jsSVGPatternElementHeightGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "height" ); |
305 | } |
306 | |
307 | static inline JSValue jsSVGPatternElementExternalResourcesRequiredGetter(ExecState& state, JSSVGPatternElement& thisObject, ThrowScope& throwScope) |
308 | { |
309 | UNUSED_PARAM(throwScope); |
310 | UNUSED_PARAM(state); |
311 | auto& impl = thisObject.wrapped(); |
312 | JSValue result = toJS<IDLInterface<SVGAnimatedBoolean>>(state, *thisObject.globalObject(), throwScope, impl.externalResourcesRequiredAnimated()); |
313 | return result; |
314 | } |
315 | |
316 | EncodedJSValue jsSVGPatternElementExternalResourcesRequired(ExecState* state, EncodedJSValue thisValue, PropertyName) |
317 | { |
318 | return IDLAttribute<JSSVGPatternElement>::get<jsSVGPatternElementExternalResourcesRequiredGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "externalResourcesRequired" ); |
319 | } |
320 | |
321 | static inline JSValue jsSVGPatternElementViewBoxGetter(ExecState& state, JSSVGPatternElement& thisObject, ThrowScope& throwScope) |
322 | { |
323 | UNUSED_PARAM(throwScope); |
324 | UNUSED_PARAM(state); |
325 | auto& impl = thisObject.wrapped(); |
326 | JSValue result = toJS<IDLInterface<SVGAnimatedRect>>(state, *thisObject.globalObject(), throwScope, impl.viewBoxAnimated()); |
327 | return result; |
328 | } |
329 | |
330 | EncodedJSValue jsSVGPatternElementViewBox(ExecState* state, EncodedJSValue thisValue, PropertyName) |
331 | { |
332 | return IDLAttribute<JSSVGPatternElement>::get<jsSVGPatternElementViewBoxGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "viewBox" ); |
333 | } |
334 | |
335 | static inline JSValue jsSVGPatternElementPreserveAspectRatioGetter(ExecState& state, JSSVGPatternElement& thisObject, ThrowScope& throwScope) |
336 | { |
337 | UNUSED_PARAM(throwScope); |
338 | UNUSED_PARAM(state); |
339 | auto& impl = thisObject.wrapped(); |
340 | JSValue result = toJS<IDLInterface<SVGAnimatedPreserveAspectRatio>>(state, *thisObject.globalObject(), throwScope, impl.preserveAspectRatioAnimated()); |
341 | return result; |
342 | } |
343 | |
344 | EncodedJSValue jsSVGPatternElementPreserveAspectRatio(ExecState* state, EncodedJSValue thisValue, PropertyName) |
345 | { |
346 | return IDLAttribute<JSSVGPatternElement>::get<jsSVGPatternElementPreserveAspectRatioGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "preserveAspectRatio" ); |
347 | } |
348 | |
349 | static inline JSValue jsSVGPatternElementRequiredFeaturesGetter(ExecState& state, JSSVGPatternElement& thisObject, ThrowScope& throwScope) |
350 | { |
351 | UNUSED_PARAM(throwScope); |
352 | UNUSED_PARAM(state); |
353 | auto& impl = thisObject.wrapped(); |
354 | JSValue result = toJS<IDLInterface<SVGStringList>>(state, *thisObject.globalObject(), throwScope, impl.requiredFeatures()); |
355 | return result; |
356 | } |
357 | |
358 | EncodedJSValue jsSVGPatternElementRequiredFeatures(ExecState* state, EncodedJSValue thisValue, PropertyName) |
359 | { |
360 | return IDLAttribute<JSSVGPatternElement>::get<jsSVGPatternElementRequiredFeaturesGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "requiredFeatures" ); |
361 | } |
362 | |
363 | static inline JSValue jsSVGPatternElementRequiredExtensionsGetter(ExecState& state, JSSVGPatternElement& thisObject, ThrowScope& throwScope) |
364 | { |
365 | UNUSED_PARAM(throwScope); |
366 | UNUSED_PARAM(state); |
367 | auto& impl = thisObject.wrapped(); |
368 | JSValue result = toJS<IDLInterface<SVGStringList>>(state, *thisObject.globalObject(), throwScope, impl.requiredExtensions()); |
369 | return result; |
370 | } |
371 | |
372 | EncodedJSValue jsSVGPatternElementRequiredExtensions(ExecState* state, EncodedJSValue thisValue, PropertyName) |
373 | { |
374 | return IDLAttribute<JSSVGPatternElement>::get<jsSVGPatternElementRequiredExtensionsGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "requiredExtensions" ); |
375 | } |
376 | |
377 | static inline JSValue jsSVGPatternElementSystemLanguageGetter(ExecState& state, JSSVGPatternElement& thisObject, ThrowScope& throwScope) |
378 | { |
379 | UNUSED_PARAM(throwScope); |
380 | UNUSED_PARAM(state); |
381 | auto& impl = thisObject.wrapped(); |
382 | JSValue result = toJS<IDLInterface<SVGStringList>>(state, *thisObject.globalObject(), throwScope, impl.systemLanguage()); |
383 | return result; |
384 | } |
385 | |
386 | EncodedJSValue jsSVGPatternElementSystemLanguage(ExecState* state, EncodedJSValue thisValue, PropertyName) |
387 | { |
388 | return IDLAttribute<JSSVGPatternElement>::get<jsSVGPatternElementSystemLanguageGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "systemLanguage" ); |
389 | } |
390 | |
391 | static inline JSValue jsSVGPatternElementHrefGetter(ExecState& state, JSSVGPatternElement& thisObject, ThrowScope& throwScope) |
392 | { |
393 | UNUSED_PARAM(throwScope); |
394 | UNUSED_PARAM(state); |
395 | auto& impl = thisObject.wrapped(); |
396 | JSValue result = toJS<IDLInterface<SVGAnimatedString>>(state, *thisObject.globalObject(), throwScope, impl.hrefAnimated()); |
397 | return result; |
398 | } |
399 | |
400 | EncodedJSValue jsSVGPatternElementHref(ExecState* state, EncodedJSValue thisValue, PropertyName) |
401 | { |
402 | return IDLAttribute<JSSVGPatternElement>::get<jsSVGPatternElementHrefGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "href" ); |
403 | } |
404 | |
405 | static inline JSC::EncodedJSValue jsSVGPatternElementPrototypeFunctionHasExtensionBody(JSC::ExecState* state, typename IDLOperation<JSSVGPatternElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
406 | { |
407 | UNUSED_PARAM(state); |
408 | UNUSED_PARAM(throwScope); |
409 | auto& impl = castedThis->wrapped(); |
410 | auto extension = convert<IDLDOMString>(*state, state->argument(0)); |
411 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
412 | return JSValue::encode(toJS<IDLBoolean>(impl.hasExtension(WTFMove(extension)))); |
413 | } |
414 | |
415 | EncodedJSValue JSC_HOST_CALL jsSVGPatternElementPrototypeFunctionHasExtension(ExecState* state) |
416 | { |
417 | return IDLOperation<JSSVGPatternElement>::call<jsSVGPatternElementPrototypeFunctionHasExtensionBody>(*state, "hasExtension" ); |
418 | } |
419 | |
420 | void JSSVGPatternElement::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) |
421 | { |
422 | auto* thisObject = jsCast<JSSVGPatternElement*>(cell); |
423 | builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); |
424 | if (thisObject->scriptExecutionContext()) |
425 | builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); |
426 | Base::heapSnapshot(cell, builder); |
427 | } |
428 | |
429 | |
430 | } |
431 | |