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 "JSSVGPathSegCurvetoQuadraticAbs.h"
23
24#include "JSDOMAttribute.h"
25#include "JSDOMBinding.h"
26#include "JSDOMConstructorNotConstructable.h"
27#include "JSDOMConvertNumbers.h"
28#include "JSDOMExceptionHandling.h"
29#include "JSDOMWrapperCache.h"
30#include "ScriptExecutionContext.h"
31#include <JavaScriptCore/HeapSnapshotBuilder.h>
32#include <JavaScriptCore/JSCInlines.h>
33#include <wtf/GetPtr.h>
34#include <wtf/PointerPreparations.h>
35#include <wtf/URL.h>
36
37
38namespace WebCore {
39using namespace JSC;
40
41// Attributes
42
43JSC::EncodedJSValue jsSVGPathSegCurvetoQuadraticAbsConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
44bool setJSSVGPathSegCurvetoQuadraticAbsConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
45JSC::EncodedJSValue jsSVGPathSegCurvetoQuadraticAbsX(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
46bool setJSSVGPathSegCurvetoQuadraticAbsX(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
47JSC::EncodedJSValue jsSVGPathSegCurvetoQuadraticAbsY(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
48bool setJSSVGPathSegCurvetoQuadraticAbsY(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
49JSC::EncodedJSValue jsSVGPathSegCurvetoQuadraticAbsX1(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
50bool setJSSVGPathSegCurvetoQuadraticAbsX1(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
51JSC::EncodedJSValue jsSVGPathSegCurvetoQuadraticAbsY1(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
52bool setJSSVGPathSegCurvetoQuadraticAbsY1(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
53
54class JSSVGPathSegCurvetoQuadraticAbsPrototype : public JSC::JSNonFinalObject {
55public:
56 using Base = JSC::JSNonFinalObject;
57 static JSSVGPathSegCurvetoQuadraticAbsPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
58 {
59 JSSVGPathSegCurvetoQuadraticAbsPrototype* ptr = new (NotNull, JSC::allocateCell<JSSVGPathSegCurvetoQuadraticAbsPrototype>(vm.heap)) JSSVGPathSegCurvetoQuadraticAbsPrototype(vm, globalObject, structure);
60 ptr->finishCreation(vm);
61 return ptr;
62 }
63
64 DECLARE_INFO;
65 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
66 {
67 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
68 }
69
70private:
71 JSSVGPathSegCurvetoQuadraticAbsPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
72 : JSC::JSNonFinalObject(vm, structure)
73 {
74 }
75
76 void finishCreation(JSC::VM&);
77};
78
79using JSSVGPathSegCurvetoQuadraticAbsConstructor = JSDOMConstructorNotConstructable<JSSVGPathSegCurvetoQuadraticAbs>;
80
81template<> JSValue JSSVGPathSegCurvetoQuadraticAbsConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
82{
83 return JSSVGPathSeg::getConstructor(vm, &globalObject);
84}
85
86template<> void JSSVGPathSegCurvetoQuadraticAbsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
87{
88 putDirect(vm, vm.propertyNames->prototype, JSSVGPathSegCurvetoQuadraticAbs::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
89 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("SVGPathSegCurvetoQuadraticAbs"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
90 putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
91}
92
93template<> const ClassInfo JSSVGPathSegCurvetoQuadraticAbsConstructor::s_info = { "SVGPathSegCurvetoQuadraticAbs", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGPathSegCurvetoQuadraticAbsConstructor) };
94
95/* Hash table for prototype */
96
97static const HashTableValue JSSVGPathSegCurvetoQuadraticAbsPrototypeTableValues[] =
98{
99 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoQuadraticAbsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoQuadraticAbsConstructor) } },
100 { "x", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoQuadraticAbsX), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoQuadraticAbsX) } },
101 { "y", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoQuadraticAbsY), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoQuadraticAbsY) } },
102 { "x1", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoQuadraticAbsX1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoQuadraticAbsX1) } },
103 { "y1", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoQuadraticAbsY1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoQuadraticAbsY1) } },
104};
105
106const ClassInfo JSSVGPathSegCurvetoQuadraticAbsPrototype::s_info = { "SVGPathSegCurvetoQuadraticAbsPrototype", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGPathSegCurvetoQuadraticAbsPrototype) };
107
108void JSSVGPathSegCurvetoQuadraticAbsPrototype::finishCreation(VM& vm)
109{
110 Base::finishCreation(vm);
111 reifyStaticProperties(vm, JSSVGPathSegCurvetoQuadraticAbs::info(), JSSVGPathSegCurvetoQuadraticAbsPrototypeTableValues, *this);
112}
113
114const ClassInfo JSSVGPathSegCurvetoQuadraticAbs::s_info = { "SVGPathSegCurvetoQuadraticAbs", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGPathSegCurvetoQuadraticAbs) };
115
116JSSVGPathSegCurvetoQuadraticAbs::JSSVGPathSegCurvetoQuadraticAbs(Structure* structure, JSDOMGlobalObject& globalObject, Ref<SVGPathSegCurvetoQuadraticAbs>&& impl)
117 : JSSVGPathSeg(structure, globalObject, WTFMove(impl))
118{
119}
120
121void JSSVGPathSegCurvetoQuadraticAbs::finishCreation(VM& vm)
122{
123 Base::finishCreation(vm);
124 ASSERT(inherits(vm, info()));
125
126}
127
128JSObject* JSSVGPathSegCurvetoQuadraticAbs::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
129{
130 return JSSVGPathSegCurvetoQuadraticAbsPrototype::create(vm, &globalObject, JSSVGPathSegCurvetoQuadraticAbsPrototype::createStructure(vm, &globalObject, JSSVGPathSeg::prototype(vm, globalObject)));
131}
132
133JSObject* JSSVGPathSegCurvetoQuadraticAbs::prototype(VM& vm, JSDOMGlobalObject& globalObject)
134{
135 return getDOMPrototype<JSSVGPathSegCurvetoQuadraticAbs>(vm, globalObject);
136}
137
138JSValue JSSVGPathSegCurvetoQuadraticAbs::getConstructor(VM& vm, const JSGlobalObject* globalObject)
139{
140 return getDOMConstructor<JSSVGPathSegCurvetoQuadraticAbsConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
141}
142
143template<> inline JSSVGPathSegCurvetoQuadraticAbs* IDLAttribute<JSSVGPathSegCurvetoQuadraticAbs>::cast(ExecState& state, EncodedJSValue thisValue)
144{
145 return jsDynamicCast<JSSVGPathSegCurvetoQuadraticAbs*>(state.vm(), JSValue::decode(thisValue));
146}
147
148EncodedJSValue jsSVGPathSegCurvetoQuadraticAbsConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
149{
150 VM& vm = state->vm();
151 auto throwScope = DECLARE_THROW_SCOPE(vm);
152 auto* prototype = jsDynamicCast<JSSVGPathSegCurvetoQuadraticAbsPrototype*>(vm, JSValue::decode(thisValue));
153 if (UNLIKELY(!prototype))
154 return throwVMTypeError(state, throwScope);
155 return JSValue::encode(JSSVGPathSegCurvetoQuadraticAbs::getConstructor(state->vm(), prototype->globalObject()));
156}
157
158bool setJSSVGPathSegCurvetoQuadraticAbsConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
159{
160 VM& vm = state->vm();
161 auto throwScope = DECLARE_THROW_SCOPE(vm);
162 auto* prototype = jsDynamicCast<JSSVGPathSegCurvetoQuadraticAbsPrototype*>(vm, JSValue::decode(thisValue));
163 if (UNLIKELY(!prototype)) {
164 throwVMTypeError(state, throwScope);
165 return false;
166 }
167 // Shadowing a built-in constructor
168 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));
169}
170
171static inline JSValue jsSVGPathSegCurvetoQuadraticAbsXGetter(ExecState& state, JSSVGPathSegCurvetoQuadraticAbs& thisObject, ThrowScope& throwScope)
172{
173 UNUSED_PARAM(throwScope);
174 UNUSED_PARAM(state);
175 auto& impl = thisObject.wrapped();
176 JSValue result = toJS<IDLUnrestrictedFloat>(state, throwScope, impl.x());
177 return result;
178}
179
180EncodedJSValue jsSVGPathSegCurvetoQuadraticAbsX(ExecState* state, EncodedJSValue thisValue, PropertyName)
181{
182 return IDLAttribute<JSSVGPathSegCurvetoQuadraticAbs>::get<jsSVGPathSegCurvetoQuadraticAbsXGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "x");
183}
184
185static inline bool setJSSVGPathSegCurvetoQuadraticAbsXSetter(ExecState& state, JSSVGPathSegCurvetoQuadraticAbs& thisObject, JSValue value, ThrowScope& throwScope)
186{
187 UNUSED_PARAM(throwScope);
188 auto& impl = thisObject.wrapped();
189 auto nativeValue = convert<IDLUnrestrictedFloat>(state, value);
190 RETURN_IF_EXCEPTION(throwScope, false);
191 AttributeSetter::call(state, throwScope, [&] {
192 return impl.setX(WTFMove(nativeValue));
193 });
194 return true;
195}
196
197bool setJSSVGPathSegCurvetoQuadraticAbsX(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
198{
199 return IDLAttribute<JSSVGPathSegCurvetoQuadraticAbs>::set<setJSSVGPathSegCurvetoQuadraticAbsXSetter>(*state, thisValue, encodedValue, "x");
200}
201
202static inline JSValue jsSVGPathSegCurvetoQuadraticAbsYGetter(ExecState& state, JSSVGPathSegCurvetoQuadraticAbs& thisObject, ThrowScope& throwScope)
203{
204 UNUSED_PARAM(throwScope);
205 UNUSED_PARAM(state);
206 auto& impl = thisObject.wrapped();
207 JSValue result = toJS<IDLUnrestrictedFloat>(state, throwScope, impl.y());
208 return result;
209}
210
211EncodedJSValue jsSVGPathSegCurvetoQuadraticAbsY(ExecState* state, EncodedJSValue thisValue, PropertyName)
212{
213 return IDLAttribute<JSSVGPathSegCurvetoQuadraticAbs>::get<jsSVGPathSegCurvetoQuadraticAbsYGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "y");
214}
215
216static inline bool setJSSVGPathSegCurvetoQuadraticAbsYSetter(ExecState& state, JSSVGPathSegCurvetoQuadraticAbs& thisObject, JSValue value, ThrowScope& throwScope)
217{
218 UNUSED_PARAM(throwScope);
219 auto& impl = thisObject.wrapped();
220 auto nativeValue = convert<IDLUnrestrictedFloat>(state, value);
221 RETURN_IF_EXCEPTION(throwScope, false);
222 AttributeSetter::call(state, throwScope, [&] {
223 return impl.setY(WTFMove(nativeValue));
224 });
225 return true;
226}
227
228bool setJSSVGPathSegCurvetoQuadraticAbsY(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
229{
230 return IDLAttribute<JSSVGPathSegCurvetoQuadraticAbs>::set<setJSSVGPathSegCurvetoQuadraticAbsYSetter>(*state, thisValue, encodedValue, "y");
231}
232
233static inline JSValue jsSVGPathSegCurvetoQuadraticAbsX1Getter(ExecState& state, JSSVGPathSegCurvetoQuadraticAbs& thisObject, ThrowScope& throwScope)
234{
235 UNUSED_PARAM(throwScope);
236 UNUSED_PARAM(state);
237 auto& impl = thisObject.wrapped();
238 JSValue result = toJS<IDLUnrestrictedFloat>(state, throwScope, impl.x1());
239 return result;
240}
241
242EncodedJSValue jsSVGPathSegCurvetoQuadraticAbsX1(ExecState* state, EncodedJSValue thisValue, PropertyName)
243{
244 return IDLAttribute<JSSVGPathSegCurvetoQuadraticAbs>::get<jsSVGPathSegCurvetoQuadraticAbsX1Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "x1");
245}
246
247static inline bool setJSSVGPathSegCurvetoQuadraticAbsX1Setter(ExecState& state, JSSVGPathSegCurvetoQuadraticAbs& thisObject, JSValue value, ThrowScope& throwScope)
248{
249 UNUSED_PARAM(throwScope);
250 auto& impl = thisObject.wrapped();
251 auto nativeValue = convert<IDLUnrestrictedFloat>(state, value);
252 RETURN_IF_EXCEPTION(throwScope, false);
253 AttributeSetter::call(state, throwScope, [&] {
254 return impl.setX1(WTFMove(nativeValue));
255 });
256 return true;
257}
258
259bool setJSSVGPathSegCurvetoQuadraticAbsX1(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
260{
261 return IDLAttribute<JSSVGPathSegCurvetoQuadraticAbs>::set<setJSSVGPathSegCurvetoQuadraticAbsX1Setter>(*state, thisValue, encodedValue, "x1");
262}
263
264static inline JSValue jsSVGPathSegCurvetoQuadraticAbsY1Getter(ExecState& state, JSSVGPathSegCurvetoQuadraticAbs& thisObject, ThrowScope& throwScope)
265{
266 UNUSED_PARAM(throwScope);
267 UNUSED_PARAM(state);
268 auto& impl = thisObject.wrapped();
269 JSValue result = toJS<IDLUnrestrictedFloat>(state, throwScope, impl.y1());
270 return result;
271}
272
273EncodedJSValue jsSVGPathSegCurvetoQuadraticAbsY1(ExecState* state, EncodedJSValue thisValue, PropertyName)
274{
275 return IDLAttribute<JSSVGPathSegCurvetoQuadraticAbs>::get<jsSVGPathSegCurvetoQuadraticAbsY1Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "y1");
276}
277
278static inline bool setJSSVGPathSegCurvetoQuadraticAbsY1Setter(ExecState& state, JSSVGPathSegCurvetoQuadraticAbs& thisObject, JSValue value, ThrowScope& throwScope)
279{
280 UNUSED_PARAM(throwScope);
281 auto& impl = thisObject.wrapped();
282 auto nativeValue = convert<IDLUnrestrictedFloat>(state, value);
283 RETURN_IF_EXCEPTION(throwScope, false);
284 AttributeSetter::call(state, throwScope, [&] {
285 return impl.setY1(WTFMove(nativeValue));
286 });
287 return true;
288}
289
290bool setJSSVGPathSegCurvetoQuadraticAbsY1(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
291{
292 return IDLAttribute<JSSVGPathSegCurvetoQuadraticAbs>::set<setJSSVGPathSegCurvetoQuadraticAbsY1Setter>(*state, thisValue, encodedValue, "y1");
293}
294
295void JSSVGPathSegCurvetoQuadraticAbs::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder)
296{
297 auto* thisObject = jsCast<JSSVGPathSegCurvetoQuadraticAbs*>(cell);
298 builder.setWrappedObjectForCell(cell, &thisObject->wrapped());
299 if (thisObject->scriptExecutionContext())
300 builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string());
301 Base::heapSnapshot(cell, builder);
302}
303
304
305}
306