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 "JSSVGPathSeg.h"
23
24#include "JSDOMAttribute.h"
25#include "JSDOMBinding.h"
26#include "JSDOMConstructorNotConstructable.h"
27#include "JSDOMConvertNumbers.h"
28#include "JSDOMConvertStrings.h"
29#include "JSDOMExceptionHandling.h"
30#include "JSDOMWrapperCache.h"
31#include "ScriptExecutionContext.h"
32#include <JavaScriptCore/FunctionPrototype.h>
33#include <JavaScriptCore/HeapSnapshotBuilder.h>
34#include <JavaScriptCore/JSCInlines.h>
35#include <wtf/GetPtr.h>
36#include <wtf/PointerPreparations.h>
37#include <wtf/URL.h>
38
39
40namespace WebCore {
41using namespace JSC;
42
43// Attributes
44
45JSC::EncodedJSValue jsSVGPathSegConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
46bool setJSSVGPathSegConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
47JSC::EncodedJSValue jsSVGPathSegPathSegType(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
48JSC::EncodedJSValue jsSVGPathSegPathSegTypeAsLetter(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
49
50class JSSVGPathSegPrototype : public JSC::JSNonFinalObject {
51public:
52 using Base = JSC::JSNonFinalObject;
53 static JSSVGPathSegPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
54 {
55 JSSVGPathSegPrototype* ptr = new (NotNull, JSC::allocateCell<JSSVGPathSegPrototype>(vm.heap)) JSSVGPathSegPrototype(vm, globalObject, structure);
56 ptr->finishCreation(vm);
57 return ptr;
58 }
59
60 DECLARE_INFO;
61 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
62 {
63 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
64 }
65
66private:
67 JSSVGPathSegPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
68 : JSC::JSNonFinalObject(vm, structure)
69 {
70 }
71
72 void finishCreation(JSC::VM&);
73};
74
75using JSSVGPathSegConstructor = JSDOMConstructorNotConstructable<JSSVGPathSeg>;
76
77/* Hash table for constructor */
78
79static const HashTableValue JSSVGPathSegConstructorTableValues[] =
80{
81 { "PATHSEG_UNKNOWN", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(0) } },
82 { "PATHSEG_CLOSEPATH", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(1) } },
83 { "PATHSEG_MOVETO_ABS", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(2) } },
84 { "PATHSEG_MOVETO_REL", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(3) } },
85 { "PATHSEG_LINETO_ABS", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(4) } },
86 { "PATHSEG_LINETO_REL", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(5) } },
87 { "PATHSEG_CURVETO_CUBIC_ABS", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(6) } },
88 { "PATHSEG_CURVETO_CUBIC_REL", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(7) } },
89 { "PATHSEG_CURVETO_QUADRATIC_ABS", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(8) } },
90 { "PATHSEG_CURVETO_QUADRATIC_REL", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(9) } },
91 { "PATHSEG_ARC_ABS", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(10) } },
92 { "PATHSEG_ARC_REL", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(11) } },
93 { "PATHSEG_LINETO_HORIZONTAL_ABS", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(12) } },
94 { "PATHSEG_LINETO_HORIZONTAL_REL", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(13) } },
95 { "PATHSEG_LINETO_VERTICAL_ABS", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(14) } },
96 { "PATHSEG_LINETO_VERTICAL_REL", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(15) } },
97 { "PATHSEG_CURVETO_CUBIC_SMOOTH_ABS", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(16) } },
98 { "PATHSEG_CURVETO_CUBIC_SMOOTH_REL", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(17) } },
99 { "PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(18) } },
100 { "PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(19) } },
101};
102
103static_assert(SVGPathSeg::PATHSEG_UNKNOWN == 0, "PATHSEG_UNKNOWN in SVGPathSeg does not match value from IDL");
104static_assert(SVGPathSeg::PATHSEG_CLOSEPATH == 1, "PATHSEG_CLOSEPATH in SVGPathSeg does not match value from IDL");
105static_assert(SVGPathSeg::PATHSEG_MOVETO_ABS == 2, "PATHSEG_MOVETO_ABS in SVGPathSeg does not match value from IDL");
106static_assert(SVGPathSeg::PATHSEG_MOVETO_REL == 3, "PATHSEG_MOVETO_REL in SVGPathSeg does not match value from IDL");
107static_assert(SVGPathSeg::PATHSEG_LINETO_ABS == 4, "PATHSEG_LINETO_ABS in SVGPathSeg does not match value from IDL");
108static_assert(SVGPathSeg::PATHSEG_LINETO_REL == 5, "PATHSEG_LINETO_REL in SVGPathSeg does not match value from IDL");
109static_assert(SVGPathSeg::PATHSEG_CURVETO_CUBIC_ABS == 6, "PATHSEG_CURVETO_CUBIC_ABS in SVGPathSeg does not match value from IDL");
110static_assert(SVGPathSeg::PATHSEG_CURVETO_CUBIC_REL == 7, "PATHSEG_CURVETO_CUBIC_REL in SVGPathSeg does not match value from IDL");
111static_assert(SVGPathSeg::PATHSEG_CURVETO_QUADRATIC_ABS == 8, "PATHSEG_CURVETO_QUADRATIC_ABS in SVGPathSeg does not match value from IDL");
112static_assert(SVGPathSeg::PATHSEG_CURVETO_QUADRATIC_REL == 9, "PATHSEG_CURVETO_QUADRATIC_REL in SVGPathSeg does not match value from IDL");
113static_assert(SVGPathSeg::PATHSEG_ARC_ABS == 10, "PATHSEG_ARC_ABS in SVGPathSeg does not match value from IDL");
114static_assert(SVGPathSeg::PATHSEG_ARC_REL == 11, "PATHSEG_ARC_REL in SVGPathSeg does not match value from IDL");
115static_assert(SVGPathSeg::PATHSEG_LINETO_HORIZONTAL_ABS == 12, "PATHSEG_LINETO_HORIZONTAL_ABS in SVGPathSeg does not match value from IDL");
116static_assert(SVGPathSeg::PATHSEG_LINETO_HORIZONTAL_REL == 13, "PATHSEG_LINETO_HORIZONTAL_REL in SVGPathSeg does not match value from IDL");
117static_assert(SVGPathSeg::PATHSEG_LINETO_VERTICAL_ABS == 14, "PATHSEG_LINETO_VERTICAL_ABS in SVGPathSeg does not match value from IDL");
118static_assert(SVGPathSeg::PATHSEG_LINETO_VERTICAL_REL == 15, "PATHSEG_LINETO_VERTICAL_REL in SVGPathSeg does not match value from IDL");
119static_assert(SVGPathSeg::PATHSEG_CURVETO_CUBIC_SMOOTH_ABS == 16, "PATHSEG_CURVETO_CUBIC_SMOOTH_ABS in SVGPathSeg does not match value from IDL");
120static_assert(SVGPathSeg::PATHSEG_CURVETO_CUBIC_SMOOTH_REL == 17, "PATHSEG_CURVETO_CUBIC_SMOOTH_REL in SVGPathSeg does not match value from IDL");
121static_assert(SVGPathSeg::PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS == 18, "PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS in SVGPathSeg does not match value from IDL");
122static_assert(SVGPathSeg::PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL == 19, "PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL in SVGPathSeg does not match value from IDL");
123
124template<> JSValue JSSVGPathSegConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
125{
126 UNUSED_PARAM(vm);
127 return globalObject.functionPrototype();
128}
129
130template<> void JSSVGPathSegConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
131{
132 putDirect(vm, vm.propertyNames->prototype, JSSVGPathSeg::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
133 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("SVGPathSeg"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
134 putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
135 reifyStaticProperties(vm, JSSVGPathSeg::info(), JSSVGPathSegConstructorTableValues, *this);
136}
137
138template<> const ClassInfo JSSVGPathSegConstructor::s_info = { "SVGPathSeg", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGPathSegConstructor) };
139
140/* Hash table for prototype */
141
142static const HashTableValue JSSVGPathSegPrototypeTableValues[] =
143{
144 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegConstructor) } },
145 { "pathSegType", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegPathSegType), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
146 { "pathSegTypeAsLetter", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegPathSegTypeAsLetter), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
147 { "PATHSEG_UNKNOWN", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(0) } },
148 { "PATHSEG_CLOSEPATH", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(1) } },
149 { "PATHSEG_MOVETO_ABS", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(2) } },
150 { "PATHSEG_MOVETO_REL", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(3) } },
151 { "PATHSEG_LINETO_ABS", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(4) } },
152 { "PATHSEG_LINETO_REL", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(5) } },
153 { "PATHSEG_CURVETO_CUBIC_ABS", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(6) } },
154 { "PATHSEG_CURVETO_CUBIC_REL", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(7) } },
155 { "PATHSEG_CURVETO_QUADRATIC_ABS", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(8) } },
156 { "PATHSEG_CURVETO_QUADRATIC_REL", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(9) } },
157 { "PATHSEG_ARC_ABS", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(10) } },
158 { "PATHSEG_ARC_REL", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(11) } },
159 { "PATHSEG_LINETO_HORIZONTAL_ABS", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(12) } },
160 { "PATHSEG_LINETO_HORIZONTAL_REL", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(13) } },
161 { "PATHSEG_LINETO_VERTICAL_ABS", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(14) } },
162 { "PATHSEG_LINETO_VERTICAL_REL", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(15) } },
163 { "PATHSEG_CURVETO_CUBIC_SMOOTH_ABS", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(16) } },
164 { "PATHSEG_CURVETO_CUBIC_SMOOTH_REL", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(17) } },
165 { "PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(18) } },
166 { "PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(19) } },
167};
168
169const ClassInfo JSSVGPathSegPrototype::s_info = { "SVGPathSegPrototype", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGPathSegPrototype) };
170
171void JSSVGPathSegPrototype::finishCreation(VM& vm)
172{
173 Base::finishCreation(vm);
174 reifyStaticProperties(vm, JSSVGPathSeg::info(), JSSVGPathSegPrototypeTableValues, *this);
175}
176
177const ClassInfo JSSVGPathSeg::s_info = { "SVGPathSeg", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGPathSeg) };
178
179JSSVGPathSeg::JSSVGPathSeg(Structure* structure, JSDOMGlobalObject& globalObject, Ref<SVGPathSeg>&& impl)
180 : JSDOMWrapper<SVGPathSeg>(structure, globalObject, WTFMove(impl))
181{
182}
183
184void JSSVGPathSeg::finishCreation(VM& vm)
185{
186 Base::finishCreation(vm);
187 ASSERT(inherits(vm, info()));
188
189}
190
191JSObject* JSSVGPathSeg::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
192{
193 return JSSVGPathSegPrototype::create(vm, &globalObject, JSSVGPathSegPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
194}
195
196JSObject* JSSVGPathSeg::prototype(VM& vm, JSDOMGlobalObject& globalObject)
197{
198 return getDOMPrototype<JSSVGPathSeg>(vm, globalObject);
199}
200
201JSValue JSSVGPathSeg::getConstructor(VM& vm, const JSGlobalObject* globalObject)
202{
203 return getDOMConstructor<JSSVGPathSegConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
204}
205
206void JSSVGPathSeg::destroy(JSC::JSCell* cell)
207{
208 JSSVGPathSeg* thisObject = static_cast<JSSVGPathSeg*>(cell);
209 thisObject->JSSVGPathSeg::~JSSVGPathSeg();
210}
211
212template<> inline JSSVGPathSeg* IDLAttribute<JSSVGPathSeg>::cast(ExecState& state, EncodedJSValue thisValue)
213{
214 return jsDynamicCast<JSSVGPathSeg*>(state.vm(), JSValue::decode(thisValue));
215}
216
217EncodedJSValue jsSVGPathSegConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
218{
219 VM& vm = state->vm();
220 auto throwScope = DECLARE_THROW_SCOPE(vm);
221 auto* prototype = jsDynamicCast<JSSVGPathSegPrototype*>(vm, JSValue::decode(thisValue));
222 if (UNLIKELY(!prototype))
223 return throwVMTypeError(state, throwScope);
224 return JSValue::encode(JSSVGPathSeg::getConstructor(state->vm(), prototype->globalObject()));
225}
226
227bool setJSSVGPathSegConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
228{
229 VM& vm = state->vm();
230 auto throwScope = DECLARE_THROW_SCOPE(vm);
231 auto* prototype = jsDynamicCast<JSSVGPathSegPrototype*>(vm, JSValue::decode(thisValue));
232 if (UNLIKELY(!prototype)) {
233 throwVMTypeError(state, throwScope);
234 return false;
235 }
236 // Shadowing a built-in constructor
237 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));
238}
239
240static inline JSValue jsSVGPathSegPathSegTypeGetter(ExecState& state, JSSVGPathSeg& thisObject, ThrowScope& throwScope)
241{
242 UNUSED_PARAM(throwScope);
243 UNUSED_PARAM(state);
244 auto& impl = thisObject.wrapped();
245 JSValue result = toJS<IDLUnsignedShort>(state, throwScope, impl.pathSegType());
246 return result;
247}
248
249EncodedJSValue jsSVGPathSegPathSegType(ExecState* state, EncodedJSValue thisValue, PropertyName)
250{
251 return IDLAttribute<JSSVGPathSeg>::get<jsSVGPathSegPathSegTypeGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "pathSegType");
252}
253
254static inline JSValue jsSVGPathSegPathSegTypeAsLetterGetter(ExecState& state, JSSVGPathSeg& thisObject, ThrowScope& throwScope)
255{
256 UNUSED_PARAM(throwScope);
257 UNUSED_PARAM(state);
258 auto& impl = thisObject.wrapped();
259 JSValue result = toJS<IDLDOMString>(state, throwScope, impl.pathSegTypeAsLetter());
260 return result;
261}
262
263EncodedJSValue jsSVGPathSegPathSegTypeAsLetter(ExecState* state, EncodedJSValue thisValue, PropertyName)
264{
265 return IDLAttribute<JSSVGPathSeg>::get<jsSVGPathSegPathSegTypeAsLetterGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "pathSegTypeAsLetter");
266}
267
268void JSSVGPathSeg::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder)
269{
270 auto* thisObject = jsCast<JSSVGPathSeg*>(cell);
271 builder.setWrappedObjectForCell(cell, &thisObject->wrapped());
272 if (thisObject->scriptExecutionContext())
273 builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string());
274 Base::heapSnapshot(cell, builder);
275}
276
277bool JSSVGPathSegOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor, const char** reason)
278{
279 UNUSED_PARAM(handle);
280 UNUSED_PARAM(visitor);
281 UNUSED_PARAM(reason);
282 return false;
283}
284
285void JSSVGPathSegOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
286{
287 auto* jsSVGPathSeg = static_cast<JSSVGPathSeg*>(handle.slot()->asCell());
288 auto& world = *static_cast<DOMWrapperWorld*>(context);
289 uncacheWrapper(world, &jsSVGPathSeg->wrapped(), jsSVGPathSeg);
290}
291
292SVGPathSeg* JSSVGPathSeg::toWrapped(JSC::VM& vm, JSC::JSValue value)
293{
294 if (auto* wrapper = jsDynamicCast<JSSVGPathSeg*>(vm, value))
295 return &wrapper->wrapped();
296 return nullptr;
297}
298
299}
300