| 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 "JSSVGGraphicsElement.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 "JSDOMConvertStrings.h" |
| 31 | #include "JSDOMExceptionHandling.h" |
| 32 | #include "JSDOMGlobalObject.h" |
| 33 | #include "JSDOMOperation.h" |
| 34 | #include "JSDOMWrapperCache.h" |
| 35 | #include "JSSVGAnimatedTransformList.h" |
| 36 | #include "JSSVGMatrix.h" |
| 37 | #include "JSSVGRect.h" |
| 38 | #include "JSSVGStringList.h" |
| 39 | #include "ScriptExecutionContext.h" |
| 40 | #include <JavaScriptCore/HeapSnapshotBuilder.h> |
| 41 | #include <JavaScriptCore/JSCInlines.h> |
| 42 | #include <wtf/GetPtr.h> |
| 43 | #include <wtf/PointerPreparations.h> |
| 44 | #include <wtf/URL.h> |
| 45 | |
| 46 | |
| 47 | namespace WebCore { |
| 48 | using namespace JSC; |
| 49 | |
| 50 | // Functions |
| 51 | |
| 52 | JSC::EncodedJSValue JSC_HOST_CALL jsSVGGraphicsElementPrototypeFunctionGetBBox(JSC::ExecState*); |
| 53 | JSC::EncodedJSValue JSC_HOST_CALL jsSVGGraphicsElementPrototypeFunctionGetCTM(JSC::ExecState*); |
| 54 | JSC::EncodedJSValue JSC_HOST_CALL jsSVGGraphicsElementPrototypeFunctionGetScreenCTM(JSC::ExecState*); |
| 55 | JSC::EncodedJSValue JSC_HOST_CALL jsSVGGraphicsElementPrototypeFunctionGetTransformToElement(JSC::ExecState*); |
| 56 | JSC::EncodedJSValue JSC_HOST_CALL jsSVGGraphicsElementPrototypeFunctionHasExtension(JSC::ExecState*); |
| 57 | |
| 58 | // Attributes |
| 59 | |
| 60 | JSC::EncodedJSValue jsSVGGraphicsElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 61 | bool setJSSVGGraphicsElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 62 | JSC::EncodedJSValue jsSVGGraphicsElementTransform(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 63 | JSC::EncodedJSValue jsSVGGraphicsElementNearestViewportElement(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 64 | JSC::EncodedJSValue jsSVGGraphicsElementFarthestViewportElement(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 65 | JSC::EncodedJSValue jsSVGGraphicsElementRequiredFeatures(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 66 | JSC::EncodedJSValue jsSVGGraphicsElementRequiredExtensions(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 67 | JSC::EncodedJSValue jsSVGGraphicsElementSystemLanguage(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 68 | |
| 69 | class JSSVGGraphicsElementPrototype : public JSC::JSNonFinalObject { |
| 70 | public: |
| 71 | using Base = JSC::JSNonFinalObject; |
| 72 | static JSSVGGraphicsElementPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) |
| 73 | { |
| 74 | JSSVGGraphicsElementPrototype* ptr = new (NotNull, JSC::allocateCell<JSSVGGraphicsElementPrototype>(vm.heap)) JSSVGGraphicsElementPrototype(vm, globalObject, structure); |
| 75 | ptr->finishCreation(vm); |
| 76 | return ptr; |
| 77 | } |
| 78 | |
| 79 | DECLARE_INFO; |
| 80 | static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) |
| 81 | { |
| 82 | return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); |
| 83 | } |
| 84 | |
| 85 | private: |
| 86 | JSSVGGraphicsElementPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) |
| 87 | : JSC::JSNonFinalObject(vm, structure) |
| 88 | { |
| 89 | } |
| 90 | |
| 91 | void finishCreation(JSC::VM&); |
| 92 | }; |
| 93 | |
| 94 | using JSSVGGraphicsElementConstructor = JSDOMConstructorNotConstructable<JSSVGGraphicsElement>; |
| 95 | |
| 96 | template<> JSValue JSSVGGraphicsElementConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject) |
| 97 | { |
| 98 | return JSSVGElement::getConstructor(vm, &globalObject); |
| 99 | } |
| 100 | |
| 101 | template<> void JSSVGGraphicsElementConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) |
| 102 | { |
| 103 | putDirect(vm, vm.propertyNames->prototype, JSSVGGraphicsElement::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
| 104 | putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("SVGGraphicsElement"_s )), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
| 105 | putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
| 106 | } |
| 107 | |
| 108 | template<> const ClassInfo JSSVGGraphicsElementConstructor::s_info = { "SVGGraphicsElement" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGGraphicsElementConstructor) }; |
| 109 | |
| 110 | /* Hash table for prototype */ |
| 111 | |
| 112 | static const HashTableValue JSSVGGraphicsElementPrototypeTableValues[] = |
| 113 | { |
| 114 | { "constructor" , static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGGraphicsElementConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGGraphicsElementConstructor) } }, |
| 115 | { "transform" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGGraphicsElementTransform), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 116 | { "nearestViewportElement" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGGraphicsElementNearestViewportElement), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 117 | { "farthestViewportElement" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGGraphicsElementFarthestViewportElement), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 118 | { "requiredFeatures" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGGraphicsElementRequiredFeatures), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 119 | { "requiredExtensions" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGGraphicsElementRequiredExtensions), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 120 | { "systemLanguage" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGGraphicsElementSystemLanguage), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 121 | { "getBBox" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGGraphicsElementPrototypeFunctionGetBBox), (intptr_t) (0) } }, |
| 122 | { "getCTM" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGGraphicsElementPrototypeFunctionGetCTM), (intptr_t) (0) } }, |
| 123 | { "getScreenCTM" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGGraphicsElementPrototypeFunctionGetScreenCTM), (intptr_t) (0) } }, |
| 124 | { "getTransformToElement" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGGraphicsElementPrototypeFunctionGetTransformToElement), (intptr_t) (0) } }, |
| 125 | { "hasExtension" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGGraphicsElementPrototypeFunctionHasExtension), (intptr_t) (0) } }, |
| 126 | }; |
| 127 | |
| 128 | const ClassInfo JSSVGGraphicsElementPrototype::s_info = { "SVGGraphicsElementPrototype" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGGraphicsElementPrototype) }; |
| 129 | |
| 130 | void JSSVGGraphicsElementPrototype::finishCreation(VM& vm) |
| 131 | { |
| 132 | Base::finishCreation(vm); |
| 133 | reifyStaticProperties(vm, JSSVGGraphicsElement::info(), JSSVGGraphicsElementPrototypeTableValues, *this); |
| 134 | } |
| 135 | |
| 136 | const ClassInfo JSSVGGraphicsElement::s_info = { "SVGGraphicsElement" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGGraphicsElement) }; |
| 137 | |
| 138 | JSSVGGraphicsElement::JSSVGGraphicsElement(Structure* structure, JSDOMGlobalObject& globalObject, Ref<SVGGraphicsElement>&& impl) |
| 139 | : JSSVGElement(structure, globalObject, WTFMove(impl)) |
| 140 | { |
| 141 | } |
| 142 | |
| 143 | void JSSVGGraphicsElement::finishCreation(VM& vm) |
| 144 | { |
| 145 | Base::finishCreation(vm); |
| 146 | ASSERT(inherits(vm, info())); |
| 147 | |
| 148 | } |
| 149 | |
| 150 | JSObject* JSSVGGraphicsElement::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) |
| 151 | { |
| 152 | return JSSVGGraphicsElementPrototype::create(vm, &globalObject, JSSVGGraphicsElementPrototype::createStructure(vm, &globalObject, JSSVGElement::prototype(vm, globalObject))); |
| 153 | } |
| 154 | |
| 155 | JSObject* JSSVGGraphicsElement::prototype(VM& vm, JSDOMGlobalObject& globalObject) |
| 156 | { |
| 157 | return getDOMPrototype<JSSVGGraphicsElement>(vm, globalObject); |
| 158 | } |
| 159 | |
| 160 | JSValue JSSVGGraphicsElement::getConstructor(VM& vm, const JSGlobalObject* globalObject) |
| 161 | { |
| 162 | return getDOMConstructor<JSSVGGraphicsElementConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject)); |
| 163 | } |
| 164 | |
| 165 | template<> inline JSSVGGraphicsElement* IDLAttribute<JSSVGGraphicsElement>::cast(ExecState& state, EncodedJSValue thisValue) |
| 166 | { |
| 167 | return jsDynamicCast<JSSVGGraphicsElement*>(state.vm(), JSValue::decode(thisValue)); |
| 168 | } |
| 169 | |
| 170 | template<> inline JSSVGGraphicsElement* IDLOperation<JSSVGGraphicsElement>::cast(ExecState& state) |
| 171 | { |
| 172 | return jsDynamicCast<JSSVGGraphicsElement*>(state.vm(), state.thisValue()); |
| 173 | } |
| 174 | |
| 175 | EncodedJSValue jsSVGGraphicsElementConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 176 | { |
| 177 | VM& vm = state->vm(); |
| 178 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
| 179 | auto* prototype = jsDynamicCast<JSSVGGraphicsElementPrototype*>(vm, JSValue::decode(thisValue)); |
| 180 | if (UNLIKELY(!prototype)) |
| 181 | return throwVMTypeError(state, throwScope); |
| 182 | return JSValue::encode(JSSVGGraphicsElement::getConstructor(state->vm(), prototype->globalObject())); |
| 183 | } |
| 184 | |
| 185 | bool setJSSVGGraphicsElementConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 186 | { |
| 187 | VM& vm = state->vm(); |
| 188 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
| 189 | auto* prototype = jsDynamicCast<JSSVGGraphicsElementPrototype*>(vm, JSValue::decode(thisValue)); |
| 190 | if (UNLIKELY(!prototype)) { |
| 191 | throwVMTypeError(state, throwScope); |
| 192 | return false; |
| 193 | } |
| 194 | // Shadowing a built-in constructor |
| 195 | return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue)); |
| 196 | } |
| 197 | |
| 198 | static inline JSValue jsSVGGraphicsElementTransformGetter(ExecState& state, JSSVGGraphicsElement& thisObject, ThrowScope& throwScope) |
| 199 | { |
| 200 | UNUSED_PARAM(throwScope); |
| 201 | UNUSED_PARAM(state); |
| 202 | auto& impl = thisObject.wrapped(); |
| 203 | JSValue result = toJS<IDLInterface<SVGAnimatedTransformList>>(state, *thisObject.globalObject(), throwScope, impl.transformAnimated()); |
| 204 | return result; |
| 205 | } |
| 206 | |
| 207 | EncodedJSValue jsSVGGraphicsElementTransform(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 208 | { |
| 209 | return IDLAttribute<JSSVGGraphicsElement>::get<jsSVGGraphicsElementTransformGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "transform" ); |
| 210 | } |
| 211 | |
| 212 | static inline JSValue jsSVGGraphicsElementNearestViewportElementGetter(ExecState& state, JSSVGGraphicsElement& thisObject, ThrowScope& throwScope) |
| 213 | { |
| 214 | UNUSED_PARAM(throwScope); |
| 215 | UNUSED_PARAM(state); |
| 216 | auto& impl = thisObject.wrapped(); |
| 217 | JSValue result = toJS<IDLInterface<SVGElement>>(state, *thisObject.globalObject(), throwScope, impl.nearestViewportElement()); |
| 218 | return result; |
| 219 | } |
| 220 | |
| 221 | EncodedJSValue jsSVGGraphicsElementNearestViewportElement(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 222 | { |
| 223 | return IDLAttribute<JSSVGGraphicsElement>::get<jsSVGGraphicsElementNearestViewportElementGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "nearestViewportElement" ); |
| 224 | } |
| 225 | |
| 226 | static inline JSValue jsSVGGraphicsElementFarthestViewportElementGetter(ExecState& state, JSSVGGraphicsElement& thisObject, ThrowScope& throwScope) |
| 227 | { |
| 228 | UNUSED_PARAM(throwScope); |
| 229 | UNUSED_PARAM(state); |
| 230 | auto& impl = thisObject.wrapped(); |
| 231 | JSValue result = toJS<IDLInterface<SVGElement>>(state, *thisObject.globalObject(), throwScope, impl.farthestViewportElement()); |
| 232 | return result; |
| 233 | } |
| 234 | |
| 235 | EncodedJSValue jsSVGGraphicsElementFarthestViewportElement(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 236 | { |
| 237 | return IDLAttribute<JSSVGGraphicsElement>::get<jsSVGGraphicsElementFarthestViewportElementGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "farthestViewportElement" ); |
| 238 | } |
| 239 | |
| 240 | static inline JSValue jsSVGGraphicsElementRequiredFeaturesGetter(ExecState& state, JSSVGGraphicsElement& thisObject, ThrowScope& throwScope) |
| 241 | { |
| 242 | UNUSED_PARAM(throwScope); |
| 243 | UNUSED_PARAM(state); |
| 244 | auto& impl = thisObject.wrapped(); |
| 245 | JSValue result = toJS<IDLInterface<SVGStringList>>(state, *thisObject.globalObject(), throwScope, impl.requiredFeatures()); |
| 246 | return result; |
| 247 | } |
| 248 | |
| 249 | EncodedJSValue jsSVGGraphicsElementRequiredFeatures(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 250 | { |
| 251 | return IDLAttribute<JSSVGGraphicsElement>::get<jsSVGGraphicsElementRequiredFeaturesGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "requiredFeatures" ); |
| 252 | } |
| 253 | |
| 254 | static inline JSValue jsSVGGraphicsElementRequiredExtensionsGetter(ExecState& state, JSSVGGraphicsElement& thisObject, ThrowScope& throwScope) |
| 255 | { |
| 256 | UNUSED_PARAM(throwScope); |
| 257 | UNUSED_PARAM(state); |
| 258 | auto& impl = thisObject.wrapped(); |
| 259 | JSValue result = toJS<IDLInterface<SVGStringList>>(state, *thisObject.globalObject(), throwScope, impl.requiredExtensions()); |
| 260 | return result; |
| 261 | } |
| 262 | |
| 263 | EncodedJSValue jsSVGGraphicsElementRequiredExtensions(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 264 | { |
| 265 | return IDLAttribute<JSSVGGraphicsElement>::get<jsSVGGraphicsElementRequiredExtensionsGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "requiredExtensions" ); |
| 266 | } |
| 267 | |
| 268 | static inline JSValue jsSVGGraphicsElementSystemLanguageGetter(ExecState& state, JSSVGGraphicsElement& thisObject, ThrowScope& throwScope) |
| 269 | { |
| 270 | UNUSED_PARAM(throwScope); |
| 271 | UNUSED_PARAM(state); |
| 272 | auto& impl = thisObject.wrapped(); |
| 273 | JSValue result = toJS<IDLInterface<SVGStringList>>(state, *thisObject.globalObject(), throwScope, impl.systemLanguage()); |
| 274 | return result; |
| 275 | } |
| 276 | |
| 277 | EncodedJSValue jsSVGGraphicsElementSystemLanguage(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 278 | { |
| 279 | return IDLAttribute<JSSVGGraphicsElement>::get<jsSVGGraphicsElementSystemLanguageGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "systemLanguage" ); |
| 280 | } |
| 281 | |
| 282 | static inline JSC::EncodedJSValue jsSVGGraphicsElementPrototypeFunctionGetBBoxBody(JSC::ExecState* state, typename IDLOperation<JSSVGGraphicsElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 283 | { |
| 284 | UNUSED_PARAM(state); |
| 285 | UNUSED_PARAM(throwScope); |
| 286 | auto& impl = castedThis->wrapped(); |
| 287 | return JSValue::encode(toJSNewlyCreated<IDLInterface<SVGRect>>(*state, *castedThis->globalObject(), impl.getBBoxForBindings())); |
| 288 | } |
| 289 | |
| 290 | EncodedJSValue JSC_HOST_CALL jsSVGGraphicsElementPrototypeFunctionGetBBox(ExecState* state) |
| 291 | { |
| 292 | return IDLOperation<JSSVGGraphicsElement>::call<jsSVGGraphicsElementPrototypeFunctionGetBBoxBody>(*state, "getBBox" ); |
| 293 | } |
| 294 | |
| 295 | static inline JSC::EncodedJSValue jsSVGGraphicsElementPrototypeFunctionGetCTMBody(JSC::ExecState* state, typename IDLOperation<JSSVGGraphicsElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 296 | { |
| 297 | UNUSED_PARAM(state); |
| 298 | UNUSED_PARAM(throwScope); |
| 299 | auto& impl = castedThis->wrapped(); |
| 300 | return JSValue::encode(toJSNewlyCreated<IDLInterface<SVGMatrix>>(*state, *castedThis->globalObject(), impl.getCTMForBindings())); |
| 301 | } |
| 302 | |
| 303 | EncodedJSValue JSC_HOST_CALL jsSVGGraphicsElementPrototypeFunctionGetCTM(ExecState* state) |
| 304 | { |
| 305 | return IDLOperation<JSSVGGraphicsElement>::call<jsSVGGraphicsElementPrototypeFunctionGetCTMBody>(*state, "getCTM" ); |
| 306 | } |
| 307 | |
| 308 | static inline JSC::EncodedJSValue jsSVGGraphicsElementPrototypeFunctionGetScreenCTMBody(JSC::ExecState* state, typename IDLOperation<JSSVGGraphicsElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 309 | { |
| 310 | UNUSED_PARAM(state); |
| 311 | UNUSED_PARAM(throwScope); |
| 312 | auto& impl = castedThis->wrapped(); |
| 313 | return JSValue::encode(toJSNewlyCreated<IDLInterface<SVGMatrix>>(*state, *castedThis->globalObject(), impl.getScreenCTMForBindings())); |
| 314 | } |
| 315 | |
| 316 | EncodedJSValue JSC_HOST_CALL jsSVGGraphicsElementPrototypeFunctionGetScreenCTM(ExecState* state) |
| 317 | { |
| 318 | return IDLOperation<JSSVGGraphicsElement>::call<jsSVGGraphicsElementPrototypeFunctionGetScreenCTMBody>(*state, "getScreenCTM" ); |
| 319 | } |
| 320 | |
| 321 | static inline JSC::EncodedJSValue jsSVGGraphicsElementPrototypeFunctionGetTransformToElementBody(JSC::ExecState* state, typename IDLOperation<JSSVGGraphicsElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 322 | { |
| 323 | UNUSED_PARAM(state); |
| 324 | UNUSED_PARAM(throwScope); |
| 325 | auto& impl = castedThis->wrapped(); |
| 326 | auto element = convert<IDLNullable<IDLInterface<SVGElement>>>(*state, state->argument(0), [](JSC::ExecState& state, JSC::ThrowScope& scope) { throwArgumentTypeError(state, scope, 0, "element" , "SVGGraphicsElement" , "getTransformToElement" , "SVGElement" ); }); |
| 327 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 328 | return JSValue::encode(toJSNewlyCreated<IDLInterface<SVGMatrix>>(*state, *castedThis->globalObject(), throwScope, impl.getTransformToElement(WTFMove(element)))); |
| 329 | } |
| 330 | |
| 331 | EncodedJSValue JSC_HOST_CALL jsSVGGraphicsElementPrototypeFunctionGetTransformToElement(ExecState* state) |
| 332 | { |
| 333 | return IDLOperation<JSSVGGraphicsElement>::call<jsSVGGraphicsElementPrototypeFunctionGetTransformToElementBody>(*state, "getTransformToElement" ); |
| 334 | } |
| 335 | |
| 336 | static inline JSC::EncodedJSValue jsSVGGraphicsElementPrototypeFunctionHasExtensionBody(JSC::ExecState* state, typename IDLOperation<JSSVGGraphicsElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 337 | { |
| 338 | UNUSED_PARAM(state); |
| 339 | UNUSED_PARAM(throwScope); |
| 340 | auto& impl = castedThis->wrapped(); |
| 341 | auto extension = convert<IDLDOMString>(*state, state->argument(0)); |
| 342 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 343 | return JSValue::encode(toJS<IDLBoolean>(impl.hasExtension(WTFMove(extension)))); |
| 344 | } |
| 345 | |
| 346 | EncodedJSValue JSC_HOST_CALL jsSVGGraphicsElementPrototypeFunctionHasExtension(ExecState* state) |
| 347 | { |
| 348 | return IDLOperation<JSSVGGraphicsElement>::call<jsSVGGraphicsElementPrototypeFunctionHasExtensionBody>(*state, "hasExtension" ); |
| 349 | } |
| 350 | |
| 351 | void JSSVGGraphicsElement::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) |
| 352 | { |
| 353 | auto* thisObject = jsCast<JSSVGGraphicsElement*>(cell); |
| 354 | builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); |
| 355 | if (thisObject->scriptExecutionContext()) |
| 356 | builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); |
| 357 | Base::heapSnapshot(cell, builder); |
| 358 | } |
| 359 | |
| 360 | |
| 361 | } |
| 362 | |