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 "JSSVGPathSegCurvetoQuadraticSmoothAbs.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 | |
38 | namespace WebCore { |
39 | using namespace JSC; |
40 | |
41 | // Attributes |
42 | |
43 | JSC::EncodedJSValue jsSVGPathSegCurvetoQuadraticSmoothAbsConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
44 | bool setJSSVGPathSegCurvetoQuadraticSmoothAbsConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
45 | JSC::EncodedJSValue jsSVGPathSegCurvetoQuadraticSmoothAbsX(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
46 | bool setJSSVGPathSegCurvetoQuadraticSmoothAbsX(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
47 | JSC::EncodedJSValue jsSVGPathSegCurvetoQuadraticSmoothAbsY(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
48 | bool setJSSVGPathSegCurvetoQuadraticSmoothAbsY(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
49 | |
50 | class JSSVGPathSegCurvetoQuadraticSmoothAbsPrototype : public JSC::JSNonFinalObject { |
51 | public: |
52 | using Base = JSC::JSNonFinalObject; |
53 | static JSSVGPathSegCurvetoQuadraticSmoothAbsPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) |
54 | { |
55 | JSSVGPathSegCurvetoQuadraticSmoothAbsPrototype* ptr = new (NotNull, JSC::allocateCell<JSSVGPathSegCurvetoQuadraticSmoothAbsPrototype>(vm.heap)) JSSVGPathSegCurvetoQuadraticSmoothAbsPrototype(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 | |
66 | private: |
67 | JSSVGPathSegCurvetoQuadraticSmoothAbsPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) |
68 | : JSC::JSNonFinalObject(vm, structure) |
69 | { |
70 | } |
71 | |
72 | void finishCreation(JSC::VM&); |
73 | }; |
74 | |
75 | using JSSVGPathSegCurvetoQuadraticSmoothAbsConstructor = JSDOMConstructorNotConstructable<JSSVGPathSegCurvetoQuadraticSmoothAbs>; |
76 | |
77 | template<> JSValue JSSVGPathSegCurvetoQuadraticSmoothAbsConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject) |
78 | { |
79 | return JSSVGPathSeg::getConstructor(vm, &globalObject); |
80 | } |
81 | |
82 | template<> void JSSVGPathSegCurvetoQuadraticSmoothAbsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) |
83 | { |
84 | putDirect(vm, vm.propertyNames->prototype, JSSVGPathSegCurvetoQuadraticSmoothAbs::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
85 | putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("SVGPathSegCurvetoQuadraticSmoothAbs"_s )), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
86 | putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
87 | } |
88 | |
89 | template<> const ClassInfo JSSVGPathSegCurvetoQuadraticSmoothAbsConstructor::s_info = { "SVGPathSegCurvetoQuadraticSmoothAbs" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGPathSegCurvetoQuadraticSmoothAbsConstructor) }; |
90 | |
91 | /* Hash table for prototype */ |
92 | |
93 | static const HashTableValue JSSVGPathSegCurvetoQuadraticSmoothAbsPrototypeTableValues[] = |
94 | { |
95 | { "constructor" , static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoQuadraticSmoothAbsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoQuadraticSmoothAbsConstructor) } }, |
96 | { "x" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoQuadraticSmoothAbsX), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoQuadraticSmoothAbsX) } }, |
97 | { "y" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoQuadraticSmoothAbsY), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoQuadraticSmoothAbsY) } }, |
98 | }; |
99 | |
100 | const ClassInfo JSSVGPathSegCurvetoQuadraticSmoothAbsPrototype::s_info = { "SVGPathSegCurvetoQuadraticSmoothAbsPrototype" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGPathSegCurvetoQuadraticSmoothAbsPrototype) }; |
101 | |
102 | void JSSVGPathSegCurvetoQuadraticSmoothAbsPrototype::finishCreation(VM& vm) |
103 | { |
104 | Base::finishCreation(vm); |
105 | reifyStaticProperties(vm, JSSVGPathSegCurvetoQuadraticSmoothAbs::info(), JSSVGPathSegCurvetoQuadraticSmoothAbsPrototypeTableValues, *this); |
106 | } |
107 | |
108 | const ClassInfo JSSVGPathSegCurvetoQuadraticSmoothAbs::s_info = { "SVGPathSegCurvetoQuadraticSmoothAbs" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGPathSegCurvetoQuadraticSmoothAbs) }; |
109 | |
110 | JSSVGPathSegCurvetoQuadraticSmoothAbs::JSSVGPathSegCurvetoQuadraticSmoothAbs(Structure* structure, JSDOMGlobalObject& globalObject, Ref<SVGPathSegCurvetoQuadraticSmoothAbs>&& impl) |
111 | : JSSVGPathSeg(structure, globalObject, WTFMove(impl)) |
112 | { |
113 | } |
114 | |
115 | void JSSVGPathSegCurvetoQuadraticSmoothAbs::finishCreation(VM& vm) |
116 | { |
117 | Base::finishCreation(vm); |
118 | ASSERT(inherits(vm, info())); |
119 | |
120 | } |
121 | |
122 | JSObject* JSSVGPathSegCurvetoQuadraticSmoothAbs::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) |
123 | { |
124 | return JSSVGPathSegCurvetoQuadraticSmoothAbsPrototype::create(vm, &globalObject, JSSVGPathSegCurvetoQuadraticSmoothAbsPrototype::createStructure(vm, &globalObject, JSSVGPathSeg::prototype(vm, globalObject))); |
125 | } |
126 | |
127 | JSObject* JSSVGPathSegCurvetoQuadraticSmoothAbs::prototype(VM& vm, JSDOMGlobalObject& globalObject) |
128 | { |
129 | return getDOMPrototype<JSSVGPathSegCurvetoQuadraticSmoothAbs>(vm, globalObject); |
130 | } |
131 | |
132 | JSValue JSSVGPathSegCurvetoQuadraticSmoothAbs::getConstructor(VM& vm, const JSGlobalObject* globalObject) |
133 | { |
134 | return getDOMConstructor<JSSVGPathSegCurvetoQuadraticSmoothAbsConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject)); |
135 | } |
136 | |
137 | template<> inline JSSVGPathSegCurvetoQuadraticSmoothAbs* IDLAttribute<JSSVGPathSegCurvetoQuadraticSmoothAbs>::cast(ExecState& state, EncodedJSValue thisValue) |
138 | { |
139 | return jsDynamicCast<JSSVGPathSegCurvetoQuadraticSmoothAbs*>(state.vm(), JSValue::decode(thisValue)); |
140 | } |
141 | |
142 | EncodedJSValue jsSVGPathSegCurvetoQuadraticSmoothAbsConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) |
143 | { |
144 | VM& vm = state->vm(); |
145 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
146 | auto* prototype = jsDynamicCast<JSSVGPathSegCurvetoQuadraticSmoothAbsPrototype*>(vm, JSValue::decode(thisValue)); |
147 | if (UNLIKELY(!prototype)) |
148 | return throwVMTypeError(state, throwScope); |
149 | return JSValue::encode(JSSVGPathSegCurvetoQuadraticSmoothAbs::getConstructor(state->vm(), prototype->globalObject())); |
150 | } |
151 | |
152 | bool setJSSVGPathSegCurvetoQuadraticSmoothAbsConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
153 | { |
154 | VM& vm = state->vm(); |
155 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
156 | auto* prototype = jsDynamicCast<JSSVGPathSegCurvetoQuadraticSmoothAbsPrototype*>(vm, JSValue::decode(thisValue)); |
157 | if (UNLIKELY(!prototype)) { |
158 | throwVMTypeError(state, throwScope); |
159 | return false; |
160 | } |
161 | // Shadowing a built-in constructor |
162 | return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue)); |
163 | } |
164 | |
165 | static inline JSValue jsSVGPathSegCurvetoQuadraticSmoothAbsXGetter(ExecState& state, JSSVGPathSegCurvetoQuadraticSmoothAbs& thisObject, ThrowScope& throwScope) |
166 | { |
167 | UNUSED_PARAM(throwScope); |
168 | UNUSED_PARAM(state); |
169 | auto& impl = thisObject.wrapped(); |
170 | JSValue result = toJS<IDLUnrestrictedFloat>(state, throwScope, impl.x()); |
171 | return result; |
172 | } |
173 | |
174 | EncodedJSValue jsSVGPathSegCurvetoQuadraticSmoothAbsX(ExecState* state, EncodedJSValue thisValue, PropertyName) |
175 | { |
176 | return IDLAttribute<JSSVGPathSegCurvetoQuadraticSmoothAbs>::get<jsSVGPathSegCurvetoQuadraticSmoothAbsXGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "x" ); |
177 | } |
178 | |
179 | static inline bool setJSSVGPathSegCurvetoQuadraticSmoothAbsXSetter(ExecState& state, JSSVGPathSegCurvetoQuadraticSmoothAbs& thisObject, JSValue value, ThrowScope& throwScope) |
180 | { |
181 | UNUSED_PARAM(throwScope); |
182 | auto& impl = thisObject.wrapped(); |
183 | auto nativeValue = convert<IDLUnrestrictedFloat>(state, value); |
184 | RETURN_IF_EXCEPTION(throwScope, false); |
185 | AttributeSetter::call(state, throwScope, [&] { |
186 | return impl.setX(WTFMove(nativeValue)); |
187 | }); |
188 | return true; |
189 | } |
190 | |
191 | bool setJSSVGPathSegCurvetoQuadraticSmoothAbsX(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
192 | { |
193 | return IDLAttribute<JSSVGPathSegCurvetoQuadraticSmoothAbs>::set<setJSSVGPathSegCurvetoQuadraticSmoothAbsXSetter>(*state, thisValue, encodedValue, "x" ); |
194 | } |
195 | |
196 | static inline JSValue jsSVGPathSegCurvetoQuadraticSmoothAbsYGetter(ExecState& state, JSSVGPathSegCurvetoQuadraticSmoothAbs& thisObject, ThrowScope& throwScope) |
197 | { |
198 | UNUSED_PARAM(throwScope); |
199 | UNUSED_PARAM(state); |
200 | auto& impl = thisObject.wrapped(); |
201 | JSValue result = toJS<IDLUnrestrictedFloat>(state, throwScope, impl.y()); |
202 | return result; |
203 | } |
204 | |
205 | EncodedJSValue jsSVGPathSegCurvetoQuadraticSmoothAbsY(ExecState* state, EncodedJSValue thisValue, PropertyName) |
206 | { |
207 | return IDLAttribute<JSSVGPathSegCurvetoQuadraticSmoothAbs>::get<jsSVGPathSegCurvetoQuadraticSmoothAbsYGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "y" ); |
208 | } |
209 | |
210 | static inline bool setJSSVGPathSegCurvetoQuadraticSmoothAbsYSetter(ExecState& state, JSSVGPathSegCurvetoQuadraticSmoothAbs& thisObject, JSValue value, ThrowScope& throwScope) |
211 | { |
212 | UNUSED_PARAM(throwScope); |
213 | auto& impl = thisObject.wrapped(); |
214 | auto nativeValue = convert<IDLUnrestrictedFloat>(state, value); |
215 | RETURN_IF_EXCEPTION(throwScope, false); |
216 | AttributeSetter::call(state, throwScope, [&] { |
217 | return impl.setY(WTFMove(nativeValue)); |
218 | }); |
219 | return true; |
220 | } |
221 | |
222 | bool setJSSVGPathSegCurvetoQuadraticSmoothAbsY(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
223 | { |
224 | return IDLAttribute<JSSVGPathSegCurvetoQuadraticSmoothAbs>::set<setJSSVGPathSegCurvetoQuadraticSmoothAbsYSetter>(*state, thisValue, encodedValue, "y" ); |
225 | } |
226 | |
227 | void JSSVGPathSegCurvetoQuadraticSmoothAbs::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) |
228 | { |
229 | auto* thisObject = jsCast<JSSVGPathSegCurvetoQuadraticSmoothAbs*>(cell); |
230 | builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); |
231 | if (thisObject->scriptExecutionContext()) |
232 | builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); |
233 | Base::heapSnapshot(cell, builder); |
234 | } |
235 | |
236 | |
237 | } |
238 | |