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 "JSSVGPathSegCurvetoCubicSmoothRel.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 jsSVGPathSegCurvetoCubicSmoothRelConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
44 | bool setJSSVGPathSegCurvetoCubicSmoothRelConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
45 | JSC::EncodedJSValue jsSVGPathSegCurvetoCubicSmoothRelX(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
46 | bool setJSSVGPathSegCurvetoCubicSmoothRelX(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
47 | JSC::EncodedJSValue jsSVGPathSegCurvetoCubicSmoothRelY(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
48 | bool setJSSVGPathSegCurvetoCubicSmoothRelY(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
49 | JSC::EncodedJSValue jsSVGPathSegCurvetoCubicSmoothRelX2(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
50 | bool setJSSVGPathSegCurvetoCubicSmoothRelX2(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
51 | JSC::EncodedJSValue jsSVGPathSegCurvetoCubicSmoothRelY2(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
52 | bool setJSSVGPathSegCurvetoCubicSmoothRelY2(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
53 | |
54 | class JSSVGPathSegCurvetoCubicSmoothRelPrototype : public JSC::JSNonFinalObject { |
55 | public: |
56 | using Base = JSC::JSNonFinalObject; |
57 | static JSSVGPathSegCurvetoCubicSmoothRelPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) |
58 | { |
59 | JSSVGPathSegCurvetoCubicSmoothRelPrototype* ptr = new (NotNull, JSC::allocateCell<JSSVGPathSegCurvetoCubicSmoothRelPrototype>(vm.heap)) JSSVGPathSegCurvetoCubicSmoothRelPrototype(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 | |
70 | private: |
71 | JSSVGPathSegCurvetoCubicSmoothRelPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) |
72 | : JSC::JSNonFinalObject(vm, structure) |
73 | { |
74 | } |
75 | |
76 | void finishCreation(JSC::VM&); |
77 | }; |
78 | |
79 | using JSSVGPathSegCurvetoCubicSmoothRelConstructor = JSDOMConstructorNotConstructable<JSSVGPathSegCurvetoCubicSmoothRel>; |
80 | |
81 | template<> JSValue JSSVGPathSegCurvetoCubicSmoothRelConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject) |
82 | { |
83 | return JSSVGPathSeg::getConstructor(vm, &globalObject); |
84 | } |
85 | |
86 | template<> void JSSVGPathSegCurvetoCubicSmoothRelConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) |
87 | { |
88 | putDirect(vm, vm.propertyNames->prototype, JSSVGPathSegCurvetoCubicSmoothRel::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
89 | putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("SVGPathSegCurvetoCubicSmoothRel"_s )), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
90 | putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
91 | } |
92 | |
93 | template<> const ClassInfo JSSVGPathSegCurvetoCubicSmoothRelConstructor::s_info = { "SVGPathSegCurvetoCubicSmoothRel" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGPathSegCurvetoCubicSmoothRelConstructor) }; |
94 | |
95 | /* Hash table for prototype */ |
96 | |
97 | static const HashTableValue JSSVGPathSegCurvetoCubicSmoothRelPrototypeTableValues[] = |
98 | { |
99 | { "constructor" , static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicSmoothRelConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicSmoothRelConstructor) } }, |
100 | { "x" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicSmoothRelX), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicSmoothRelX) } }, |
101 | { "y" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicSmoothRelY), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicSmoothRelY) } }, |
102 | { "x2" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicSmoothRelX2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicSmoothRelX2) } }, |
103 | { "y2" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicSmoothRelY2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicSmoothRelY2) } }, |
104 | }; |
105 | |
106 | const ClassInfo JSSVGPathSegCurvetoCubicSmoothRelPrototype::s_info = { "SVGPathSegCurvetoCubicSmoothRelPrototype" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGPathSegCurvetoCubicSmoothRelPrototype) }; |
107 | |
108 | void JSSVGPathSegCurvetoCubicSmoothRelPrototype::finishCreation(VM& vm) |
109 | { |
110 | Base::finishCreation(vm); |
111 | reifyStaticProperties(vm, JSSVGPathSegCurvetoCubicSmoothRel::info(), JSSVGPathSegCurvetoCubicSmoothRelPrototypeTableValues, *this); |
112 | } |
113 | |
114 | const ClassInfo JSSVGPathSegCurvetoCubicSmoothRel::s_info = { "SVGPathSegCurvetoCubicSmoothRel" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGPathSegCurvetoCubicSmoothRel) }; |
115 | |
116 | JSSVGPathSegCurvetoCubicSmoothRel::JSSVGPathSegCurvetoCubicSmoothRel(Structure* structure, JSDOMGlobalObject& globalObject, Ref<SVGPathSegCurvetoCubicSmoothRel>&& impl) |
117 | : JSSVGPathSeg(structure, globalObject, WTFMove(impl)) |
118 | { |
119 | } |
120 | |
121 | void JSSVGPathSegCurvetoCubicSmoothRel::finishCreation(VM& vm) |
122 | { |
123 | Base::finishCreation(vm); |
124 | ASSERT(inherits(vm, info())); |
125 | |
126 | } |
127 | |
128 | JSObject* JSSVGPathSegCurvetoCubicSmoothRel::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) |
129 | { |
130 | return JSSVGPathSegCurvetoCubicSmoothRelPrototype::create(vm, &globalObject, JSSVGPathSegCurvetoCubicSmoothRelPrototype::createStructure(vm, &globalObject, JSSVGPathSeg::prototype(vm, globalObject))); |
131 | } |
132 | |
133 | JSObject* JSSVGPathSegCurvetoCubicSmoothRel::prototype(VM& vm, JSDOMGlobalObject& globalObject) |
134 | { |
135 | return getDOMPrototype<JSSVGPathSegCurvetoCubicSmoothRel>(vm, globalObject); |
136 | } |
137 | |
138 | JSValue JSSVGPathSegCurvetoCubicSmoothRel::getConstructor(VM& vm, const JSGlobalObject* globalObject) |
139 | { |
140 | return getDOMConstructor<JSSVGPathSegCurvetoCubicSmoothRelConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject)); |
141 | } |
142 | |
143 | template<> inline JSSVGPathSegCurvetoCubicSmoothRel* IDLAttribute<JSSVGPathSegCurvetoCubicSmoothRel>::cast(ExecState& state, EncodedJSValue thisValue) |
144 | { |
145 | return jsDynamicCast<JSSVGPathSegCurvetoCubicSmoothRel*>(state.vm(), JSValue::decode(thisValue)); |
146 | } |
147 | |
148 | EncodedJSValue jsSVGPathSegCurvetoCubicSmoothRelConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) |
149 | { |
150 | VM& vm = state->vm(); |
151 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
152 | auto* prototype = jsDynamicCast<JSSVGPathSegCurvetoCubicSmoothRelPrototype*>(vm, JSValue::decode(thisValue)); |
153 | if (UNLIKELY(!prototype)) |
154 | return throwVMTypeError(state, throwScope); |
155 | return JSValue::encode(JSSVGPathSegCurvetoCubicSmoothRel::getConstructor(state->vm(), prototype->globalObject())); |
156 | } |
157 | |
158 | bool setJSSVGPathSegCurvetoCubicSmoothRelConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
159 | { |
160 | VM& vm = state->vm(); |
161 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
162 | auto* prototype = jsDynamicCast<JSSVGPathSegCurvetoCubicSmoothRelPrototype*>(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 | |
171 | static inline JSValue jsSVGPathSegCurvetoCubicSmoothRelXGetter(ExecState& state, JSSVGPathSegCurvetoCubicSmoothRel& 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 | |
180 | EncodedJSValue jsSVGPathSegCurvetoCubicSmoothRelX(ExecState* state, EncodedJSValue thisValue, PropertyName) |
181 | { |
182 | return IDLAttribute<JSSVGPathSegCurvetoCubicSmoothRel>::get<jsSVGPathSegCurvetoCubicSmoothRelXGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "x" ); |
183 | } |
184 | |
185 | static inline bool setJSSVGPathSegCurvetoCubicSmoothRelXSetter(ExecState& state, JSSVGPathSegCurvetoCubicSmoothRel& 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 | |
197 | bool setJSSVGPathSegCurvetoCubicSmoothRelX(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
198 | { |
199 | return IDLAttribute<JSSVGPathSegCurvetoCubicSmoothRel>::set<setJSSVGPathSegCurvetoCubicSmoothRelXSetter>(*state, thisValue, encodedValue, "x" ); |
200 | } |
201 | |
202 | static inline JSValue jsSVGPathSegCurvetoCubicSmoothRelYGetter(ExecState& state, JSSVGPathSegCurvetoCubicSmoothRel& 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 | |
211 | EncodedJSValue jsSVGPathSegCurvetoCubicSmoothRelY(ExecState* state, EncodedJSValue thisValue, PropertyName) |
212 | { |
213 | return IDLAttribute<JSSVGPathSegCurvetoCubicSmoothRel>::get<jsSVGPathSegCurvetoCubicSmoothRelYGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "y" ); |
214 | } |
215 | |
216 | static inline bool setJSSVGPathSegCurvetoCubicSmoothRelYSetter(ExecState& state, JSSVGPathSegCurvetoCubicSmoothRel& 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 | |
228 | bool setJSSVGPathSegCurvetoCubicSmoothRelY(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
229 | { |
230 | return IDLAttribute<JSSVGPathSegCurvetoCubicSmoothRel>::set<setJSSVGPathSegCurvetoCubicSmoothRelYSetter>(*state, thisValue, encodedValue, "y" ); |
231 | } |
232 | |
233 | static inline JSValue jsSVGPathSegCurvetoCubicSmoothRelX2Getter(ExecState& state, JSSVGPathSegCurvetoCubicSmoothRel& 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.x2()); |
239 | return result; |
240 | } |
241 | |
242 | EncodedJSValue jsSVGPathSegCurvetoCubicSmoothRelX2(ExecState* state, EncodedJSValue thisValue, PropertyName) |
243 | { |
244 | return IDLAttribute<JSSVGPathSegCurvetoCubicSmoothRel>::get<jsSVGPathSegCurvetoCubicSmoothRelX2Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "x2" ); |
245 | } |
246 | |
247 | static inline bool setJSSVGPathSegCurvetoCubicSmoothRelX2Setter(ExecState& state, JSSVGPathSegCurvetoCubicSmoothRel& 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.setX2(WTFMove(nativeValue)); |
255 | }); |
256 | return true; |
257 | } |
258 | |
259 | bool setJSSVGPathSegCurvetoCubicSmoothRelX2(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
260 | { |
261 | return IDLAttribute<JSSVGPathSegCurvetoCubicSmoothRel>::set<setJSSVGPathSegCurvetoCubicSmoothRelX2Setter>(*state, thisValue, encodedValue, "x2" ); |
262 | } |
263 | |
264 | static inline JSValue jsSVGPathSegCurvetoCubicSmoothRelY2Getter(ExecState& state, JSSVGPathSegCurvetoCubicSmoothRel& 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.y2()); |
270 | return result; |
271 | } |
272 | |
273 | EncodedJSValue jsSVGPathSegCurvetoCubicSmoothRelY2(ExecState* state, EncodedJSValue thisValue, PropertyName) |
274 | { |
275 | return IDLAttribute<JSSVGPathSegCurvetoCubicSmoothRel>::get<jsSVGPathSegCurvetoCubicSmoothRelY2Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "y2" ); |
276 | } |
277 | |
278 | static inline bool setJSSVGPathSegCurvetoCubicSmoothRelY2Setter(ExecState& state, JSSVGPathSegCurvetoCubicSmoothRel& 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.setY2(WTFMove(nativeValue)); |
286 | }); |
287 | return true; |
288 | } |
289 | |
290 | bool setJSSVGPathSegCurvetoCubicSmoothRelY2(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
291 | { |
292 | return IDLAttribute<JSSVGPathSegCurvetoCubicSmoothRel>::set<setJSSVGPathSegCurvetoCubicSmoothRelY2Setter>(*state, thisValue, encodedValue, "y2" ); |
293 | } |
294 | |
295 | void JSSVGPathSegCurvetoCubicSmoothRel::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) |
296 | { |
297 | auto* thisObject = jsCast<JSSVGPathSegCurvetoCubicSmoothRel*>(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 | |