| 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 "JSDOMMatrix.h" |
| 23 | |
| 24 | #include "JSDOMAttribute.h" |
| 25 | #include "JSDOMBinding.h" |
| 26 | #include "JSDOMConstructor.h" |
| 27 | #include "JSDOMConvertBufferSource.h" |
| 28 | #include "JSDOMConvertDictionary.h" |
| 29 | #include "JSDOMConvertInterface.h" |
| 30 | #include "JSDOMConvertNumbers.h" |
| 31 | #include "JSDOMConvertSequences.h" |
| 32 | #include "JSDOMConvertStrings.h" |
| 33 | #include "JSDOMConvertUnion.h" |
| 34 | #include "JSDOMExceptionHandling.h" |
| 35 | #include "JSDOMGlobalObject.h" |
| 36 | #include "JSDOMMatrix.h" |
| 37 | #include "JSDOMMatrixInit.h" |
| 38 | #include "JSDOMOperation.h" |
| 39 | #include "JSDOMWrapperCache.h" |
| 40 | #include "ScriptExecutionContext.h" |
| 41 | #include <JavaScriptCore/HeapSnapshotBuilder.h> |
| 42 | #include <JavaScriptCore/JSArray.h> |
| 43 | #include <JavaScriptCore/JSCInlines.h> |
| 44 | #include <wtf/GetPtr.h> |
| 45 | #include <wtf/PointerPreparations.h> |
| 46 | #include <wtf/URL.h> |
| 47 | #include <wtf/Variant.h> |
| 48 | |
| 49 | |
| 50 | namespace WebCore { |
| 51 | using namespace JSC; |
| 52 | |
| 53 | // Functions |
| 54 | |
| 55 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixConstructorFunctionFromMatrix(JSC::ExecState*); |
| 56 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixConstructorFunctionFromFloat32Array(JSC::ExecState*); |
| 57 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixConstructorFunctionFromFloat64Array(JSC::ExecState*); |
| 58 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixPrototypeFunctionMultiplySelf(JSC::ExecState*); |
| 59 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixPrototypeFunctionPreMultiplySelf(JSC::ExecState*); |
| 60 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixPrototypeFunctionTranslateSelf(JSC::ExecState*); |
| 61 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixPrototypeFunctionScaleSelf(JSC::ExecState*); |
| 62 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixPrototypeFunctionScale3dSelf(JSC::ExecState*); |
| 63 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixPrototypeFunctionRotateSelf(JSC::ExecState*); |
| 64 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixPrototypeFunctionRotateFromVectorSelf(JSC::ExecState*); |
| 65 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixPrototypeFunctionRotateAxisAngleSelf(JSC::ExecState*); |
| 66 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixPrototypeFunctionSkewXSelf(JSC::ExecState*); |
| 67 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixPrototypeFunctionSkewYSelf(JSC::ExecState*); |
| 68 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixPrototypeFunctionInvertSelf(JSC::ExecState*); |
| 69 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixPrototypeFunctionSetMatrixValue(JSC::ExecState*); |
| 70 | |
| 71 | // Attributes |
| 72 | |
| 73 | JSC::EncodedJSValue jsDOMMatrixConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 74 | bool setJSDOMMatrixConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 75 | JSC::EncodedJSValue jsDOMMatrixA(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 76 | bool setJSDOMMatrixA(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 77 | JSC::EncodedJSValue jsDOMMatrixB(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 78 | bool setJSDOMMatrixB(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 79 | JSC::EncodedJSValue jsDOMMatrixC(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 80 | bool setJSDOMMatrixC(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 81 | JSC::EncodedJSValue jsDOMMatrixD(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 82 | bool setJSDOMMatrixD(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 83 | JSC::EncodedJSValue jsDOMMatrixE(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 84 | bool setJSDOMMatrixE(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 85 | JSC::EncodedJSValue jsDOMMatrixF(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 86 | bool setJSDOMMatrixF(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 87 | JSC::EncodedJSValue jsDOMMatrixM11(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 88 | bool setJSDOMMatrixM11(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 89 | JSC::EncodedJSValue jsDOMMatrixM12(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 90 | bool setJSDOMMatrixM12(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 91 | JSC::EncodedJSValue jsDOMMatrixM13(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 92 | bool setJSDOMMatrixM13(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 93 | JSC::EncodedJSValue jsDOMMatrixM14(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 94 | bool setJSDOMMatrixM14(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 95 | JSC::EncodedJSValue jsDOMMatrixM21(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 96 | bool setJSDOMMatrixM21(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 97 | JSC::EncodedJSValue jsDOMMatrixM22(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 98 | bool setJSDOMMatrixM22(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 99 | JSC::EncodedJSValue jsDOMMatrixM23(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 100 | bool setJSDOMMatrixM23(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 101 | JSC::EncodedJSValue jsDOMMatrixM24(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 102 | bool setJSDOMMatrixM24(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 103 | JSC::EncodedJSValue jsDOMMatrixM31(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 104 | bool setJSDOMMatrixM31(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 105 | JSC::EncodedJSValue jsDOMMatrixM32(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 106 | bool setJSDOMMatrixM32(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 107 | JSC::EncodedJSValue jsDOMMatrixM33(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 108 | bool setJSDOMMatrixM33(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 109 | JSC::EncodedJSValue jsDOMMatrixM34(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 110 | bool setJSDOMMatrixM34(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 111 | JSC::EncodedJSValue jsDOMMatrixM41(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 112 | bool setJSDOMMatrixM41(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 113 | JSC::EncodedJSValue jsDOMMatrixM42(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 114 | bool setJSDOMMatrixM42(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 115 | JSC::EncodedJSValue jsDOMMatrixM43(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 116 | bool setJSDOMMatrixM43(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 117 | JSC::EncodedJSValue jsDOMMatrixM44(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 118 | bool setJSDOMMatrixM44(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 119 | |
| 120 | class JSDOMMatrixPrototype : public JSC::JSNonFinalObject { |
| 121 | public: |
| 122 | using Base = JSC::JSNonFinalObject; |
| 123 | static JSDOMMatrixPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) |
| 124 | { |
| 125 | JSDOMMatrixPrototype* ptr = new (NotNull, JSC::allocateCell<JSDOMMatrixPrototype>(vm.heap)) JSDOMMatrixPrototype(vm, globalObject, structure); |
| 126 | ptr->finishCreation(vm); |
| 127 | return ptr; |
| 128 | } |
| 129 | |
| 130 | DECLARE_INFO; |
| 131 | static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) |
| 132 | { |
| 133 | return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); |
| 134 | } |
| 135 | |
| 136 | private: |
| 137 | JSDOMMatrixPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) |
| 138 | : JSC::JSNonFinalObject(vm, structure) |
| 139 | { |
| 140 | } |
| 141 | |
| 142 | void finishCreation(JSC::VM&); |
| 143 | }; |
| 144 | |
| 145 | using JSDOMMatrixConstructor = JSDOMConstructor<JSDOMMatrix>; |
| 146 | |
| 147 | /* Hash table for constructor */ |
| 148 | |
| 149 | static const HashTableValue JSDOMMatrixConstructorTableValues[] = |
| 150 | { |
| 151 | { "fromMatrix" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixConstructorFunctionFromMatrix), (intptr_t) (0) } }, |
| 152 | { "fromFloat32Array" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixConstructorFunctionFromFloat32Array), (intptr_t) (1) } }, |
| 153 | { "fromFloat64Array" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixConstructorFunctionFromFloat64Array), (intptr_t) (1) } }, |
| 154 | }; |
| 155 | |
| 156 | template<> EncodedJSValue JSC_HOST_CALL JSDOMMatrixConstructor::construct(ExecState* state) |
| 157 | { |
| 158 | VM& vm = state->vm(); |
| 159 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
| 160 | UNUSED_PARAM(throwScope); |
| 161 | auto* castedThis = jsCast<JSDOMMatrixConstructor*>(state->jsCallee()); |
| 162 | ASSERT(castedThis); |
| 163 | auto* context = castedThis->scriptExecutionContext(); |
| 164 | if (UNLIKELY(!context)) |
| 165 | return throwConstructorScriptExecutionContextUnavailableError(*state, throwScope, "DOMMatrix" ); |
| 166 | auto init = state->argument(0).isUndefined() ? Optional<Converter<IDLUnion<IDLDOMString, IDLSequence<IDLUnrestrictedDouble>>>::ReturnType>() : Optional<Converter<IDLUnion<IDLDOMString, IDLSequence<IDLUnrestrictedDouble>>>::ReturnType>(convert<IDLUnion<IDLDOMString, IDLSequence<IDLUnrestrictedDouble>>>(*state, state->uncheckedArgument(0))); |
| 167 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 168 | auto object = DOMMatrix::create(*context, WTFMove(init)); |
| 169 | return JSValue::encode(toJSNewlyCreated<IDLInterface<DOMMatrix>>(*state, *castedThis->globalObject(), throwScope, WTFMove(object))); |
| 170 | } |
| 171 | |
| 172 | template<> JSValue JSDOMMatrixConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject) |
| 173 | { |
| 174 | return JSDOMMatrixReadOnly::getConstructor(vm, &globalObject); |
| 175 | } |
| 176 | |
| 177 | template<> void JSDOMMatrixConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) |
| 178 | { |
| 179 | putDirect(vm, vm.propertyNames->prototype, JSDOMMatrix::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
| 180 | putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("DOMMatrix"_s )), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
| 181 | putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
| 182 | reifyStaticProperties(vm, JSDOMMatrix::info(), JSDOMMatrixConstructorTableValues, *this); |
| 183 | } |
| 184 | |
| 185 | template<> const ClassInfo JSDOMMatrixConstructor::s_info = { "DOMMatrix" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSDOMMatrixConstructor) }; |
| 186 | |
| 187 | /* Hash table for prototype */ |
| 188 | |
| 189 | static const HashTableValue JSDOMMatrixPrototypeTableValues[] = |
| 190 | { |
| 191 | { "constructor" , static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDOMMatrixConstructor) } }, |
| 192 | { "a" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixA), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDOMMatrixA) } }, |
| 193 | { "b" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixB), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDOMMatrixB) } }, |
| 194 | { "c" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixC), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDOMMatrixC) } }, |
| 195 | { "d" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixD), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDOMMatrixD) } }, |
| 196 | { "e" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixE), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDOMMatrixE) } }, |
| 197 | { "f" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixF), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDOMMatrixF) } }, |
| 198 | { "m11" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixM11), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDOMMatrixM11) } }, |
| 199 | { "m12" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixM12), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDOMMatrixM12) } }, |
| 200 | { "m13" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixM13), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDOMMatrixM13) } }, |
| 201 | { "m14" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixM14), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDOMMatrixM14) } }, |
| 202 | { "m21" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixM21), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDOMMatrixM21) } }, |
| 203 | { "m22" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixM22), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDOMMatrixM22) } }, |
| 204 | { "m23" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixM23), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDOMMatrixM23) } }, |
| 205 | { "m24" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixM24), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDOMMatrixM24) } }, |
| 206 | { "m31" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixM31), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDOMMatrixM31) } }, |
| 207 | { "m32" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixM32), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDOMMatrixM32) } }, |
| 208 | { "m33" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixM33), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDOMMatrixM33) } }, |
| 209 | { "m34" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixM34), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDOMMatrixM34) } }, |
| 210 | { "m41" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixM41), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDOMMatrixM41) } }, |
| 211 | { "m42" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixM42), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDOMMatrixM42) } }, |
| 212 | { "m43" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixM43), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDOMMatrixM43) } }, |
| 213 | { "m44" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixM44), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDOMMatrixM44) } }, |
| 214 | { "multiplySelf" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixPrototypeFunctionMultiplySelf), (intptr_t) (0) } }, |
| 215 | { "preMultiplySelf" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixPrototypeFunctionPreMultiplySelf), (intptr_t) (0) } }, |
| 216 | { "translateSelf" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixPrototypeFunctionTranslateSelf), (intptr_t) (0) } }, |
| 217 | { "scaleSelf" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixPrototypeFunctionScaleSelf), (intptr_t) (0) } }, |
| 218 | { "scale3dSelf" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixPrototypeFunctionScale3dSelf), (intptr_t) (0) } }, |
| 219 | { "rotateSelf" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixPrototypeFunctionRotateSelf), (intptr_t) (0) } }, |
| 220 | { "rotateFromVectorSelf" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixPrototypeFunctionRotateFromVectorSelf), (intptr_t) (0) } }, |
| 221 | { "rotateAxisAngleSelf" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixPrototypeFunctionRotateAxisAngleSelf), (intptr_t) (0) } }, |
| 222 | { "skewXSelf" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixPrototypeFunctionSkewXSelf), (intptr_t) (0) } }, |
| 223 | { "skewYSelf" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixPrototypeFunctionSkewYSelf), (intptr_t) (0) } }, |
| 224 | { "invertSelf" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixPrototypeFunctionInvertSelf), (intptr_t) (0) } }, |
| 225 | { "setMatrixValue" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixPrototypeFunctionSetMatrixValue), (intptr_t) (1) } }, |
| 226 | }; |
| 227 | |
| 228 | const ClassInfo JSDOMMatrixPrototype::s_info = { "DOMMatrixPrototype" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSDOMMatrixPrototype) }; |
| 229 | |
| 230 | void JSDOMMatrixPrototype::finishCreation(VM& vm) |
| 231 | { |
| 232 | Base::finishCreation(vm); |
| 233 | reifyStaticProperties(vm, JSDOMMatrix::info(), JSDOMMatrixPrototypeTableValues, *this); |
| 234 | bool hasDisabledRuntimeProperties = false; |
| 235 | if (!jsCast<JSDOMGlobalObject*>(globalObject())->scriptExecutionContext()->isDocument()) { |
| 236 | hasDisabledRuntimeProperties = true; |
| 237 | auto propertyName = Identifier::fromString(&vm, reinterpret_cast<const LChar*>("setMatrixValue" ), strlen("setMatrixValue" )); |
| 238 | VM::DeletePropertyModeScope scope(vm, VM::DeletePropertyMode::IgnoreConfigurable); |
| 239 | JSObject::deleteProperty(this, globalObject()->globalExec(), propertyName); |
| 240 | } |
| 241 | if (hasDisabledRuntimeProperties && structure()->isDictionary()) |
| 242 | flattenDictionaryObject(vm); |
| 243 | } |
| 244 | |
| 245 | const ClassInfo JSDOMMatrix::s_info = { "DOMMatrix" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSDOMMatrix) }; |
| 246 | |
| 247 | JSDOMMatrix::JSDOMMatrix(Structure* structure, JSDOMGlobalObject& globalObject, Ref<DOMMatrix>&& impl) |
| 248 | : JSDOMMatrixReadOnly(structure, globalObject, WTFMove(impl)) |
| 249 | { |
| 250 | } |
| 251 | |
| 252 | void JSDOMMatrix::finishCreation(VM& vm) |
| 253 | { |
| 254 | Base::finishCreation(vm); |
| 255 | ASSERT(inherits(vm, info())); |
| 256 | |
| 257 | } |
| 258 | |
| 259 | JSObject* JSDOMMatrix::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) |
| 260 | { |
| 261 | return JSDOMMatrixPrototype::create(vm, &globalObject, JSDOMMatrixPrototype::createStructure(vm, &globalObject, JSDOMMatrixReadOnly::prototype(vm, globalObject))); |
| 262 | } |
| 263 | |
| 264 | JSObject* JSDOMMatrix::prototype(VM& vm, JSDOMGlobalObject& globalObject) |
| 265 | { |
| 266 | return getDOMPrototype<JSDOMMatrix>(vm, globalObject); |
| 267 | } |
| 268 | |
| 269 | JSValue JSDOMMatrix::getConstructor(VM& vm, const JSGlobalObject* globalObject) |
| 270 | { |
| 271 | return getDOMConstructor<JSDOMMatrixConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject)); |
| 272 | } |
| 273 | |
| 274 | template<> inline JSDOMMatrix* IDLAttribute<JSDOMMatrix>::cast(ExecState& state, EncodedJSValue thisValue) |
| 275 | { |
| 276 | return jsDynamicCast<JSDOMMatrix*>(state.vm(), JSValue::decode(thisValue)); |
| 277 | } |
| 278 | |
| 279 | template<> inline JSDOMMatrix* IDLOperation<JSDOMMatrix>::cast(ExecState& state) |
| 280 | { |
| 281 | return jsDynamicCast<JSDOMMatrix*>(state.vm(), state.thisValue()); |
| 282 | } |
| 283 | |
| 284 | EncodedJSValue jsDOMMatrixConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 285 | { |
| 286 | VM& vm = state->vm(); |
| 287 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
| 288 | auto* prototype = jsDynamicCast<JSDOMMatrixPrototype*>(vm, JSValue::decode(thisValue)); |
| 289 | if (UNLIKELY(!prototype)) |
| 290 | return throwVMTypeError(state, throwScope); |
| 291 | return JSValue::encode(JSDOMMatrix::getConstructor(state->vm(), prototype->globalObject())); |
| 292 | } |
| 293 | |
| 294 | bool setJSDOMMatrixConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 295 | { |
| 296 | VM& vm = state->vm(); |
| 297 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
| 298 | auto* prototype = jsDynamicCast<JSDOMMatrixPrototype*>(vm, JSValue::decode(thisValue)); |
| 299 | if (UNLIKELY(!prototype)) { |
| 300 | throwVMTypeError(state, throwScope); |
| 301 | return false; |
| 302 | } |
| 303 | // Shadowing a built-in constructor |
| 304 | return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue)); |
| 305 | } |
| 306 | |
| 307 | static inline JSValue jsDOMMatrixAGetter(ExecState& state, JSDOMMatrix& thisObject, ThrowScope& throwScope) |
| 308 | { |
| 309 | UNUSED_PARAM(throwScope); |
| 310 | UNUSED_PARAM(state); |
| 311 | auto& impl = thisObject.wrapped(); |
| 312 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.a()); |
| 313 | return result; |
| 314 | } |
| 315 | |
| 316 | EncodedJSValue jsDOMMatrixA(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 317 | { |
| 318 | return IDLAttribute<JSDOMMatrix>::get<jsDOMMatrixAGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "a" ); |
| 319 | } |
| 320 | |
| 321 | static inline bool setJSDOMMatrixASetter(ExecState& state, JSDOMMatrix& thisObject, JSValue value, ThrowScope& throwScope) |
| 322 | { |
| 323 | UNUSED_PARAM(throwScope); |
| 324 | auto& impl = thisObject.wrapped(); |
| 325 | auto nativeValue = convert<IDLUnrestrictedDouble>(state, value); |
| 326 | RETURN_IF_EXCEPTION(throwScope, false); |
| 327 | AttributeSetter::call(state, throwScope, [&] { |
| 328 | return impl.setA(WTFMove(nativeValue)); |
| 329 | }); |
| 330 | return true; |
| 331 | } |
| 332 | |
| 333 | bool setJSDOMMatrixA(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 334 | { |
| 335 | return IDLAttribute<JSDOMMatrix>::set<setJSDOMMatrixASetter>(*state, thisValue, encodedValue, "a" ); |
| 336 | } |
| 337 | |
| 338 | static inline JSValue jsDOMMatrixBGetter(ExecState& state, JSDOMMatrix& thisObject, ThrowScope& throwScope) |
| 339 | { |
| 340 | UNUSED_PARAM(throwScope); |
| 341 | UNUSED_PARAM(state); |
| 342 | auto& impl = thisObject.wrapped(); |
| 343 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.b()); |
| 344 | return result; |
| 345 | } |
| 346 | |
| 347 | EncodedJSValue jsDOMMatrixB(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 348 | { |
| 349 | return IDLAttribute<JSDOMMatrix>::get<jsDOMMatrixBGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "b" ); |
| 350 | } |
| 351 | |
| 352 | static inline bool setJSDOMMatrixBSetter(ExecState& state, JSDOMMatrix& thisObject, JSValue value, ThrowScope& throwScope) |
| 353 | { |
| 354 | UNUSED_PARAM(throwScope); |
| 355 | auto& impl = thisObject.wrapped(); |
| 356 | auto nativeValue = convert<IDLUnrestrictedDouble>(state, value); |
| 357 | RETURN_IF_EXCEPTION(throwScope, false); |
| 358 | AttributeSetter::call(state, throwScope, [&] { |
| 359 | return impl.setB(WTFMove(nativeValue)); |
| 360 | }); |
| 361 | return true; |
| 362 | } |
| 363 | |
| 364 | bool setJSDOMMatrixB(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 365 | { |
| 366 | return IDLAttribute<JSDOMMatrix>::set<setJSDOMMatrixBSetter>(*state, thisValue, encodedValue, "b" ); |
| 367 | } |
| 368 | |
| 369 | static inline JSValue jsDOMMatrixCGetter(ExecState& state, JSDOMMatrix& thisObject, ThrowScope& throwScope) |
| 370 | { |
| 371 | UNUSED_PARAM(throwScope); |
| 372 | UNUSED_PARAM(state); |
| 373 | auto& impl = thisObject.wrapped(); |
| 374 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.c()); |
| 375 | return result; |
| 376 | } |
| 377 | |
| 378 | EncodedJSValue jsDOMMatrixC(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 379 | { |
| 380 | return IDLAttribute<JSDOMMatrix>::get<jsDOMMatrixCGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "c" ); |
| 381 | } |
| 382 | |
| 383 | static inline bool setJSDOMMatrixCSetter(ExecState& state, JSDOMMatrix& thisObject, JSValue value, ThrowScope& throwScope) |
| 384 | { |
| 385 | UNUSED_PARAM(throwScope); |
| 386 | auto& impl = thisObject.wrapped(); |
| 387 | auto nativeValue = convert<IDLUnrestrictedDouble>(state, value); |
| 388 | RETURN_IF_EXCEPTION(throwScope, false); |
| 389 | AttributeSetter::call(state, throwScope, [&] { |
| 390 | return impl.setC(WTFMove(nativeValue)); |
| 391 | }); |
| 392 | return true; |
| 393 | } |
| 394 | |
| 395 | bool setJSDOMMatrixC(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 396 | { |
| 397 | return IDLAttribute<JSDOMMatrix>::set<setJSDOMMatrixCSetter>(*state, thisValue, encodedValue, "c" ); |
| 398 | } |
| 399 | |
| 400 | static inline JSValue jsDOMMatrixDGetter(ExecState& state, JSDOMMatrix& thisObject, ThrowScope& throwScope) |
| 401 | { |
| 402 | UNUSED_PARAM(throwScope); |
| 403 | UNUSED_PARAM(state); |
| 404 | auto& impl = thisObject.wrapped(); |
| 405 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.d()); |
| 406 | return result; |
| 407 | } |
| 408 | |
| 409 | EncodedJSValue jsDOMMatrixD(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 410 | { |
| 411 | return IDLAttribute<JSDOMMatrix>::get<jsDOMMatrixDGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "d" ); |
| 412 | } |
| 413 | |
| 414 | static inline bool setJSDOMMatrixDSetter(ExecState& state, JSDOMMatrix& thisObject, JSValue value, ThrowScope& throwScope) |
| 415 | { |
| 416 | UNUSED_PARAM(throwScope); |
| 417 | auto& impl = thisObject.wrapped(); |
| 418 | auto nativeValue = convert<IDLUnrestrictedDouble>(state, value); |
| 419 | RETURN_IF_EXCEPTION(throwScope, false); |
| 420 | AttributeSetter::call(state, throwScope, [&] { |
| 421 | return impl.setD(WTFMove(nativeValue)); |
| 422 | }); |
| 423 | return true; |
| 424 | } |
| 425 | |
| 426 | bool setJSDOMMatrixD(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 427 | { |
| 428 | return IDLAttribute<JSDOMMatrix>::set<setJSDOMMatrixDSetter>(*state, thisValue, encodedValue, "d" ); |
| 429 | } |
| 430 | |
| 431 | static inline JSValue jsDOMMatrixEGetter(ExecState& state, JSDOMMatrix& thisObject, ThrowScope& throwScope) |
| 432 | { |
| 433 | UNUSED_PARAM(throwScope); |
| 434 | UNUSED_PARAM(state); |
| 435 | auto& impl = thisObject.wrapped(); |
| 436 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.e()); |
| 437 | return result; |
| 438 | } |
| 439 | |
| 440 | EncodedJSValue jsDOMMatrixE(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 441 | { |
| 442 | return IDLAttribute<JSDOMMatrix>::get<jsDOMMatrixEGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "e" ); |
| 443 | } |
| 444 | |
| 445 | static inline bool setJSDOMMatrixESetter(ExecState& state, JSDOMMatrix& thisObject, JSValue value, ThrowScope& throwScope) |
| 446 | { |
| 447 | UNUSED_PARAM(throwScope); |
| 448 | auto& impl = thisObject.wrapped(); |
| 449 | auto nativeValue = convert<IDLUnrestrictedDouble>(state, value); |
| 450 | RETURN_IF_EXCEPTION(throwScope, false); |
| 451 | AttributeSetter::call(state, throwScope, [&] { |
| 452 | return impl.setE(WTFMove(nativeValue)); |
| 453 | }); |
| 454 | return true; |
| 455 | } |
| 456 | |
| 457 | bool setJSDOMMatrixE(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 458 | { |
| 459 | return IDLAttribute<JSDOMMatrix>::set<setJSDOMMatrixESetter>(*state, thisValue, encodedValue, "e" ); |
| 460 | } |
| 461 | |
| 462 | static inline JSValue jsDOMMatrixFGetter(ExecState& state, JSDOMMatrix& thisObject, ThrowScope& throwScope) |
| 463 | { |
| 464 | UNUSED_PARAM(throwScope); |
| 465 | UNUSED_PARAM(state); |
| 466 | auto& impl = thisObject.wrapped(); |
| 467 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.f()); |
| 468 | return result; |
| 469 | } |
| 470 | |
| 471 | EncodedJSValue jsDOMMatrixF(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 472 | { |
| 473 | return IDLAttribute<JSDOMMatrix>::get<jsDOMMatrixFGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "f" ); |
| 474 | } |
| 475 | |
| 476 | static inline bool setJSDOMMatrixFSetter(ExecState& state, JSDOMMatrix& thisObject, JSValue value, ThrowScope& throwScope) |
| 477 | { |
| 478 | UNUSED_PARAM(throwScope); |
| 479 | auto& impl = thisObject.wrapped(); |
| 480 | auto nativeValue = convert<IDLUnrestrictedDouble>(state, value); |
| 481 | RETURN_IF_EXCEPTION(throwScope, false); |
| 482 | AttributeSetter::call(state, throwScope, [&] { |
| 483 | return impl.setF(WTFMove(nativeValue)); |
| 484 | }); |
| 485 | return true; |
| 486 | } |
| 487 | |
| 488 | bool setJSDOMMatrixF(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 489 | { |
| 490 | return IDLAttribute<JSDOMMatrix>::set<setJSDOMMatrixFSetter>(*state, thisValue, encodedValue, "f" ); |
| 491 | } |
| 492 | |
| 493 | static inline JSValue jsDOMMatrixM11Getter(ExecState& state, JSDOMMatrix& thisObject, ThrowScope& throwScope) |
| 494 | { |
| 495 | UNUSED_PARAM(throwScope); |
| 496 | UNUSED_PARAM(state); |
| 497 | auto& impl = thisObject.wrapped(); |
| 498 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m11()); |
| 499 | return result; |
| 500 | } |
| 501 | |
| 502 | EncodedJSValue jsDOMMatrixM11(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 503 | { |
| 504 | return IDLAttribute<JSDOMMatrix>::get<jsDOMMatrixM11Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m11" ); |
| 505 | } |
| 506 | |
| 507 | static inline bool setJSDOMMatrixM11Setter(ExecState& state, JSDOMMatrix& thisObject, JSValue value, ThrowScope& throwScope) |
| 508 | { |
| 509 | UNUSED_PARAM(throwScope); |
| 510 | auto& impl = thisObject.wrapped(); |
| 511 | auto nativeValue = convert<IDLUnrestrictedDouble>(state, value); |
| 512 | RETURN_IF_EXCEPTION(throwScope, false); |
| 513 | AttributeSetter::call(state, throwScope, [&] { |
| 514 | return impl.setM11(WTFMove(nativeValue)); |
| 515 | }); |
| 516 | return true; |
| 517 | } |
| 518 | |
| 519 | bool setJSDOMMatrixM11(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 520 | { |
| 521 | return IDLAttribute<JSDOMMatrix>::set<setJSDOMMatrixM11Setter>(*state, thisValue, encodedValue, "m11" ); |
| 522 | } |
| 523 | |
| 524 | static inline JSValue jsDOMMatrixM12Getter(ExecState& state, JSDOMMatrix& thisObject, ThrowScope& throwScope) |
| 525 | { |
| 526 | UNUSED_PARAM(throwScope); |
| 527 | UNUSED_PARAM(state); |
| 528 | auto& impl = thisObject.wrapped(); |
| 529 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m12()); |
| 530 | return result; |
| 531 | } |
| 532 | |
| 533 | EncodedJSValue jsDOMMatrixM12(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 534 | { |
| 535 | return IDLAttribute<JSDOMMatrix>::get<jsDOMMatrixM12Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m12" ); |
| 536 | } |
| 537 | |
| 538 | static inline bool setJSDOMMatrixM12Setter(ExecState& state, JSDOMMatrix& thisObject, JSValue value, ThrowScope& throwScope) |
| 539 | { |
| 540 | UNUSED_PARAM(throwScope); |
| 541 | auto& impl = thisObject.wrapped(); |
| 542 | auto nativeValue = convert<IDLUnrestrictedDouble>(state, value); |
| 543 | RETURN_IF_EXCEPTION(throwScope, false); |
| 544 | AttributeSetter::call(state, throwScope, [&] { |
| 545 | return impl.setM12(WTFMove(nativeValue)); |
| 546 | }); |
| 547 | return true; |
| 548 | } |
| 549 | |
| 550 | bool setJSDOMMatrixM12(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 551 | { |
| 552 | return IDLAttribute<JSDOMMatrix>::set<setJSDOMMatrixM12Setter>(*state, thisValue, encodedValue, "m12" ); |
| 553 | } |
| 554 | |
| 555 | static inline JSValue jsDOMMatrixM13Getter(ExecState& state, JSDOMMatrix& thisObject, ThrowScope& throwScope) |
| 556 | { |
| 557 | UNUSED_PARAM(throwScope); |
| 558 | UNUSED_PARAM(state); |
| 559 | auto& impl = thisObject.wrapped(); |
| 560 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m13()); |
| 561 | return result; |
| 562 | } |
| 563 | |
| 564 | EncodedJSValue jsDOMMatrixM13(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 565 | { |
| 566 | return IDLAttribute<JSDOMMatrix>::get<jsDOMMatrixM13Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m13" ); |
| 567 | } |
| 568 | |
| 569 | static inline bool setJSDOMMatrixM13Setter(ExecState& state, JSDOMMatrix& thisObject, JSValue value, ThrowScope& throwScope) |
| 570 | { |
| 571 | UNUSED_PARAM(throwScope); |
| 572 | auto& impl = thisObject.wrapped(); |
| 573 | auto nativeValue = convert<IDLUnrestrictedDouble>(state, value); |
| 574 | RETURN_IF_EXCEPTION(throwScope, false); |
| 575 | AttributeSetter::call(state, throwScope, [&] { |
| 576 | return impl.setM13(WTFMove(nativeValue)); |
| 577 | }); |
| 578 | return true; |
| 579 | } |
| 580 | |
| 581 | bool setJSDOMMatrixM13(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 582 | { |
| 583 | return IDLAttribute<JSDOMMatrix>::set<setJSDOMMatrixM13Setter>(*state, thisValue, encodedValue, "m13" ); |
| 584 | } |
| 585 | |
| 586 | static inline JSValue jsDOMMatrixM14Getter(ExecState& state, JSDOMMatrix& thisObject, ThrowScope& throwScope) |
| 587 | { |
| 588 | UNUSED_PARAM(throwScope); |
| 589 | UNUSED_PARAM(state); |
| 590 | auto& impl = thisObject.wrapped(); |
| 591 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m14()); |
| 592 | return result; |
| 593 | } |
| 594 | |
| 595 | EncodedJSValue jsDOMMatrixM14(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 596 | { |
| 597 | return IDLAttribute<JSDOMMatrix>::get<jsDOMMatrixM14Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m14" ); |
| 598 | } |
| 599 | |
| 600 | static inline bool setJSDOMMatrixM14Setter(ExecState& state, JSDOMMatrix& thisObject, JSValue value, ThrowScope& throwScope) |
| 601 | { |
| 602 | UNUSED_PARAM(throwScope); |
| 603 | auto& impl = thisObject.wrapped(); |
| 604 | auto nativeValue = convert<IDLUnrestrictedDouble>(state, value); |
| 605 | RETURN_IF_EXCEPTION(throwScope, false); |
| 606 | AttributeSetter::call(state, throwScope, [&] { |
| 607 | return impl.setM14(WTFMove(nativeValue)); |
| 608 | }); |
| 609 | return true; |
| 610 | } |
| 611 | |
| 612 | bool setJSDOMMatrixM14(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 613 | { |
| 614 | return IDLAttribute<JSDOMMatrix>::set<setJSDOMMatrixM14Setter>(*state, thisValue, encodedValue, "m14" ); |
| 615 | } |
| 616 | |
| 617 | static inline JSValue jsDOMMatrixM21Getter(ExecState& state, JSDOMMatrix& thisObject, ThrowScope& throwScope) |
| 618 | { |
| 619 | UNUSED_PARAM(throwScope); |
| 620 | UNUSED_PARAM(state); |
| 621 | auto& impl = thisObject.wrapped(); |
| 622 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m21()); |
| 623 | return result; |
| 624 | } |
| 625 | |
| 626 | EncodedJSValue jsDOMMatrixM21(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 627 | { |
| 628 | return IDLAttribute<JSDOMMatrix>::get<jsDOMMatrixM21Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m21" ); |
| 629 | } |
| 630 | |
| 631 | static inline bool setJSDOMMatrixM21Setter(ExecState& state, JSDOMMatrix& thisObject, JSValue value, ThrowScope& throwScope) |
| 632 | { |
| 633 | UNUSED_PARAM(throwScope); |
| 634 | auto& impl = thisObject.wrapped(); |
| 635 | auto nativeValue = convert<IDLUnrestrictedDouble>(state, value); |
| 636 | RETURN_IF_EXCEPTION(throwScope, false); |
| 637 | AttributeSetter::call(state, throwScope, [&] { |
| 638 | return impl.setM21(WTFMove(nativeValue)); |
| 639 | }); |
| 640 | return true; |
| 641 | } |
| 642 | |
| 643 | bool setJSDOMMatrixM21(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 644 | { |
| 645 | return IDLAttribute<JSDOMMatrix>::set<setJSDOMMatrixM21Setter>(*state, thisValue, encodedValue, "m21" ); |
| 646 | } |
| 647 | |
| 648 | static inline JSValue jsDOMMatrixM22Getter(ExecState& state, JSDOMMatrix& thisObject, ThrowScope& throwScope) |
| 649 | { |
| 650 | UNUSED_PARAM(throwScope); |
| 651 | UNUSED_PARAM(state); |
| 652 | auto& impl = thisObject.wrapped(); |
| 653 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m22()); |
| 654 | return result; |
| 655 | } |
| 656 | |
| 657 | EncodedJSValue jsDOMMatrixM22(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 658 | { |
| 659 | return IDLAttribute<JSDOMMatrix>::get<jsDOMMatrixM22Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m22" ); |
| 660 | } |
| 661 | |
| 662 | static inline bool setJSDOMMatrixM22Setter(ExecState& state, JSDOMMatrix& thisObject, JSValue value, ThrowScope& throwScope) |
| 663 | { |
| 664 | UNUSED_PARAM(throwScope); |
| 665 | auto& impl = thisObject.wrapped(); |
| 666 | auto nativeValue = convert<IDLUnrestrictedDouble>(state, value); |
| 667 | RETURN_IF_EXCEPTION(throwScope, false); |
| 668 | AttributeSetter::call(state, throwScope, [&] { |
| 669 | return impl.setM22(WTFMove(nativeValue)); |
| 670 | }); |
| 671 | return true; |
| 672 | } |
| 673 | |
| 674 | bool setJSDOMMatrixM22(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 675 | { |
| 676 | return IDLAttribute<JSDOMMatrix>::set<setJSDOMMatrixM22Setter>(*state, thisValue, encodedValue, "m22" ); |
| 677 | } |
| 678 | |
| 679 | static inline JSValue jsDOMMatrixM23Getter(ExecState& state, JSDOMMatrix& thisObject, ThrowScope& throwScope) |
| 680 | { |
| 681 | UNUSED_PARAM(throwScope); |
| 682 | UNUSED_PARAM(state); |
| 683 | auto& impl = thisObject.wrapped(); |
| 684 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m23()); |
| 685 | return result; |
| 686 | } |
| 687 | |
| 688 | EncodedJSValue jsDOMMatrixM23(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 689 | { |
| 690 | return IDLAttribute<JSDOMMatrix>::get<jsDOMMatrixM23Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m23" ); |
| 691 | } |
| 692 | |
| 693 | static inline bool setJSDOMMatrixM23Setter(ExecState& state, JSDOMMatrix& thisObject, JSValue value, ThrowScope& throwScope) |
| 694 | { |
| 695 | UNUSED_PARAM(throwScope); |
| 696 | auto& impl = thisObject.wrapped(); |
| 697 | auto nativeValue = convert<IDLUnrestrictedDouble>(state, value); |
| 698 | RETURN_IF_EXCEPTION(throwScope, false); |
| 699 | AttributeSetter::call(state, throwScope, [&] { |
| 700 | return impl.setM23(WTFMove(nativeValue)); |
| 701 | }); |
| 702 | return true; |
| 703 | } |
| 704 | |
| 705 | bool setJSDOMMatrixM23(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 706 | { |
| 707 | return IDLAttribute<JSDOMMatrix>::set<setJSDOMMatrixM23Setter>(*state, thisValue, encodedValue, "m23" ); |
| 708 | } |
| 709 | |
| 710 | static inline JSValue jsDOMMatrixM24Getter(ExecState& state, JSDOMMatrix& thisObject, ThrowScope& throwScope) |
| 711 | { |
| 712 | UNUSED_PARAM(throwScope); |
| 713 | UNUSED_PARAM(state); |
| 714 | auto& impl = thisObject.wrapped(); |
| 715 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m24()); |
| 716 | return result; |
| 717 | } |
| 718 | |
| 719 | EncodedJSValue jsDOMMatrixM24(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 720 | { |
| 721 | return IDLAttribute<JSDOMMatrix>::get<jsDOMMatrixM24Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m24" ); |
| 722 | } |
| 723 | |
| 724 | static inline bool setJSDOMMatrixM24Setter(ExecState& state, JSDOMMatrix& thisObject, JSValue value, ThrowScope& throwScope) |
| 725 | { |
| 726 | UNUSED_PARAM(throwScope); |
| 727 | auto& impl = thisObject.wrapped(); |
| 728 | auto nativeValue = convert<IDLUnrestrictedDouble>(state, value); |
| 729 | RETURN_IF_EXCEPTION(throwScope, false); |
| 730 | AttributeSetter::call(state, throwScope, [&] { |
| 731 | return impl.setM24(WTFMove(nativeValue)); |
| 732 | }); |
| 733 | return true; |
| 734 | } |
| 735 | |
| 736 | bool setJSDOMMatrixM24(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 737 | { |
| 738 | return IDLAttribute<JSDOMMatrix>::set<setJSDOMMatrixM24Setter>(*state, thisValue, encodedValue, "m24" ); |
| 739 | } |
| 740 | |
| 741 | static inline JSValue jsDOMMatrixM31Getter(ExecState& state, JSDOMMatrix& thisObject, ThrowScope& throwScope) |
| 742 | { |
| 743 | UNUSED_PARAM(throwScope); |
| 744 | UNUSED_PARAM(state); |
| 745 | auto& impl = thisObject.wrapped(); |
| 746 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m31()); |
| 747 | return result; |
| 748 | } |
| 749 | |
| 750 | EncodedJSValue jsDOMMatrixM31(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 751 | { |
| 752 | return IDLAttribute<JSDOMMatrix>::get<jsDOMMatrixM31Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m31" ); |
| 753 | } |
| 754 | |
| 755 | static inline bool setJSDOMMatrixM31Setter(ExecState& state, JSDOMMatrix& thisObject, JSValue value, ThrowScope& throwScope) |
| 756 | { |
| 757 | UNUSED_PARAM(throwScope); |
| 758 | auto& impl = thisObject.wrapped(); |
| 759 | auto nativeValue = convert<IDLUnrestrictedDouble>(state, value); |
| 760 | RETURN_IF_EXCEPTION(throwScope, false); |
| 761 | AttributeSetter::call(state, throwScope, [&] { |
| 762 | return impl.setM31(WTFMove(nativeValue)); |
| 763 | }); |
| 764 | return true; |
| 765 | } |
| 766 | |
| 767 | bool setJSDOMMatrixM31(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 768 | { |
| 769 | return IDLAttribute<JSDOMMatrix>::set<setJSDOMMatrixM31Setter>(*state, thisValue, encodedValue, "m31" ); |
| 770 | } |
| 771 | |
| 772 | static inline JSValue jsDOMMatrixM32Getter(ExecState& state, JSDOMMatrix& thisObject, ThrowScope& throwScope) |
| 773 | { |
| 774 | UNUSED_PARAM(throwScope); |
| 775 | UNUSED_PARAM(state); |
| 776 | auto& impl = thisObject.wrapped(); |
| 777 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m32()); |
| 778 | return result; |
| 779 | } |
| 780 | |
| 781 | EncodedJSValue jsDOMMatrixM32(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 782 | { |
| 783 | return IDLAttribute<JSDOMMatrix>::get<jsDOMMatrixM32Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m32" ); |
| 784 | } |
| 785 | |
| 786 | static inline bool setJSDOMMatrixM32Setter(ExecState& state, JSDOMMatrix& thisObject, JSValue value, ThrowScope& throwScope) |
| 787 | { |
| 788 | UNUSED_PARAM(throwScope); |
| 789 | auto& impl = thisObject.wrapped(); |
| 790 | auto nativeValue = convert<IDLUnrestrictedDouble>(state, value); |
| 791 | RETURN_IF_EXCEPTION(throwScope, false); |
| 792 | AttributeSetter::call(state, throwScope, [&] { |
| 793 | return impl.setM32(WTFMove(nativeValue)); |
| 794 | }); |
| 795 | return true; |
| 796 | } |
| 797 | |
| 798 | bool setJSDOMMatrixM32(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 799 | { |
| 800 | return IDLAttribute<JSDOMMatrix>::set<setJSDOMMatrixM32Setter>(*state, thisValue, encodedValue, "m32" ); |
| 801 | } |
| 802 | |
| 803 | static inline JSValue jsDOMMatrixM33Getter(ExecState& state, JSDOMMatrix& thisObject, ThrowScope& throwScope) |
| 804 | { |
| 805 | UNUSED_PARAM(throwScope); |
| 806 | UNUSED_PARAM(state); |
| 807 | auto& impl = thisObject.wrapped(); |
| 808 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m33()); |
| 809 | return result; |
| 810 | } |
| 811 | |
| 812 | EncodedJSValue jsDOMMatrixM33(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 813 | { |
| 814 | return IDLAttribute<JSDOMMatrix>::get<jsDOMMatrixM33Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m33" ); |
| 815 | } |
| 816 | |
| 817 | static inline bool setJSDOMMatrixM33Setter(ExecState& state, JSDOMMatrix& thisObject, JSValue value, ThrowScope& throwScope) |
| 818 | { |
| 819 | UNUSED_PARAM(throwScope); |
| 820 | auto& impl = thisObject.wrapped(); |
| 821 | auto nativeValue = convert<IDLUnrestrictedDouble>(state, value); |
| 822 | RETURN_IF_EXCEPTION(throwScope, false); |
| 823 | AttributeSetter::call(state, throwScope, [&] { |
| 824 | return impl.setM33(WTFMove(nativeValue)); |
| 825 | }); |
| 826 | return true; |
| 827 | } |
| 828 | |
| 829 | bool setJSDOMMatrixM33(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 830 | { |
| 831 | return IDLAttribute<JSDOMMatrix>::set<setJSDOMMatrixM33Setter>(*state, thisValue, encodedValue, "m33" ); |
| 832 | } |
| 833 | |
| 834 | static inline JSValue jsDOMMatrixM34Getter(ExecState& state, JSDOMMatrix& thisObject, ThrowScope& throwScope) |
| 835 | { |
| 836 | UNUSED_PARAM(throwScope); |
| 837 | UNUSED_PARAM(state); |
| 838 | auto& impl = thisObject.wrapped(); |
| 839 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m34()); |
| 840 | return result; |
| 841 | } |
| 842 | |
| 843 | EncodedJSValue jsDOMMatrixM34(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 844 | { |
| 845 | return IDLAttribute<JSDOMMatrix>::get<jsDOMMatrixM34Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m34" ); |
| 846 | } |
| 847 | |
| 848 | static inline bool setJSDOMMatrixM34Setter(ExecState& state, JSDOMMatrix& thisObject, JSValue value, ThrowScope& throwScope) |
| 849 | { |
| 850 | UNUSED_PARAM(throwScope); |
| 851 | auto& impl = thisObject.wrapped(); |
| 852 | auto nativeValue = convert<IDLUnrestrictedDouble>(state, value); |
| 853 | RETURN_IF_EXCEPTION(throwScope, false); |
| 854 | AttributeSetter::call(state, throwScope, [&] { |
| 855 | return impl.setM34(WTFMove(nativeValue)); |
| 856 | }); |
| 857 | return true; |
| 858 | } |
| 859 | |
| 860 | bool setJSDOMMatrixM34(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 861 | { |
| 862 | return IDLAttribute<JSDOMMatrix>::set<setJSDOMMatrixM34Setter>(*state, thisValue, encodedValue, "m34" ); |
| 863 | } |
| 864 | |
| 865 | static inline JSValue jsDOMMatrixM41Getter(ExecState& state, JSDOMMatrix& thisObject, ThrowScope& throwScope) |
| 866 | { |
| 867 | UNUSED_PARAM(throwScope); |
| 868 | UNUSED_PARAM(state); |
| 869 | auto& impl = thisObject.wrapped(); |
| 870 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m41()); |
| 871 | return result; |
| 872 | } |
| 873 | |
| 874 | EncodedJSValue jsDOMMatrixM41(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 875 | { |
| 876 | return IDLAttribute<JSDOMMatrix>::get<jsDOMMatrixM41Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m41" ); |
| 877 | } |
| 878 | |
| 879 | static inline bool setJSDOMMatrixM41Setter(ExecState& state, JSDOMMatrix& thisObject, JSValue value, ThrowScope& throwScope) |
| 880 | { |
| 881 | UNUSED_PARAM(throwScope); |
| 882 | auto& impl = thisObject.wrapped(); |
| 883 | auto nativeValue = convert<IDLUnrestrictedDouble>(state, value); |
| 884 | RETURN_IF_EXCEPTION(throwScope, false); |
| 885 | AttributeSetter::call(state, throwScope, [&] { |
| 886 | return impl.setM41(WTFMove(nativeValue)); |
| 887 | }); |
| 888 | return true; |
| 889 | } |
| 890 | |
| 891 | bool setJSDOMMatrixM41(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 892 | { |
| 893 | return IDLAttribute<JSDOMMatrix>::set<setJSDOMMatrixM41Setter>(*state, thisValue, encodedValue, "m41" ); |
| 894 | } |
| 895 | |
| 896 | static inline JSValue jsDOMMatrixM42Getter(ExecState& state, JSDOMMatrix& thisObject, ThrowScope& throwScope) |
| 897 | { |
| 898 | UNUSED_PARAM(throwScope); |
| 899 | UNUSED_PARAM(state); |
| 900 | auto& impl = thisObject.wrapped(); |
| 901 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m42()); |
| 902 | return result; |
| 903 | } |
| 904 | |
| 905 | EncodedJSValue jsDOMMatrixM42(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 906 | { |
| 907 | return IDLAttribute<JSDOMMatrix>::get<jsDOMMatrixM42Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m42" ); |
| 908 | } |
| 909 | |
| 910 | static inline bool setJSDOMMatrixM42Setter(ExecState& state, JSDOMMatrix& thisObject, JSValue value, ThrowScope& throwScope) |
| 911 | { |
| 912 | UNUSED_PARAM(throwScope); |
| 913 | auto& impl = thisObject.wrapped(); |
| 914 | auto nativeValue = convert<IDLUnrestrictedDouble>(state, value); |
| 915 | RETURN_IF_EXCEPTION(throwScope, false); |
| 916 | AttributeSetter::call(state, throwScope, [&] { |
| 917 | return impl.setM42(WTFMove(nativeValue)); |
| 918 | }); |
| 919 | return true; |
| 920 | } |
| 921 | |
| 922 | bool setJSDOMMatrixM42(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 923 | { |
| 924 | return IDLAttribute<JSDOMMatrix>::set<setJSDOMMatrixM42Setter>(*state, thisValue, encodedValue, "m42" ); |
| 925 | } |
| 926 | |
| 927 | static inline JSValue jsDOMMatrixM43Getter(ExecState& state, JSDOMMatrix& thisObject, ThrowScope& throwScope) |
| 928 | { |
| 929 | UNUSED_PARAM(throwScope); |
| 930 | UNUSED_PARAM(state); |
| 931 | auto& impl = thisObject.wrapped(); |
| 932 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m43()); |
| 933 | return result; |
| 934 | } |
| 935 | |
| 936 | EncodedJSValue jsDOMMatrixM43(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 937 | { |
| 938 | return IDLAttribute<JSDOMMatrix>::get<jsDOMMatrixM43Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m43" ); |
| 939 | } |
| 940 | |
| 941 | static inline bool setJSDOMMatrixM43Setter(ExecState& state, JSDOMMatrix& thisObject, JSValue value, ThrowScope& throwScope) |
| 942 | { |
| 943 | UNUSED_PARAM(throwScope); |
| 944 | auto& impl = thisObject.wrapped(); |
| 945 | auto nativeValue = convert<IDLUnrestrictedDouble>(state, value); |
| 946 | RETURN_IF_EXCEPTION(throwScope, false); |
| 947 | AttributeSetter::call(state, throwScope, [&] { |
| 948 | return impl.setM43(WTFMove(nativeValue)); |
| 949 | }); |
| 950 | return true; |
| 951 | } |
| 952 | |
| 953 | bool setJSDOMMatrixM43(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 954 | { |
| 955 | return IDLAttribute<JSDOMMatrix>::set<setJSDOMMatrixM43Setter>(*state, thisValue, encodedValue, "m43" ); |
| 956 | } |
| 957 | |
| 958 | static inline JSValue jsDOMMatrixM44Getter(ExecState& state, JSDOMMatrix& thisObject, ThrowScope& throwScope) |
| 959 | { |
| 960 | UNUSED_PARAM(throwScope); |
| 961 | UNUSED_PARAM(state); |
| 962 | auto& impl = thisObject.wrapped(); |
| 963 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m44()); |
| 964 | return result; |
| 965 | } |
| 966 | |
| 967 | EncodedJSValue jsDOMMatrixM44(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 968 | { |
| 969 | return IDLAttribute<JSDOMMatrix>::get<jsDOMMatrixM44Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m44" ); |
| 970 | } |
| 971 | |
| 972 | static inline bool setJSDOMMatrixM44Setter(ExecState& state, JSDOMMatrix& thisObject, JSValue value, ThrowScope& throwScope) |
| 973 | { |
| 974 | UNUSED_PARAM(throwScope); |
| 975 | auto& impl = thisObject.wrapped(); |
| 976 | auto nativeValue = convert<IDLUnrestrictedDouble>(state, value); |
| 977 | RETURN_IF_EXCEPTION(throwScope, false); |
| 978 | AttributeSetter::call(state, throwScope, [&] { |
| 979 | return impl.setM44(WTFMove(nativeValue)); |
| 980 | }); |
| 981 | return true; |
| 982 | } |
| 983 | |
| 984 | bool setJSDOMMatrixM44(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 985 | { |
| 986 | return IDLAttribute<JSDOMMatrix>::set<setJSDOMMatrixM44Setter>(*state, thisValue, encodedValue, "m44" ); |
| 987 | } |
| 988 | |
| 989 | static inline JSC::EncodedJSValue jsDOMMatrixConstructorFunctionFromMatrixBody(JSC::ExecState* state, JSC::ThrowScope& throwScope) |
| 990 | { |
| 991 | UNUSED_PARAM(state); |
| 992 | UNUSED_PARAM(throwScope); |
| 993 | auto other = convert<IDLDictionary<DOMMatrixInit>>(*state, state->argument(0)); |
| 994 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 995 | return JSValue::encode(toJSNewlyCreated<IDLInterface<DOMMatrix>>(*state, *jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject()), throwScope, DOMMatrix::fromMatrix(WTFMove(other)))); |
| 996 | } |
| 997 | |
| 998 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixConstructorFunctionFromMatrix(ExecState* state) |
| 999 | { |
| 1000 | return IDLOperation<JSDOMMatrix>::callStatic<jsDOMMatrixConstructorFunctionFromMatrixBody>(*state, "fromMatrix" ); |
| 1001 | } |
| 1002 | |
| 1003 | static inline JSC::EncodedJSValue jsDOMMatrixConstructorFunctionFromFloat32ArrayBody(JSC::ExecState* state, JSC::ThrowScope& throwScope) |
| 1004 | { |
| 1005 | UNUSED_PARAM(state); |
| 1006 | UNUSED_PARAM(throwScope); |
| 1007 | if (UNLIKELY(state->argumentCount() < 1)) |
| 1008 | return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| 1009 | auto array32 = convert<IDLFloat32Array>(*state, state->uncheckedArgument(0), [](JSC::ExecState& state, JSC::ThrowScope& scope) { throwArgumentTypeError(state, scope, 0, "array32" , "DOMMatrix" , "fromFloat32Array" , "Float32Array" ); }); |
| 1010 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1011 | return JSValue::encode(toJSNewlyCreated<IDLInterface<DOMMatrix>>(*state, *jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject()), throwScope, DOMMatrix::fromFloat32Array(array32.releaseNonNull()))); |
| 1012 | } |
| 1013 | |
| 1014 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixConstructorFunctionFromFloat32Array(ExecState* state) |
| 1015 | { |
| 1016 | return IDLOperation<JSDOMMatrix>::callStatic<jsDOMMatrixConstructorFunctionFromFloat32ArrayBody>(*state, "fromFloat32Array" ); |
| 1017 | } |
| 1018 | |
| 1019 | static inline JSC::EncodedJSValue jsDOMMatrixConstructorFunctionFromFloat64ArrayBody(JSC::ExecState* state, JSC::ThrowScope& throwScope) |
| 1020 | { |
| 1021 | UNUSED_PARAM(state); |
| 1022 | UNUSED_PARAM(throwScope); |
| 1023 | if (UNLIKELY(state->argumentCount() < 1)) |
| 1024 | return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| 1025 | auto array64 = convert<IDLFloat64Array>(*state, state->uncheckedArgument(0), [](JSC::ExecState& state, JSC::ThrowScope& scope) { throwArgumentTypeError(state, scope, 0, "array64" , "DOMMatrix" , "fromFloat64Array" , "Float64Array" ); }); |
| 1026 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1027 | return JSValue::encode(toJSNewlyCreated<IDLInterface<DOMMatrix>>(*state, *jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject()), throwScope, DOMMatrix::fromFloat64Array(array64.releaseNonNull()))); |
| 1028 | } |
| 1029 | |
| 1030 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixConstructorFunctionFromFloat64Array(ExecState* state) |
| 1031 | { |
| 1032 | return IDLOperation<JSDOMMatrix>::callStatic<jsDOMMatrixConstructorFunctionFromFloat64ArrayBody>(*state, "fromFloat64Array" ); |
| 1033 | } |
| 1034 | |
| 1035 | static inline JSC::EncodedJSValue jsDOMMatrixPrototypeFunctionMultiplySelfBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrix>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 1036 | { |
| 1037 | UNUSED_PARAM(state); |
| 1038 | UNUSED_PARAM(throwScope); |
| 1039 | auto& impl = castedThis->wrapped(); |
| 1040 | auto other = convert<IDLDictionary<DOMMatrixInit>>(*state, state->argument(0)); |
| 1041 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1042 | return JSValue::encode(toJS<IDLInterface<DOMMatrix>>(*state, *castedThis->globalObject(), throwScope, impl.multiplySelf(WTFMove(other)))); |
| 1043 | } |
| 1044 | |
| 1045 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixPrototypeFunctionMultiplySelf(ExecState* state) |
| 1046 | { |
| 1047 | return IDLOperation<JSDOMMatrix>::call<jsDOMMatrixPrototypeFunctionMultiplySelfBody>(*state, "multiplySelf" ); |
| 1048 | } |
| 1049 | |
| 1050 | static inline JSC::EncodedJSValue jsDOMMatrixPrototypeFunctionPreMultiplySelfBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrix>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 1051 | { |
| 1052 | UNUSED_PARAM(state); |
| 1053 | UNUSED_PARAM(throwScope); |
| 1054 | auto& impl = castedThis->wrapped(); |
| 1055 | auto other = convert<IDLDictionary<DOMMatrixInit>>(*state, state->argument(0)); |
| 1056 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1057 | return JSValue::encode(toJS<IDLInterface<DOMMatrix>>(*state, *castedThis->globalObject(), throwScope, impl.preMultiplySelf(WTFMove(other)))); |
| 1058 | } |
| 1059 | |
| 1060 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixPrototypeFunctionPreMultiplySelf(ExecState* state) |
| 1061 | { |
| 1062 | return IDLOperation<JSDOMMatrix>::call<jsDOMMatrixPrototypeFunctionPreMultiplySelfBody>(*state, "preMultiplySelf" ); |
| 1063 | } |
| 1064 | |
| 1065 | static inline JSC::EncodedJSValue jsDOMMatrixPrototypeFunctionTranslateSelfBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrix>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 1066 | { |
| 1067 | UNUSED_PARAM(state); |
| 1068 | UNUSED_PARAM(throwScope); |
| 1069 | auto& impl = castedThis->wrapped(); |
| 1070 | auto tx = state->argument(0).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(0)); |
| 1071 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1072 | auto ty = state->argument(1).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(1)); |
| 1073 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1074 | auto tz = state->argument(2).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(2)); |
| 1075 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1076 | return JSValue::encode(toJS<IDLInterface<DOMMatrix>>(*state, *castedThis->globalObject(), impl.translateSelf(WTFMove(tx), WTFMove(ty), WTFMove(tz)))); |
| 1077 | } |
| 1078 | |
| 1079 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixPrototypeFunctionTranslateSelf(ExecState* state) |
| 1080 | { |
| 1081 | return IDLOperation<JSDOMMatrix>::call<jsDOMMatrixPrototypeFunctionTranslateSelfBody>(*state, "translateSelf" ); |
| 1082 | } |
| 1083 | |
| 1084 | static inline JSC::EncodedJSValue jsDOMMatrixPrototypeFunctionScaleSelfBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrix>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 1085 | { |
| 1086 | UNUSED_PARAM(state); |
| 1087 | UNUSED_PARAM(throwScope); |
| 1088 | auto& impl = castedThis->wrapped(); |
| 1089 | auto scaleX = state->argument(0).isUndefined() ? 1 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(0)); |
| 1090 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1091 | auto scaleY = state->argument(1).isUndefined() ? Optional<Converter<IDLUnrestrictedDouble>::ReturnType>() : Optional<Converter<IDLUnrestrictedDouble>::ReturnType>(convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(1))); |
| 1092 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1093 | auto scaleZ = state->argument(2).isUndefined() ? 1 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(2)); |
| 1094 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1095 | auto originX = state->argument(3).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(3)); |
| 1096 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1097 | auto originY = state->argument(4).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(4)); |
| 1098 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1099 | auto originZ = state->argument(5).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(5)); |
| 1100 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1101 | return JSValue::encode(toJS<IDLInterface<DOMMatrix>>(*state, *castedThis->globalObject(), impl.scaleSelf(WTFMove(scaleX), WTFMove(scaleY), WTFMove(scaleZ), WTFMove(originX), WTFMove(originY), WTFMove(originZ)))); |
| 1102 | } |
| 1103 | |
| 1104 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixPrototypeFunctionScaleSelf(ExecState* state) |
| 1105 | { |
| 1106 | return IDLOperation<JSDOMMatrix>::call<jsDOMMatrixPrototypeFunctionScaleSelfBody>(*state, "scaleSelf" ); |
| 1107 | } |
| 1108 | |
| 1109 | static inline JSC::EncodedJSValue jsDOMMatrixPrototypeFunctionScale3dSelfBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrix>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 1110 | { |
| 1111 | UNUSED_PARAM(state); |
| 1112 | UNUSED_PARAM(throwScope); |
| 1113 | auto& impl = castedThis->wrapped(); |
| 1114 | auto scale = state->argument(0).isUndefined() ? 1 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(0)); |
| 1115 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1116 | auto originX = state->argument(1).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(1)); |
| 1117 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1118 | auto originY = state->argument(2).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(2)); |
| 1119 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1120 | auto originZ = state->argument(3).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(3)); |
| 1121 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1122 | return JSValue::encode(toJS<IDLInterface<DOMMatrix>>(*state, *castedThis->globalObject(), impl.scale3dSelf(WTFMove(scale), WTFMove(originX), WTFMove(originY), WTFMove(originZ)))); |
| 1123 | } |
| 1124 | |
| 1125 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixPrototypeFunctionScale3dSelf(ExecState* state) |
| 1126 | { |
| 1127 | return IDLOperation<JSDOMMatrix>::call<jsDOMMatrixPrototypeFunctionScale3dSelfBody>(*state, "scale3dSelf" ); |
| 1128 | } |
| 1129 | |
| 1130 | static inline JSC::EncodedJSValue jsDOMMatrixPrototypeFunctionRotateSelfBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrix>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 1131 | { |
| 1132 | UNUSED_PARAM(state); |
| 1133 | UNUSED_PARAM(throwScope); |
| 1134 | auto& impl = castedThis->wrapped(); |
| 1135 | auto rotX = state->argument(0).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(0)); |
| 1136 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1137 | auto rotY = state->argument(1).isUndefined() ? Optional<Converter<IDLUnrestrictedDouble>::ReturnType>() : Optional<Converter<IDLUnrestrictedDouble>::ReturnType>(convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(1))); |
| 1138 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1139 | auto rotZ = state->argument(2).isUndefined() ? Optional<Converter<IDLUnrestrictedDouble>::ReturnType>() : Optional<Converter<IDLUnrestrictedDouble>::ReturnType>(convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(2))); |
| 1140 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1141 | return JSValue::encode(toJS<IDLInterface<DOMMatrix>>(*state, *castedThis->globalObject(), impl.rotateSelf(WTFMove(rotX), WTFMove(rotY), WTFMove(rotZ)))); |
| 1142 | } |
| 1143 | |
| 1144 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixPrototypeFunctionRotateSelf(ExecState* state) |
| 1145 | { |
| 1146 | return IDLOperation<JSDOMMatrix>::call<jsDOMMatrixPrototypeFunctionRotateSelfBody>(*state, "rotateSelf" ); |
| 1147 | } |
| 1148 | |
| 1149 | static inline JSC::EncodedJSValue jsDOMMatrixPrototypeFunctionRotateFromVectorSelfBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrix>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 1150 | { |
| 1151 | UNUSED_PARAM(state); |
| 1152 | UNUSED_PARAM(throwScope); |
| 1153 | auto& impl = castedThis->wrapped(); |
| 1154 | auto x = state->argument(0).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(0)); |
| 1155 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1156 | auto y = state->argument(1).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(1)); |
| 1157 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1158 | return JSValue::encode(toJS<IDLInterface<DOMMatrix>>(*state, *castedThis->globalObject(), impl.rotateFromVectorSelf(WTFMove(x), WTFMove(y)))); |
| 1159 | } |
| 1160 | |
| 1161 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixPrototypeFunctionRotateFromVectorSelf(ExecState* state) |
| 1162 | { |
| 1163 | return IDLOperation<JSDOMMatrix>::call<jsDOMMatrixPrototypeFunctionRotateFromVectorSelfBody>(*state, "rotateFromVectorSelf" ); |
| 1164 | } |
| 1165 | |
| 1166 | static inline JSC::EncodedJSValue jsDOMMatrixPrototypeFunctionRotateAxisAngleSelfBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrix>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 1167 | { |
| 1168 | UNUSED_PARAM(state); |
| 1169 | UNUSED_PARAM(throwScope); |
| 1170 | auto& impl = castedThis->wrapped(); |
| 1171 | auto x = state->argument(0).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(0)); |
| 1172 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1173 | auto y = state->argument(1).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(1)); |
| 1174 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1175 | auto z = state->argument(2).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(2)); |
| 1176 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1177 | auto angle = state->argument(3).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(3)); |
| 1178 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1179 | return JSValue::encode(toJS<IDLInterface<DOMMatrix>>(*state, *castedThis->globalObject(), impl.rotateAxisAngleSelf(WTFMove(x), WTFMove(y), WTFMove(z), WTFMove(angle)))); |
| 1180 | } |
| 1181 | |
| 1182 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixPrototypeFunctionRotateAxisAngleSelf(ExecState* state) |
| 1183 | { |
| 1184 | return IDLOperation<JSDOMMatrix>::call<jsDOMMatrixPrototypeFunctionRotateAxisAngleSelfBody>(*state, "rotateAxisAngleSelf" ); |
| 1185 | } |
| 1186 | |
| 1187 | static inline JSC::EncodedJSValue jsDOMMatrixPrototypeFunctionSkewXSelfBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrix>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 1188 | { |
| 1189 | UNUSED_PARAM(state); |
| 1190 | UNUSED_PARAM(throwScope); |
| 1191 | auto& impl = castedThis->wrapped(); |
| 1192 | auto sx = state->argument(0).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(0)); |
| 1193 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1194 | return JSValue::encode(toJS<IDLInterface<DOMMatrix>>(*state, *castedThis->globalObject(), impl.skewXSelf(WTFMove(sx)))); |
| 1195 | } |
| 1196 | |
| 1197 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixPrototypeFunctionSkewXSelf(ExecState* state) |
| 1198 | { |
| 1199 | return IDLOperation<JSDOMMatrix>::call<jsDOMMatrixPrototypeFunctionSkewXSelfBody>(*state, "skewXSelf" ); |
| 1200 | } |
| 1201 | |
| 1202 | static inline JSC::EncodedJSValue jsDOMMatrixPrototypeFunctionSkewYSelfBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrix>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 1203 | { |
| 1204 | UNUSED_PARAM(state); |
| 1205 | UNUSED_PARAM(throwScope); |
| 1206 | auto& impl = castedThis->wrapped(); |
| 1207 | auto sy = state->argument(0).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(0)); |
| 1208 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1209 | return JSValue::encode(toJS<IDLInterface<DOMMatrix>>(*state, *castedThis->globalObject(), impl.skewYSelf(WTFMove(sy)))); |
| 1210 | } |
| 1211 | |
| 1212 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixPrototypeFunctionSkewYSelf(ExecState* state) |
| 1213 | { |
| 1214 | return IDLOperation<JSDOMMatrix>::call<jsDOMMatrixPrototypeFunctionSkewYSelfBody>(*state, "skewYSelf" ); |
| 1215 | } |
| 1216 | |
| 1217 | static inline JSC::EncodedJSValue jsDOMMatrixPrototypeFunctionInvertSelfBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrix>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 1218 | { |
| 1219 | UNUSED_PARAM(state); |
| 1220 | UNUSED_PARAM(throwScope); |
| 1221 | auto& impl = castedThis->wrapped(); |
| 1222 | return JSValue::encode(toJS<IDLInterface<DOMMatrix>>(*state, *castedThis->globalObject(), impl.invertSelf())); |
| 1223 | } |
| 1224 | |
| 1225 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixPrototypeFunctionInvertSelf(ExecState* state) |
| 1226 | { |
| 1227 | return IDLOperation<JSDOMMatrix>::call<jsDOMMatrixPrototypeFunctionInvertSelfBody>(*state, "invertSelf" ); |
| 1228 | } |
| 1229 | |
| 1230 | static inline JSC::EncodedJSValue jsDOMMatrixPrototypeFunctionSetMatrixValueBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrix>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 1231 | { |
| 1232 | UNUSED_PARAM(state); |
| 1233 | UNUSED_PARAM(throwScope); |
| 1234 | auto& impl = castedThis->wrapped(); |
| 1235 | if (UNLIKELY(state->argumentCount() < 1)) |
| 1236 | return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| 1237 | auto transformList = convert<IDLDOMString>(*state, state->uncheckedArgument(0)); |
| 1238 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 1239 | return JSValue::encode(toJS<IDLInterface<DOMMatrix>>(*state, *castedThis->globalObject(), throwScope, impl.setMatrixValueForBindings(WTFMove(transformList)))); |
| 1240 | } |
| 1241 | |
| 1242 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixPrototypeFunctionSetMatrixValue(ExecState* state) |
| 1243 | { |
| 1244 | return IDLOperation<JSDOMMatrix>::call<jsDOMMatrixPrototypeFunctionSetMatrixValueBody>(*state, "setMatrixValue" ); |
| 1245 | } |
| 1246 | |
| 1247 | void JSDOMMatrix::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) |
| 1248 | { |
| 1249 | auto* thisObject = jsCast<JSDOMMatrix*>(cell); |
| 1250 | builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); |
| 1251 | if (thisObject->scriptExecutionContext()) |
| 1252 | builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); |
| 1253 | Base::heapSnapshot(cell, builder); |
| 1254 | } |
| 1255 | |
| 1256 | JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref<DOMMatrix>&& impl) |
| 1257 | { |
| 1258 | // If you hit this failure the interface definition has the ImplementationLacksVTable |
| 1259 | // attribute. You should remove that attribute. If the class has subclasses |
| 1260 | // that may be passed through this toJS() function you should use the SkipVTableValidation |
| 1261 | // attribute to DOMMatrix. |
| 1262 | static_assert(!std::is_polymorphic<DOMMatrix>::value, "DOMMatrix is polymorphic but the IDL claims it is not" ); |
| 1263 | return createWrapper<DOMMatrix>(globalObject, WTFMove(impl)); |
| 1264 | } |
| 1265 | |
| 1266 | JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, DOMMatrix& impl) |
| 1267 | { |
| 1268 | return wrap(state, globalObject, impl); |
| 1269 | } |
| 1270 | |
| 1271 | |
| 1272 | } |
| 1273 | |