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 "JSSVGSVGElement.h"
23
24#include "JSDOMAttribute.h"
25#include "JSDOMBinding.h"
26#include "JSDOMConstructorNotConstructable.h"
27#include "JSDOMConvertBoolean.h"
28#include "JSDOMConvertInterface.h"
29#include "JSDOMConvertNullable.h"
30#include "JSDOMConvertNumbers.h"
31#include "JSDOMConvertStrings.h"
32#include "JSDOMExceptionHandling.h"
33#include "JSDOMGlobalObject.h"
34#include "JSDOMOperation.h"
35#include "JSDOMWrapperCache.h"
36#include "JSElement.h"
37#include "JSNodeList.h"
38#include "JSSVGAngle.h"
39#include "JSSVGAnimatedBoolean.h"
40#include "JSSVGAnimatedLength.h"
41#include "JSSVGAnimatedPreserveAspectRatio.h"
42#include "JSSVGAnimatedRect.h"
43#include "JSSVGElement.h"
44#include "JSSVGLength.h"
45#include "JSSVGMatrix.h"
46#include "JSSVGNumber.h"
47#include "JSSVGPoint.h"
48#include "JSSVGRect.h"
49#include "JSSVGTransform.h"
50#include "JSSVGViewSpec.h"
51#include "ScriptExecutionContext.h"
52#include <JavaScriptCore/HeapSnapshotBuilder.h>
53#include <JavaScriptCore/JSCInlines.h>
54#include <wtf/GetPtr.h>
55#include <wtf/PointerPreparations.h>
56#include <wtf/URL.h>
57
58
59namespace WebCore {
60using namespace JSC;
61
62// Functions
63
64JSC::EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionSuspendRedraw(JSC::ExecState*);
65JSC::EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionUnsuspendRedraw(JSC::ExecState*);
66JSC::EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionUnsuspendRedrawAll(JSC::ExecState*);
67JSC::EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionForceRedraw(JSC::ExecState*);
68JSC::EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionPauseAnimations(JSC::ExecState*);
69JSC::EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionUnpauseAnimations(JSC::ExecState*);
70JSC::EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionAnimationsPaused(JSC::ExecState*);
71JSC::EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionGetCurrentTime(JSC::ExecState*);
72JSC::EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionSetCurrentTime(JSC::ExecState*);
73JSC::EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionGetIntersectionList(JSC::ExecState*);
74JSC::EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionGetEnclosureList(JSC::ExecState*);
75JSC::EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCheckIntersection(JSC::ExecState*);
76JSC::EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCheckEnclosure(JSC::ExecState*);
77JSC::EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionDeselectAll(JSC::ExecState*);
78JSC::EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGNumber(JSC::ExecState*);
79JSC::EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGLength(JSC::ExecState*);
80JSC::EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGAngle(JSC::ExecState*);
81JSC::EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGPoint(JSC::ExecState*);
82JSC::EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGMatrix(JSC::ExecState*);
83JSC::EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGRect(JSC::ExecState*);
84JSC::EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGTransform(JSC::ExecState*);
85JSC::EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGTransformFromMatrix(JSC::ExecState*);
86JSC::EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionGetElementById(JSC::ExecState*);
87
88// Attributes
89
90JSC::EncodedJSValue jsSVGSVGElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
91bool setJSSVGSVGElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
92JSC::EncodedJSValue jsSVGSVGElementX(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
93JSC::EncodedJSValue jsSVGSVGElementY(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
94JSC::EncodedJSValue jsSVGSVGElementWidth(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
95JSC::EncodedJSValue jsSVGSVGElementHeight(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
96JSC::EncodedJSValue jsSVGSVGElementContentScriptType(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
97bool setJSSVGSVGElementContentScriptType(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
98JSC::EncodedJSValue jsSVGSVGElementContentStyleType(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
99bool setJSSVGSVGElementContentStyleType(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
100JSC::EncodedJSValue jsSVGSVGElementViewport(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
101JSC::EncodedJSValue jsSVGSVGElementPixelUnitToMillimeterX(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
102JSC::EncodedJSValue jsSVGSVGElementPixelUnitToMillimeterY(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
103JSC::EncodedJSValue jsSVGSVGElementScreenPixelToMillimeterX(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
104JSC::EncodedJSValue jsSVGSVGElementScreenPixelToMillimeterY(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
105JSC::EncodedJSValue jsSVGSVGElementUseCurrentView(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
106JSC::EncodedJSValue jsSVGSVGElementCurrentView(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
107JSC::EncodedJSValue jsSVGSVGElementCurrentScale(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
108bool setJSSVGSVGElementCurrentScale(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
109JSC::EncodedJSValue jsSVGSVGElementCurrentTranslate(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
110JSC::EncodedJSValue jsSVGSVGElementExternalResourcesRequired(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
111JSC::EncodedJSValue jsSVGSVGElementViewBox(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
112JSC::EncodedJSValue jsSVGSVGElementPreserveAspectRatio(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
113JSC::EncodedJSValue jsSVGSVGElementZoomAndPan(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
114bool setJSSVGSVGElementZoomAndPan(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
115
116class JSSVGSVGElementPrototype : public JSC::JSNonFinalObject {
117public:
118 using Base = JSC::JSNonFinalObject;
119 static JSSVGSVGElementPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
120 {
121 JSSVGSVGElementPrototype* ptr = new (NotNull, JSC::allocateCell<JSSVGSVGElementPrototype>(vm.heap)) JSSVGSVGElementPrototype(vm, globalObject, structure);
122 ptr->finishCreation(vm);
123 return ptr;
124 }
125
126 DECLARE_INFO;
127 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
128 {
129 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
130 }
131
132private:
133 JSSVGSVGElementPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
134 : JSC::JSNonFinalObject(vm, structure)
135 {
136 }
137
138 void finishCreation(JSC::VM&);
139};
140
141using JSSVGSVGElementConstructor = JSDOMConstructorNotConstructable<JSSVGSVGElement>;
142
143/* Hash table for constructor */
144
145static const HashTableValue JSSVGSVGElementConstructorTableValues[] =
146{
147 { "SVG_ZOOMANDPAN_UNKNOWN", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(0) } },
148 { "SVG_ZOOMANDPAN_DISABLE", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(1) } },
149 { "SVG_ZOOMANDPAN_MAGNIFY", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(2) } },
150};
151
152static_assert(SVGSVGElement::SVG_ZOOMANDPAN_UNKNOWN == 0, "SVG_ZOOMANDPAN_UNKNOWN in SVGSVGElement does not match value from IDL");
153static_assert(SVGSVGElement::SVG_ZOOMANDPAN_DISABLE == 1, "SVG_ZOOMANDPAN_DISABLE in SVGSVGElement does not match value from IDL");
154static_assert(SVGSVGElement::SVG_ZOOMANDPAN_MAGNIFY == 2, "SVG_ZOOMANDPAN_MAGNIFY in SVGSVGElement does not match value from IDL");
155
156template<> JSValue JSSVGSVGElementConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
157{
158 return JSSVGGraphicsElement::getConstructor(vm, &globalObject);
159}
160
161template<> void JSSVGSVGElementConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
162{
163 putDirect(vm, vm.propertyNames->prototype, JSSVGSVGElement::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
164 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("SVGSVGElement"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
165 putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
166 reifyStaticProperties(vm, JSSVGSVGElement::info(), JSSVGSVGElementConstructorTableValues, *this);
167}
168
169template<> const ClassInfo JSSVGSVGElementConstructor::s_info = { "SVGSVGElement", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGSVGElementConstructor) };
170
171/* Hash table for prototype */
172
173static const HashTableValue JSSVGSVGElementPrototypeTableValues[] =
174{
175 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGSVGElementConstructor) } },
176 { "x", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementX), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
177 { "y", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementY), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
178 { "width", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementWidth), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
179 { "height", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementHeight), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
180 { "contentScriptType", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementContentScriptType), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGSVGElementContentScriptType) } },
181 { "contentStyleType", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementContentStyleType), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGSVGElementContentStyleType) } },
182 { "viewport", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementViewport), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
183 { "pixelUnitToMillimeterX", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementPixelUnitToMillimeterX), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
184 { "pixelUnitToMillimeterY", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementPixelUnitToMillimeterY), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
185 { "screenPixelToMillimeterX", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementScreenPixelToMillimeterX), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
186 { "screenPixelToMillimeterY", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementScreenPixelToMillimeterY), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
187 { "useCurrentView", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementUseCurrentView), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
188 { "currentView", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementCurrentView), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
189 { "currentScale", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementCurrentScale), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGSVGElementCurrentScale) } },
190 { "currentTranslate", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementCurrentTranslate), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
191 { "externalResourcesRequired", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementExternalResourcesRequired), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
192 { "viewBox", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementViewBox), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
193 { "preserveAspectRatio", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementPreserveAspectRatio), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
194 { "zoomAndPan", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementZoomAndPan), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGSVGElementZoomAndPan) } },
195 { "suspendRedraw", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGSVGElementPrototypeFunctionSuspendRedraw), (intptr_t) (0) } },
196 { "unsuspendRedraw", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGSVGElementPrototypeFunctionUnsuspendRedraw), (intptr_t) (0) } },
197 { "unsuspendRedrawAll", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGSVGElementPrototypeFunctionUnsuspendRedrawAll), (intptr_t) (0) } },
198 { "forceRedraw", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGSVGElementPrototypeFunctionForceRedraw), (intptr_t) (0) } },
199 { "pauseAnimations", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGSVGElementPrototypeFunctionPauseAnimations), (intptr_t) (0) } },
200 { "unpauseAnimations", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGSVGElementPrototypeFunctionUnpauseAnimations), (intptr_t) (0) } },
201 { "animationsPaused", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGSVGElementPrototypeFunctionAnimationsPaused), (intptr_t) (0) } },
202 { "getCurrentTime", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGSVGElementPrototypeFunctionGetCurrentTime), (intptr_t) (0) } },
203 { "setCurrentTime", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGSVGElementPrototypeFunctionSetCurrentTime), (intptr_t) (0) } },
204 { "getIntersectionList", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGSVGElementPrototypeFunctionGetIntersectionList), (intptr_t) (1) } },
205 { "getEnclosureList", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGSVGElementPrototypeFunctionGetEnclosureList), (intptr_t) (1) } },
206 { "checkIntersection", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGSVGElementPrototypeFunctionCheckIntersection), (intptr_t) (2) } },
207 { "checkEnclosure", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGSVGElementPrototypeFunctionCheckEnclosure), (intptr_t) (2) } },
208 { "deselectAll", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGSVGElementPrototypeFunctionDeselectAll), (intptr_t) (0) } },
209 { "createSVGNumber", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGSVGElementPrototypeFunctionCreateSVGNumber), (intptr_t) (0) } },
210 { "createSVGLength", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGSVGElementPrototypeFunctionCreateSVGLength), (intptr_t) (0) } },
211 { "createSVGAngle", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGSVGElementPrototypeFunctionCreateSVGAngle), (intptr_t) (0) } },
212 { "createSVGPoint", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGSVGElementPrototypeFunctionCreateSVGPoint), (intptr_t) (0) } },
213 { "createSVGMatrix", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGSVGElementPrototypeFunctionCreateSVGMatrix), (intptr_t) (0) } },
214 { "createSVGRect", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGSVGElementPrototypeFunctionCreateSVGRect), (intptr_t) (0) } },
215 { "createSVGTransform", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGSVGElementPrototypeFunctionCreateSVGTransform), (intptr_t) (0) } },
216 { "createSVGTransformFromMatrix", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGSVGElementPrototypeFunctionCreateSVGTransformFromMatrix), (intptr_t) (1) } },
217 { "getElementById", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGSVGElementPrototypeFunctionGetElementById), (intptr_t) (1) } },
218 { "SVG_ZOOMANDPAN_UNKNOWN", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(0) } },
219 { "SVG_ZOOMANDPAN_DISABLE", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(1) } },
220 { "SVG_ZOOMANDPAN_MAGNIFY", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(2) } },
221};
222
223const ClassInfo JSSVGSVGElementPrototype::s_info = { "SVGSVGElementPrototype", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGSVGElementPrototype) };
224
225void JSSVGSVGElementPrototype::finishCreation(VM& vm)
226{
227 Base::finishCreation(vm);
228 reifyStaticProperties(vm, JSSVGSVGElement::info(), JSSVGSVGElementPrototypeTableValues, *this);
229}
230
231const ClassInfo JSSVGSVGElement::s_info = { "SVGSVGElement", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGSVGElement) };
232
233JSSVGSVGElement::JSSVGSVGElement(Structure* structure, JSDOMGlobalObject& globalObject, Ref<SVGSVGElement>&& impl)
234 : JSSVGGraphicsElement(structure, globalObject, WTFMove(impl))
235{
236}
237
238void JSSVGSVGElement::finishCreation(VM& vm)
239{
240 Base::finishCreation(vm);
241 ASSERT(inherits(vm, info()));
242
243}
244
245JSObject* JSSVGSVGElement::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
246{
247 return JSSVGSVGElementPrototype::create(vm, &globalObject, JSSVGSVGElementPrototype::createStructure(vm, &globalObject, JSSVGGraphicsElement::prototype(vm, globalObject)));
248}
249
250JSObject* JSSVGSVGElement::prototype(VM& vm, JSDOMGlobalObject& globalObject)
251{
252 return getDOMPrototype<JSSVGSVGElement>(vm, globalObject);
253}
254
255JSValue JSSVGSVGElement::getConstructor(VM& vm, const JSGlobalObject* globalObject)
256{
257 return getDOMConstructor<JSSVGSVGElementConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
258}
259
260template<> inline JSSVGSVGElement* IDLAttribute<JSSVGSVGElement>::cast(ExecState& state, EncodedJSValue thisValue)
261{
262 return jsDynamicCast<JSSVGSVGElement*>(state.vm(), JSValue::decode(thisValue));
263}
264
265template<> inline JSSVGSVGElement* IDLOperation<JSSVGSVGElement>::cast(ExecState& state)
266{
267 return jsDynamicCast<JSSVGSVGElement*>(state.vm(), state.thisValue());
268}
269
270EncodedJSValue jsSVGSVGElementConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
271{
272 VM& vm = state->vm();
273 auto throwScope = DECLARE_THROW_SCOPE(vm);
274 auto* prototype = jsDynamicCast<JSSVGSVGElementPrototype*>(vm, JSValue::decode(thisValue));
275 if (UNLIKELY(!prototype))
276 return throwVMTypeError(state, throwScope);
277 return JSValue::encode(JSSVGSVGElement::getConstructor(state->vm(), prototype->globalObject()));
278}
279
280bool setJSSVGSVGElementConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
281{
282 VM& vm = state->vm();
283 auto throwScope = DECLARE_THROW_SCOPE(vm);
284 auto* prototype = jsDynamicCast<JSSVGSVGElementPrototype*>(vm, JSValue::decode(thisValue));
285 if (UNLIKELY(!prototype)) {
286 throwVMTypeError(state, throwScope);
287 return false;
288 }
289 // Shadowing a built-in constructor
290 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));
291}
292
293static inline JSValue jsSVGSVGElementXGetter(ExecState& state, JSSVGSVGElement& 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.xAnimated());
299 return result;
300}
301
302EncodedJSValue jsSVGSVGElementX(ExecState* state, EncodedJSValue thisValue, PropertyName)
303{
304 return IDLAttribute<JSSVGSVGElement>::get<jsSVGSVGElementXGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "x");
305}
306
307static inline JSValue jsSVGSVGElementYGetter(ExecState& state, JSSVGSVGElement& thisObject, ThrowScope& throwScope)
308{
309 UNUSED_PARAM(throwScope);
310 UNUSED_PARAM(state);
311 auto& impl = thisObject.wrapped();
312 JSValue result = toJS<IDLInterface<SVGAnimatedLength>>(state, *thisObject.globalObject(), throwScope, impl.yAnimated());
313 return result;
314}
315
316EncodedJSValue jsSVGSVGElementY(ExecState* state, EncodedJSValue thisValue, PropertyName)
317{
318 return IDLAttribute<JSSVGSVGElement>::get<jsSVGSVGElementYGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "y");
319}
320
321static inline JSValue jsSVGSVGElementWidthGetter(ExecState& state, JSSVGSVGElement& thisObject, ThrowScope& throwScope)
322{
323 UNUSED_PARAM(throwScope);
324 UNUSED_PARAM(state);
325 auto& impl = thisObject.wrapped();
326 JSValue result = toJS<IDLInterface<SVGAnimatedLength>>(state, *thisObject.globalObject(), throwScope, impl.widthAnimated());
327 return result;
328}
329
330EncodedJSValue jsSVGSVGElementWidth(ExecState* state, EncodedJSValue thisValue, PropertyName)
331{
332 return IDLAttribute<JSSVGSVGElement>::get<jsSVGSVGElementWidthGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "width");
333}
334
335static inline JSValue jsSVGSVGElementHeightGetter(ExecState& state, JSSVGSVGElement& thisObject, ThrowScope& throwScope)
336{
337 UNUSED_PARAM(throwScope);
338 UNUSED_PARAM(state);
339 auto& impl = thisObject.wrapped();
340 JSValue result = toJS<IDLInterface<SVGAnimatedLength>>(state, *thisObject.globalObject(), throwScope, impl.heightAnimated());
341 return result;
342}
343
344EncodedJSValue jsSVGSVGElementHeight(ExecState* state, EncodedJSValue thisValue, PropertyName)
345{
346 return IDLAttribute<JSSVGSVGElement>::get<jsSVGSVGElementHeightGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "height");
347}
348
349static inline JSValue jsSVGSVGElementContentScriptTypeGetter(ExecState& state, JSSVGSVGElement& thisObject, ThrowScope& throwScope)
350{
351 UNUSED_PARAM(throwScope);
352 UNUSED_PARAM(state);
353 auto& impl = thisObject.wrapped();
354 JSValue result = toJS<IDLDOMString>(state, throwScope, impl.contentScriptType());
355 return result;
356}
357
358EncodedJSValue jsSVGSVGElementContentScriptType(ExecState* state, EncodedJSValue thisValue, PropertyName)
359{
360 return IDLAttribute<JSSVGSVGElement>::get<jsSVGSVGElementContentScriptTypeGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "contentScriptType");
361}
362
363static inline bool setJSSVGSVGElementContentScriptTypeSetter(ExecState& state, JSSVGSVGElement& thisObject, JSValue value, ThrowScope& throwScope)
364{
365 UNUSED_PARAM(throwScope);
366 auto& impl = thisObject.wrapped();
367 auto nativeValue = convert<IDLDOMString>(state, value);
368 RETURN_IF_EXCEPTION(throwScope, false);
369 AttributeSetter::call(state, throwScope, [&] {
370 return impl.setContentScriptType(WTFMove(nativeValue));
371 });
372 return true;
373}
374
375bool setJSSVGSVGElementContentScriptType(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
376{
377 return IDLAttribute<JSSVGSVGElement>::set<setJSSVGSVGElementContentScriptTypeSetter>(*state, thisValue, encodedValue, "contentScriptType");
378}
379
380static inline JSValue jsSVGSVGElementContentStyleTypeGetter(ExecState& state, JSSVGSVGElement& thisObject, ThrowScope& throwScope)
381{
382 UNUSED_PARAM(throwScope);
383 UNUSED_PARAM(state);
384 auto& impl = thisObject.wrapped();
385 JSValue result = toJS<IDLDOMString>(state, throwScope, impl.contentStyleType());
386 return result;
387}
388
389EncodedJSValue jsSVGSVGElementContentStyleType(ExecState* state, EncodedJSValue thisValue, PropertyName)
390{
391 return IDLAttribute<JSSVGSVGElement>::get<jsSVGSVGElementContentStyleTypeGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "contentStyleType");
392}
393
394static inline bool setJSSVGSVGElementContentStyleTypeSetter(ExecState& state, JSSVGSVGElement& thisObject, JSValue value, ThrowScope& throwScope)
395{
396 UNUSED_PARAM(throwScope);
397 auto& impl = thisObject.wrapped();
398 auto nativeValue = convert<IDLDOMString>(state, value);
399 RETURN_IF_EXCEPTION(throwScope, false);
400 AttributeSetter::call(state, throwScope, [&] {
401 return impl.setContentStyleType(WTFMove(nativeValue));
402 });
403 return true;
404}
405
406bool setJSSVGSVGElementContentStyleType(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
407{
408 return IDLAttribute<JSSVGSVGElement>::set<setJSSVGSVGElementContentStyleTypeSetter>(*state, thisValue, encodedValue, "contentStyleType");
409}
410
411static inline JSValue jsSVGSVGElementViewportGetter(ExecState& state, JSSVGSVGElement& thisObject, ThrowScope& throwScope)
412{
413 UNUSED_PARAM(throwScope);
414 UNUSED_PARAM(state);
415 auto& impl = thisObject.wrapped();
416 JSValue result = toJSNewlyCreated<IDLInterface<SVGRect>>(state, *thisObject.globalObject(), throwScope, impl.viewport());
417 return result;
418}
419
420EncodedJSValue jsSVGSVGElementViewport(ExecState* state, EncodedJSValue thisValue, PropertyName)
421{
422 return IDLAttribute<JSSVGSVGElement>::get<jsSVGSVGElementViewportGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "viewport");
423}
424
425static inline JSValue jsSVGSVGElementPixelUnitToMillimeterXGetter(ExecState& state, JSSVGSVGElement& thisObject, ThrowScope& throwScope)
426{
427 UNUSED_PARAM(throwScope);
428 UNUSED_PARAM(state);
429 auto& impl = thisObject.wrapped();
430 JSValue result = toJS<IDLUnrestrictedFloat>(state, throwScope, impl.pixelUnitToMillimeterX());
431 return result;
432}
433
434EncodedJSValue jsSVGSVGElementPixelUnitToMillimeterX(ExecState* state, EncodedJSValue thisValue, PropertyName)
435{
436 return IDLAttribute<JSSVGSVGElement>::get<jsSVGSVGElementPixelUnitToMillimeterXGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "pixelUnitToMillimeterX");
437}
438
439static inline JSValue jsSVGSVGElementPixelUnitToMillimeterYGetter(ExecState& state, JSSVGSVGElement& thisObject, ThrowScope& throwScope)
440{
441 UNUSED_PARAM(throwScope);
442 UNUSED_PARAM(state);
443 auto& impl = thisObject.wrapped();
444 JSValue result = toJS<IDLUnrestrictedFloat>(state, throwScope, impl.pixelUnitToMillimeterY());
445 return result;
446}
447
448EncodedJSValue jsSVGSVGElementPixelUnitToMillimeterY(ExecState* state, EncodedJSValue thisValue, PropertyName)
449{
450 return IDLAttribute<JSSVGSVGElement>::get<jsSVGSVGElementPixelUnitToMillimeterYGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "pixelUnitToMillimeterY");
451}
452
453static inline JSValue jsSVGSVGElementScreenPixelToMillimeterXGetter(ExecState& state, JSSVGSVGElement& thisObject, ThrowScope& throwScope)
454{
455 UNUSED_PARAM(throwScope);
456 UNUSED_PARAM(state);
457 auto& impl = thisObject.wrapped();
458 JSValue result = toJS<IDLUnrestrictedFloat>(state, throwScope, impl.screenPixelToMillimeterX());
459 return result;
460}
461
462EncodedJSValue jsSVGSVGElementScreenPixelToMillimeterX(ExecState* state, EncodedJSValue thisValue, PropertyName)
463{
464 return IDLAttribute<JSSVGSVGElement>::get<jsSVGSVGElementScreenPixelToMillimeterXGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "screenPixelToMillimeterX");
465}
466
467static inline JSValue jsSVGSVGElementScreenPixelToMillimeterYGetter(ExecState& state, JSSVGSVGElement& thisObject, ThrowScope& throwScope)
468{
469 UNUSED_PARAM(throwScope);
470 UNUSED_PARAM(state);
471 auto& impl = thisObject.wrapped();
472 JSValue result = toJS<IDLUnrestrictedFloat>(state, throwScope, impl.screenPixelToMillimeterY());
473 return result;
474}
475
476EncodedJSValue jsSVGSVGElementScreenPixelToMillimeterY(ExecState* state, EncodedJSValue thisValue, PropertyName)
477{
478 return IDLAttribute<JSSVGSVGElement>::get<jsSVGSVGElementScreenPixelToMillimeterYGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "screenPixelToMillimeterY");
479}
480
481static inline JSValue jsSVGSVGElementUseCurrentViewGetter(ExecState& state, JSSVGSVGElement& thisObject, ThrowScope& throwScope)
482{
483 UNUSED_PARAM(throwScope);
484 UNUSED_PARAM(state);
485 auto& impl = thisObject.wrapped();
486 JSValue result = toJS<IDLBoolean>(state, throwScope, impl.useCurrentView());
487 return result;
488}
489
490EncodedJSValue jsSVGSVGElementUseCurrentView(ExecState* state, EncodedJSValue thisValue, PropertyName)
491{
492 return IDLAttribute<JSSVGSVGElement>::get<jsSVGSVGElementUseCurrentViewGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "useCurrentView");
493}
494
495static inline JSValue jsSVGSVGElementCurrentViewGetter(ExecState& state, JSSVGSVGElement& thisObject, ThrowScope& throwScope)
496{
497 UNUSED_PARAM(throwScope);
498 UNUSED_PARAM(state);
499 auto& impl = thisObject.wrapped();
500 JSValue result = toJS<IDLInterface<SVGViewSpec>>(state, *thisObject.globalObject(), throwScope, impl.currentView());
501 return result;
502}
503
504EncodedJSValue jsSVGSVGElementCurrentView(ExecState* state, EncodedJSValue thisValue, PropertyName)
505{
506 return IDLAttribute<JSSVGSVGElement>::get<jsSVGSVGElementCurrentViewGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "currentView");
507}
508
509static inline JSValue jsSVGSVGElementCurrentScaleGetter(ExecState& state, JSSVGSVGElement& thisObject, ThrowScope& throwScope)
510{
511 UNUSED_PARAM(throwScope);
512 UNUSED_PARAM(state);
513 auto& impl = thisObject.wrapped();
514 JSValue result = toJS<IDLUnrestrictedFloat>(state, throwScope, impl.currentScale());
515 return result;
516}
517
518EncodedJSValue jsSVGSVGElementCurrentScale(ExecState* state, EncodedJSValue thisValue, PropertyName)
519{
520 return IDLAttribute<JSSVGSVGElement>::get<jsSVGSVGElementCurrentScaleGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "currentScale");
521}
522
523static inline bool setJSSVGSVGElementCurrentScaleSetter(ExecState& state, JSSVGSVGElement& thisObject, JSValue value, ThrowScope& throwScope)
524{
525 UNUSED_PARAM(throwScope);
526 auto& impl = thisObject.wrapped();
527 auto nativeValue = convert<IDLUnrestrictedFloat>(state, value);
528 RETURN_IF_EXCEPTION(throwScope, false);
529 AttributeSetter::call(state, throwScope, [&] {
530 return impl.setCurrentScale(WTFMove(nativeValue));
531 });
532 return true;
533}
534
535bool setJSSVGSVGElementCurrentScale(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
536{
537 return IDLAttribute<JSSVGSVGElement>::set<setJSSVGSVGElementCurrentScaleSetter>(*state, thisValue, encodedValue, "currentScale");
538}
539
540static inline JSValue jsSVGSVGElementCurrentTranslateGetter(ExecState& state, JSSVGSVGElement& thisObject, ThrowScope& throwScope)
541{
542 UNUSED_PARAM(throwScope);
543 UNUSED_PARAM(state);
544 auto& impl = thisObject.wrapped();
545 JSValue result = toJS<IDLInterface<SVGPoint>>(state, *thisObject.globalObject(), throwScope, impl.currentTranslate());
546 return result;
547}
548
549EncodedJSValue jsSVGSVGElementCurrentTranslate(ExecState* state, EncodedJSValue thisValue, PropertyName)
550{
551 return IDLAttribute<JSSVGSVGElement>::get<jsSVGSVGElementCurrentTranslateGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "currentTranslate");
552}
553
554static inline JSValue jsSVGSVGElementExternalResourcesRequiredGetter(ExecState& state, JSSVGSVGElement& thisObject, ThrowScope& throwScope)
555{
556 UNUSED_PARAM(throwScope);
557 UNUSED_PARAM(state);
558 auto& impl = thisObject.wrapped();
559 JSValue result = toJS<IDLInterface<SVGAnimatedBoolean>>(state, *thisObject.globalObject(), throwScope, impl.externalResourcesRequiredAnimated());
560 return result;
561}
562
563EncodedJSValue jsSVGSVGElementExternalResourcesRequired(ExecState* state, EncodedJSValue thisValue, PropertyName)
564{
565 return IDLAttribute<JSSVGSVGElement>::get<jsSVGSVGElementExternalResourcesRequiredGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "externalResourcesRequired");
566}
567
568static inline JSValue jsSVGSVGElementViewBoxGetter(ExecState& state, JSSVGSVGElement& thisObject, ThrowScope& throwScope)
569{
570 UNUSED_PARAM(throwScope);
571 UNUSED_PARAM(state);
572 auto& impl = thisObject.wrapped();
573 JSValue result = toJS<IDLInterface<SVGAnimatedRect>>(state, *thisObject.globalObject(), throwScope, impl.viewBoxAnimated());
574 return result;
575}
576
577EncodedJSValue jsSVGSVGElementViewBox(ExecState* state, EncodedJSValue thisValue, PropertyName)
578{
579 return IDLAttribute<JSSVGSVGElement>::get<jsSVGSVGElementViewBoxGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "viewBox");
580}
581
582static inline JSValue jsSVGSVGElementPreserveAspectRatioGetter(ExecState& state, JSSVGSVGElement& thisObject, ThrowScope& throwScope)
583{
584 UNUSED_PARAM(throwScope);
585 UNUSED_PARAM(state);
586 auto& impl = thisObject.wrapped();
587 JSValue result = toJS<IDLInterface<SVGAnimatedPreserveAspectRatio>>(state, *thisObject.globalObject(), throwScope, impl.preserveAspectRatioAnimated());
588 return result;
589}
590
591EncodedJSValue jsSVGSVGElementPreserveAspectRatio(ExecState* state, EncodedJSValue thisValue, PropertyName)
592{
593 return IDLAttribute<JSSVGSVGElement>::get<jsSVGSVGElementPreserveAspectRatioGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "preserveAspectRatio");
594}
595
596static inline JSValue jsSVGSVGElementZoomAndPanGetter(ExecState& state, JSSVGSVGElement& thisObject, ThrowScope& throwScope)
597{
598 UNUSED_PARAM(throwScope);
599 UNUSED_PARAM(state);
600 auto& impl = thisObject.wrapped();
601 JSValue result = toJS<IDLUnsignedShort>(state, throwScope, impl.zoomAndPan());
602 return result;
603}
604
605EncodedJSValue jsSVGSVGElementZoomAndPan(ExecState* state, EncodedJSValue thisValue, PropertyName)
606{
607 return IDLAttribute<JSSVGSVGElement>::get<jsSVGSVGElementZoomAndPanGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "zoomAndPan");
608}
609
610static inline bool setJSSVGSVGElementZoomAndPanSetter(ExecState& state, JSSVGSVGElement& thisObject, JSValue value, ThrowScope& throwScope)
611{
612 UNUSED_PARAM(throwScope);
613 auto& impl = thisObject.wrapped();
614 auto nativeValue = convert<IDLUnsignedShort>(state, value);
615 RETURN_IF_EXCEPTION(throwScope, false);
616 AttributeSetter::call(state, throwScope, [&] {
617 return impl.setZoomAndPan(WTFMove(nativeValue));
618 });
619 return true;
620}
621
622bool setJSSVGSVGElementZoomAndPan(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
623{
624 return IDLAttribute<JSSVGSVGElement>::set<setJSSVGSVGElementZoomAndPanSetter>(*state, thisValue, encodedValue, "zoomAndPan");
625}
626
627static inline JSC::EncodedJSValue jsSVGSVGElementPrototypeFunctionSuspendRedrawBody(JSC::ExecState* state, typename IDLOperation<JSSVGSVGElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
628{
629 UNUSED_PARAM(state);
630 UNUSED_PARAM(throwScope);
631 auto& impl = castedThis->wrapped();
632 auto maxWaitMilliseconds = convert<IDLUnsignedLong>(*state, state->argument(0));
633 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
634 return JSValue::encode(toJS<IDLUnsignedLong>(impl.suspendRedraw(WTFMove(maxWaitMilliseconds))));
635}
636
637EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionSuspendRedraw(ExecState* state)
638{
639 return IDLOperation<JSSVGSVGElement>::call<jsSVGSVGElementPrototypeFunctionSuspendRedrawBody>(*state, "suspendRedraw");
640}
641
642static inline JSC::EncodedJSValue jsSVGSVGElementPrototypeFunctionUnsuspendRedrawBody(JSC::ExecState* state, typename IDLOperation<JSSVGSVGElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
643{
644 UNUSED_PARAM(state);
645 UNUSED_PARAM(throwScope);
646 auto& impl = castedThis->wrapped();
647 auto suspendHandleId = convert<IDLUnsignedLong>(*state, state->argument(0));
648 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
649 impl.unsuspendRedraw(WTFMove(suspendHandleId));
650 return JSValue::encode(jsUndefined());
651}
652
653EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionUnsuspendRedraw(ExecState* state)
654{
655 return IDLOperation<JSSVGSVGElement>::call<jsSVGSVGElementPrototypeFunctionUnsuspendRedrawBody>(*state, "unsuspendRedraw");
656}
657
658static inline JSC::EncodedJSValue jsSVGSVGElementPrototypeFunctionUnsuspendRedrawAllBody(JSC::ExecState* state, typename IDLOperation<JSSVGSVGElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
659{
660 UNUSED_PARAM(state);
661 UNUSED_PARAM(throwScope);
662 auto& impl = castedThis->wrapped();
663 impl.unsuspendRedrawAll();
664 return JSValue::encode(jsUndefined());
665}
666
667EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionUnsuspendRedrawAll(ExecState* state)
668{
669 return IDLOperation<JSSVGSVGElement>::call<jsSVGSVGElementPrototypeFunctionUnsuspendRedrawAllBody>(*state, "unsuspendRedrawAll");
670}
671
672static inline JSC::EncodedJSValue jsSVGSVGElementPrototypeFunctionForceRedrawBody(JSC::ExecState* state, typename IDLOperation<JSSVGSVGElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
673{
674 UNUSED_PARAM(state);
675 UNUSED_PARAM(throwScope);
676 auto& impl = castedThis->wrapped();
677 impl.forceRedraw();
678 return JSValue::encode(jsUndefined());
679}
680
681EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionForceRedraw(ExecState* state)
682{
683 return IDLOperation<JSSVGSVGElement>::call<jsSVGSVGElementPrototypeFunctionForceRedrawBody>(*state, "forceRedraw");
684}
685
686static inline JSC::EncodedJSValue jsSVGSVGElementPrototypeFunctionPauseAnimationsBody(JSC::ExecState* state, typename IDLOperation<JSSVGSVGElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
687{
688 UNUSED_PARAM(state);
689 UNUSED_PARAM(throwScope);
690 auto& impl = castedThis->wrapped();
691 impl.pauseAnimations();
692 return JSValue::encode(jsUndefined());
693}
694
695EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionPauseAnimations(ExecState* state)
696{
697 return IDLOperation<JSSVGSVGElement>::call<jsSVGSVGElementPrototypeFunctionPauseAnimationsBody>(*state, "pauseAnimations");
698}
699
700static inline JSC::EncodedJSValue jsSVGSVGElementPrototypeFunctionUnpauseAnimationsBody(JSC::ExecState* state, typename IDLOperation<JSSVGSVGElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
701{
702 UNUSED_PARAM(state);
703 UNUSED_PARAM(throwScope);
704 auto& impl = castedThis->wrapped();
705 impl.unpauseAnimations();
706 return JSValue::encode(jsUndefined());
707}
708
709EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionUnpauseAnimations(ExecState* state)
710{
711 return IDLOperation<JSSVGSVGElement>::call<jsSVGSVGElementPrototypeFunctionUnpauseAnimationsBody>(*state, "unpauseAnimations");
712}
713
714static inline JSC::EncodedJSValue jsSVGSVGElementPrototypeFunctionAnimationsPausedBody(JSC::ExecState* state, typename IDLOperation<JSSVGSVGElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
715{
716 UNUSED_PARAM(state);
717 UNUSED_PARAM(throwScope);
718 auto& impl = castedThis->wrapped();
719 return JSValue::encode(toJS<IDLBoolean>(impl.animationsPaused()));
720}
721
722EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionAnimationsPaused(ExecState* state)
723{
724 return IDLOperation<JSSVGSVGElement>::call<jsSVGSVGElementPrototypeFunctionAnimationsPausedBody>(*state, "animationsPaused");
725}
726
727static inline JSC::EncodedJSValue jsSVGSVGElementPrototypeFunctionGetCurrentTimeBody(JSC::ExecState* state, typename IDLOperation<JSSVGSVGElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
728{
729 UNUSED_PARAM(state);
730 UNUSED_PARAM(throwScope);
731 auto& impl = castedThis->wrapped();
732 return JSValue::encode(toJS<IDLUnrestrictedFloat>(impl.getCurrentTime()));
733}
734
735EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionGetCurrentTime(ExecState* state)
736{
737 return IDLOperation<JSSVGSVGElement>::call<jsSVGSVGElementPrototypeFunctionGetCurrentTimeBody>(*state, "getCurrentTime");
738}
739
740static inline JSC::EncodedJSValue jsSVGSVGElementPrototypeFunctionSetCurrentTimeBody(JSC::ExecState* state, typename IDLOperation<JSSVGSVGElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
741{
742 UNUSED_PARAM(state);
743 UNUSED_PARAM(throwScope);
744 auto& impl = castedThis->wrapped();
745 auto seconds = convert<IDLUnrestrictedFloat>(*state, state->argument(0));
746 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
747 impl.setCurrentTime(WTFMove(seconds));
748 return JSValue::encode(jsUndefined());
749}
750
751EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionSetCurrentTime(ExecState* state)
752{
753 return IDLOperation<JSSVGSVGElement>::call<jsSVGSVGElementPrototypeFunctionSetCurrentTimeBody>(*state, "setCurrentTime");
754}
755
756static inline JSC::EncodedJSValue jsSVGSVGElementPrototypeFunctionGetIntersectionListBody(JSC::ExecState* state, typename IDLOperation<JSSVGSVGElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
757{
758 UNUSED_PARAM(state);
759 UNUSED_PARAM(throwScope);
760 auto& impl = castedThis->wrapped();
761 if (UNLIKELY(state->argumentCount() < 1))
762 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
763 auto rect = convert<IDLInterface<SVGRect>>(*state, state->uncheckedArgument(0), [](JSC::ExecState& state, JSC::ThrowScope& scope) { throwArgumentTypeError(state, scope, 0, "rect", "SVGSVGElement", "getIntersectionList", "SVGRect"); });
764 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
765 auto referenceElement = convert<IDLNullable<IDLInterface<SVGElement>>>(*state, state->argument(1), [](JSC::ExecState& state, JSC::ThrowScope& scope) { throwArgumentTypeError(state, scope, 1, "referenceElement", "SVGSVGElement", "getIntersectionList", "SVGElement"); });
766 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
767 return JSValue::encode(toJS<IDLInterface<NodeList>>(*state, *castedThis->globalObject(), impl.getIntersectionList(*rect, WTFMove(referenceElement))));
768}
769
770EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionGetIntersectionList(ExecState* state)
771{
772 return IDLOperation<JSSVGSVGElement>::call<jsSVGSVGElementPrototypeFunctionGetIntersectionListBody>(*state, "getIntersectionList");
773}
774
775static inline JSC::EncodedJSValue jsSVGSVGElementPrototypeFunctionGetEnclosureListBody(JSC::ExecState* state, typename IDLOperation<JSSVGSVGElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
776{
777 UNUSED_PARAM(state);
778 UNUSED_PARAM(throwScope);
779 auto& impl = castedThis->wrapped();
780 if (UNLIKELY(state->argumentCount() < 1))
781 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
782 auto rect = convert<IDLInterface<SVGRect>>(*state, state->uncheckedArgument(0), [](JSC::ExecState& state, JSC::ThrowScope& scope) { throwArgumentTypeError(state, scope, 0, "rect", "SVGSVGElement", "getEnclosureList", "SVGRect"); });
783 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
784 auto referenceElement = convert<IDLNullable<IDLInterface<SVGElement>>>(*state, state->argument(1), [](JSC::ExecState& state, JSC::ThrowScope& scope) { throwArgumentTypeError(state, scope, 1, "referenceElement", "SVGSVGElement", "getEnclosureList", "SVGElement"); });
785 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
786 return JSValue::encode(toJS<IDLInterface<NodeList>>(*state, *castedThis->globalObject(), impl.getEnclosureList(*rect, WTFMove(referenceElement))));
787}
788
789EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionGetEnclosureList(ExecState* state)
790{
791 return IDLOperation<JSSVGSVGElement>::call<jsSVGSVGElementPrototypeFunctionGetEnclosureListBody>(*state, "getEnclosureList");
792}
793
794static inline JSC::EncodedJSValue jsSVGSVGElementPrototypeFunctionCheckIntersectionBody(JSC::ExecState* state, typename IDLOperation<JSSVGSVGElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
795{
796 UNUSED_PARAM(state);
797 UNUSED_PARAM(throwScope);
798 auto& impl = castedThis->wrapped();
799 if (UNLIKELY(state->argumentCount() < 2))
800 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
801 auto element = convert<IDLNullable<IDLInterface<SVGElement>>>(*state, state->uncheckedArgument(0), [](JSC::ExecState& state, JSC::ThrowScope& scope) { throwArgumentTypeError(state, scope, 0, "element", "SVGSVGElement", "checkIntersection", "SVGElement"); });
802 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
803 auto rect = convert<IDLInterface<SVGRect>>(*state, state->uncheckedArgument(1), [](JSC::ExecState& state, JSC::ThrowScope& scope) { throwArgumentTypeError(state, scope, 1, "rect", "SVGSVGElement", "checkIntersection", "SVGRect"); });
804 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
805 return JSValue::encode(toJS<IDLBoolean>(impl.checkIntersection(WTFMove(element), *rect)));
806}
807
808EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCheckIntersection(ExecState* state)
809{
810 return IDLOperation<JSSVGSVGElement>::call<jsSVGSVGElementPrototypeFunctionCheckIntersectionBody>(*state, "checkIntersection");
811}
812
813static inline JSC::EncodedJSValue jsSVGSVGElementPrototypeFunctionCheckEnclosureBody(JSC::ExecState* state, typename IDLOperation<JSSVGSVGElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
814{
815 UNUSED_PARAM(state);
816 UNUSED_PARAM(throwScope);
817 auto& impl = castedThis->wrapped();
818 if (UNLIKELY(state->argumentCount() < 2))
819 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
820 auto element = convert<IDLNullable<IDLInterface<SVGElement>>>(*state, state->uncheckedArgument(0), [](JSC::ExecState& state, JSC::ThrowScope& scope) { throwArgumentTypeError(state, scope, 0, "element", "SVGSVGElement", "checkEnclosure", "SVGElement"); });
821 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
822 auto rect = convert<IDLInterface<SVGRect>>(*state, state->uncheckedArgument(1), [](JSC::ExecState& state, JSC::ThrowScope& scope) { throwArgumentTypeError(state, scope, 1, "rect", "SVGSVGElement", "checkEnclosure", "SVGRect"); });
823 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
824 return JSValue::encode(toJS<IDLBoolean>(impl.checkEnclosure(WTFMove(element), *rect)));
825}
826
827EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCheckEnclosure(ExecState* state)
828{
829 return IDLOperation<JSSVGSVGElement>::call<jsSVGSVGElementPrototypeFunctionCheckEnclosureBody>(*state, "checkEnclosure");
830}
831
832static inline JSC::EncodedJSValue jsSVGSVGElementPrototypeFunctionDeselectAllBody(JSC::ExecState* state, typename IDLOperation<JSSVGSVGElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
833{
834 UNUSED_PARAM(state);
835 UNUSED_PARAM(throwScope);
836 auto& impl = castedThis->wrapped();
837 impl.deselectAll();
838 return JSValue::encode(jsUndefined());
839}
840
841EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionDeselectAll(ExecState* state)
842{
843 return IDLOperation<JSSVGSVGElement>::call<jsSVGSVGElementPrototypeFunctionDeselectAllBody>(*state, "deselectAll");
844}
845
846static inline JSC::EncodedJSValue jsSVGSVGElementPrototypeFunctionCreateSVGNumberBody(JSC::ExecState* state, typename IDLOperation<JSSVGSVGElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
847{
848 UNUSED_PARAM(state);
849 UNUSED_PARAM(throwScope);
850 auto& impl = castedThis->wrapped();
851 return JSValue::encode(toJSNewlyCreated<IDLInterface<SVGNumber>>(*state, *castedThis->globalObject(), impl.createSVGNumber()));
852}
853
854EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGNumber(ExecState* state)
855{
856 return IDLOperation<JSSVGSVGElement>::call<jsSVGSVGElementPrototypeFunctionCreateSVGNumberBody>(*state, "createSVGNumber");
857}
858
859static inline JSC::EncodedJSValue jsSVGSVGElementPrototypeFunctionCreateSVGLengthBody(JSC::ExecState* state, typename IDLOperation<JSSVGSVGElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
860{
861 UNUSED_PARAM(state);
862 UNUSED_PARAM(throwScope);
863 auto& impl = castedThis->wrapped();
864 return JSValue::encode(toJSNewlyCreated<IDLInterface<SVGLength>>(*state, *castedThis->globalObject(), impl.createSVGLength()));
865}
866
867EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGLength(ExecState* state)
868{
869 return IDLOperation<JSSVGSVGElement>::call<jsSVGSVGElementPrototypeFunctionCreateSVGLengthBody>(*state, "createSVGLength");
870}
871
872static inline JSC::EncodedJSValue jsSVGSVGElementPrototypeFunctionCreateSVGAngleBody(JSC::ExecState* state, typename IDLOperation<JSSVGSVGElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
873{
874 UNUSED_PARAM(state);
875 UNUSED_PARAM(throwScope);
876 auto& impl = castedThis->wrapped();
877 return JSValue::encode(toJSNewlyCreated<IDLInterface<SVGAngle>>(*state, *castedThis->globalObject(), impl.createSVGAngle()));
878}
879
880EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGAngle(ExecState* state)
881{
882 return IDLOperation<JSSVGSVGElement>::call<jsSVGSVGElementPrototypeFunctionCreateSVGAngleBody>(*state, "createSVGAngle");
883}
884
885static inline JSC::EncodedJSValue jsSVGSVGElementPrototypeFunctionCreateSVGPointBody(JSC::ExecState* state, typename IDLOperation<JSSVGSVGElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
886{
887 UNUSED_PARAM(state);
888 UNUSED_PARAM(throwScope);
889 auto& impl = castedThis->wrapped();
890 return JSValue::encode(toJSNewlyCreated<IDLInterface<SVGPoint>>(*state, *castedThis->globalObject(), impl.createSVGPoint()));
891}
892
893EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGPoint(ExecState* state)
894{
895 return IDLOperation<JSSVGSVGElement>::call<jsSVGSVGElementPrototypeFunctionCreateSVGPointBody>(*state, "createSVGPoint");
896}
897
898static inline JSC::EncodedJSValue jsSVGSVGElementPrototypeFunctionCreateSVGMatrixBody(JSC::ExecState* state, typename IDLOperation<JSSVGSVGElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
899{
900 UNUSED_PARAM(state);
901 UNUSED_PARAM(throwScope);
902 auto& impl = castedThis->wrapped();
903 return JSValue::encode(toJSNewlyCreated<IDLInterface<SVGMatrix>>(*state, *castedThis->globalObject(), impl.createSVGMatrix()));
904}
905
906EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGMatrix(ExecState* state)
907{
908 return IDLOperation<JSSVGSVGElement>::call<jsSVGSVGElementPrototypeFunctionCreateSVGMatrixBody>(*state, "createSVGMatrix");
909}
910
911static inline JSC::EncodedJSValue jsSVGSVGElementPrototypeFunctionCreateSVGRectBody(JSC::ExecState* state, typename IDLOperation<JSSVGSVGElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
912{
913 UNUSED_PARAM(state);
914 UNUSED_PARAM(throwScope);
915 auto& impl = castedThis->wrapped();
916 return JSValue::encode(toJSNewlyCreated<IDLInterface<SVGRect>>(*state, *castedThis->globalObject(), impl.createSVGRect()));
917}
918
919EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGRect(ExecState* state)
920{
921 return IDLOperation<JSSVGSVGElement>::call<jsSVGSVGElementPrototypeFunctionCreateSVGRectBody>(*state, "createSVGRect");
922}
923
924static inline JSC::EncodedJSValue jsSVGSVGElementPrototypeFunctionCreateSVGTransformBody(JSC::ExecState* state, typename IDLOperation<JSSVGSVGElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
925{
926 UNUSED_PARAM(state);
927 UNUSED_PARAM(throwScope);
928 auto& impl = castedThis->wrapped();
929 return JSValue::encode(toJSNewlyCreated<IDLInterface<SVGTransform>>(*state, *castedThis->globalObject(), impl.createSVGTransform()));
930}
931
932EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGTransform(ExecState* state)
933{
934 return IDLOperation<JSSVGSVGElement>::call<jsSVGSVGElementPrototypeFunctionCreateSVGTransformBody>(*state, "createSVGTransform");
935}
936
937static inline JSC::EncodedJSValue jsSVGSVGElementPrototypeFunctionCreateSVGTransformFromMatrixBody(JSC::ExecState* state, typename IDLOperation<JSSVGSVGElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
938{
939 UNUSED_PARAM(state);
940 UNUSED_PARAM(throwScope);
941 auto& impl = castedThis->wrapped();
942 if (UNLIKELY(state->argumentCount() < 1))
943 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
944 auto matrix = convert<IDLInterface<SVGMatrix>>(*state, state->uncheckedArgument(0), [](JSC::ExecState& state, JSC::ThrowScope& scope) { throwArgumentTypeError(state, scope, 0, "matrix", "SVGSVGElement", "createSVGTransformFromMatrix", "SVGMatrix"); });
945 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
946 return JSValue::encode(toJSNewlyCreated<IDLInterface<SVGTransform>>(*state, *castedThis->globalObject(), impl.createSVGTransformFromMatrix(*matrix)));
947}
948
949EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGTransformFromMatrix(ExecState* state)
950{
951 return IDLOperation<JSSVGSVGElement>::call<jsSVGSVGElementPrototypeFunctionCreateSVGTransformFromMatrixBody>(*state, "createSVGTransformFromMatrix");
952}
953
954static inline JSC::EncodedJSValue jsSVGSVGElementPrototypeFunctionGetElementByIdBody(JSC::ExecState* state, typename IDLOperation<JSSVGSVGElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
955{
956 UNUSED_PARAM(state);
957 UNUSED_PARAM(throwScope);
958 auto& impl = castedThis->wrapped();
959 if (UNLIKELY(state->argumentCount() < 1))
960 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
961 auto elementId = convert<IDLRequiresExistingAtomicStringAdaptor<IDLDOMString>>(*state, state->uncheckedArgument(0));
962 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
963 return JSValue::encode(toJS<IDLInterface<Element>>(*state, *castedThis->globalObject(), impl.getElementById(WTFMove(elementId))));
964}
965
966EncodedJSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionGetElementById(ExecState* state)
967{
968 return IDLOperation<JSSVGSVGElement>::call<jsSVGSVGElementPrototypeFunctionGetElementByIdBody>(*state, "getElementById");
969}
970
971void JSSVGSVGElement::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder)
972{
973 auto* thisObject = jsCast<JSSVGSVGElement*>(cell);
974 builder.setWrappedObjectForCell(cell, &thisObject->wrapped());
975 if (thisObject->scriptExecutionContext())
976 builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string());
977 Base::heapSnapshot(cell, builder);
978}
979
980SVGSVGElement* JSSVGSVGElement::toWrapped(JSC::VM& vm, JSC::JSValue value)
981{
982 if (auto* wrapper = jsDynamicCast<JSSVGSVGElement*>(vm, value))
983 return &wrapper->wrapped();
984 return nullptr;
985}
986
987}
988