| 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 "JSDOMMatrixReadOnly.h" |
| 23 | |
| 24 | #include "JSDOMAttribute.h" |
| 25 | #include "JSDOMBinding.h" |
| 26 | #include "JSDOMConstructor.h" |
| 27 | #include "JSDOMConvertBoolean.h" |
| 28 | #include "JSDOMConvertBufferSource.h" |
| 29 | #include "JSDOMConvertDictionary.h" |
| 30 | #include "JSDOMConvertInterface.h" |
| 31 | #include "JSDOMConvertNumbers.h" |
| 32 | #include "JSDOMConvertSequences.h" |
| 33 | #include "JSDOMConvertStrings.h" |
| 34 | #include "JSDOMConvertUnion.h" |
| 35 | #include "JSDOMExceptionHandling.h" |
| 36 | #include "JSDOMGlobalObject.h" |
| 37 | #include "JSDOMMatrix.h" |
| 38 | #include "JSDOMMatrixInit.h" |
| 39 | #include "JSDOMMatrixReadOnly.h" |
| 40 | #include "JSDOMOperation.h" |
| 41 | #include "JSDOMPoint.h" |
| 42 | #include "JSDOMPointInit.h" |
| 43 | #include "JSDOMWrapperCache.h" |
| 44 | #include "ScriptExecutionContext.h" |
| 45 | #include <JavaScriptCore/FunctionPrototype.h> |
| 46 | #include <JavaScriptCore/HeapSnapshotBuilder.h> |
| 47 | #include <JavaScriptCore/JSArray.h> |
| 48 | #include <JavaScriptCore/JSCInlines.h> |
| 49 | #include <JavaScriptCore/ObjectConstructor.h> |
| 50 | #include <wtf/GetPtr.h> |
| 51 | #include <wtf/PointerPreparations.h> |
| 52 | #include <wtf/URL.h> |
| 53 | #include <wtf/Variant.h> |
| 54 | |
| 55 | |
| 56 | namespace WebCore { |
| 57 | using namespace JSC; |
| 58 | |
| 59 | // Functions |
| 60 | |
| 61 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyConstructorFunctionFromMatrix(JSC::ExecState*); |
| 62 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyConstructorFunctionFromFloat32Array(JSC::ExecState*); |
| 63 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyConstructorFunctionFromFloat64Array(JSC::ExecState*); |
| 64 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionTranslate(JSC::ExecState*); |
| 65 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionScale(JSC::ExecState*); |
| 66 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionScale3d(JSC::ExecState*); |
| 67 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionRotate(JSC::ExecState*); |
| 68 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionRotateFromVector(JSC::ExecState*); |
| 69 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionRotateAxisAngle(JSC::ExecState*); |
| 70 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionSkewX(JSC::ExecState*); |
| 71 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionSkewY(JSC::ExecState*); |
| 72 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionMultiply(JSC::ExecState*); |
| 73 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionFlipX(JSC::ExecState*); |
| 74 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionFlipY(JSC::ExecState*); |
| 75 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionInverse(JSC::ExecState*); |
| 76 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionTransformPoint(JSC::ExecState*); |
| 77 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionToFloat32Array(JSC::ExecState*); |
| 78 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionToFloat64Array(JSC::ExecState*); |
| 79 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionToString(JSC::ExecState*); |
| 80 | JSC::EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionToJSON(JSC::ExecState*); |
| 81 | |
| 82 | // Attributes |
| 83 | |
| 84 | JSC::EncodedJSValue jsDOMMatrixReadOnlyConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 85 | bool setJSDOMMatrixReadOnlyConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 86 | JSC::EncodedJSValue jsDOMMatrixReadOnlyA(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 87 | JSC::EncodedJSValue jsDOMMatrixReadOnlyB(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 88 | JSC::EncodedJSValue jsDOMMatrixReadOnlyC(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 89 | JSC::EncodedJSValue jsDOMMatrixReadOnlyD(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 90 | JSC::EncodedJSValue jsDOMMatrixReadOnlyE(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 91 | JSC::EncodedJSValue jsDOMMatrixReadOnlyF(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 92 | JSC::EncodedJSValue jsDOMMatrixReadOnlyM11(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 93 | JSC::EncodedJSValue jsDOMMatrixReadOnlyM12(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 94 | JSC::EncodedJSValue jsDOMMatrixReadOnlyM13(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 95 | JSC::EncodedJSValue jsDOMMatrixReadOnlyM14(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 96 | JSC::EncodedJSValue jsDOMMatrixReadOnlyM21(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 97 | JSC::EncodedJSValue jsDOMMatrixReadOnlyM22(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 98 | JSC::EncodedJSValue jsDOMMatrixReadOnlyM23(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 99 | JSC::EncodedJSValue jsDOMMatrixReadOnlyM24(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 100 | JSC::EncodedJSValue jsDOMMatrixReadOnlyM31(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 101 | JSC::EncodedJSValue jsDOMMatrixReadOnlyM32(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 102 | JSC::EncodedJSValue jsDOMMatrixReadOnlyM33(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 103 | JSC::EncodedJSValue jsDOMMatrixReadOnlyM34(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 104 | JSC::EncodedJSValue jsDOMMatrixReadOnlyM41(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 105 | JSC::EncodedJSValue jsDOMMatrixReadOnlyM42(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 106 | JSC::EncodedJSValue jsDOMMatrixReadOnlyM43(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 107 | JSC::EncodedJSValue jsDOMMatrixReadOnlyM44(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 108 | JSC::EncodedJSValue jsDOMMatrixReadOnlyIs2D(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 109 | JSC::EncodedJSValue jsDOMMatrixReadOnlyIsIdentity(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 110 | |
| 111 | class JSDOMMatrixReadOnlyPrototype : public JSC::JSNonFinalObject { |
| 112 | public: |
| 113 | using Base = JSC::JSNonFinalObject; |
| 114 | static JSDOMMatrixReadOnlyPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) |
| 115 | { |
| 116 | JSDOMMatrixReadOnlyPrototype* ptr = new (NotNull, JSC::allocateCell<JSDOMMatrixReadOnlyPrototype>(vm.heap)) JSDOMMatrixReadOnlyPrototype(vm, globalObject, structure); |
| 117 | ptr->finishCreation(vm); |
| 118 | return ptr; |
| 119 | } |
| 120 | |
| 121 | DECLARE_INFO; |
| 122 | static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) |
| 123 | { |
| 124 | return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); |
| 125 | } |
| 126 | |
| 127 | private: |
| 128 | JSDOMMatrixReadOnlyPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) |
| 129 | : JSC::JSNonFinalObject(vm, structure) |
| 130 | { |
| 131 | } |
| 132 | |
| 133 | void finishCreation(JSC::VM&); |
| 134 | }; |
| 135 | |
| 136 | using JSDOMMatrixReadOnlyConstructor = JSDOMConstructor<JSDOMMatrixReadOnly>; |
| 137 | |
| 138 | /* Hash table for constructor */ |
| 139 | |
| 140 | static const HashTableValue JSDOMMatrixReadOnlyConstructorTableValues[] = |
| 141 | { |
| 142 | { "fromMatrix" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixReadOnlyConstructorFunctionFromMatrix), (intptr_t) (0) } }, |
| 143 | { "fromFloat32Array" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixReadOnlyConstructorFunctionFromFloat32Array), (intptr_t) (1) } }, |
| 144 | { "fromFloat64Array" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixReadOnlyConstructorFunctionFromFloat64Array), (intptr_t) (1) } }, |
| 145 | }; |
| 146 | |
| 147 | template<> EncodedJSValue JSC_HOST_CALL JSDOMMatrixReadOnlyConstructor::construct(ExecState* state) |
| 148 | { |
| 149 | VM& vm = state->vm(); |
| 150 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
| 151 | UNUSED_PARAM(throwScope); |
| 152 | auto* castedThis = jsCast<JSDOMMatrixReadOnlyConstructor*>(state->jsCallee()); |
| 153 | ASSERT(castedThis); |
| 154 | auto* context = castedThis->scriptExecutionContext(); |
| 155 | if (UNLIKELY(!context)) |
| 156 | return throwConstructorScriptExecutionContextUnavailableError(*state, throwScope, "DOMMatrixReadOnly" ); |
| 157 | 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))); |
| 158 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 159 | auto object = DOMMatrixReadOnly::create(*context, WTFMove(init)); |
| 160 | return JSValue::encode(toJSNewlyCreated<IDLInterface<DOMMatrixReadOnly>>(*state, *castedThis->globalObject(), throwScope, WTFMove(object))); |
| 161 | } |
| 162 | |
| 163 | template<> JSValue JSDOMMatrixReadOnlyConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject) |
| 164 | { |
| 165 | UNUSED_PARAM(vm); |
| 166 | return globalObject.functionPrototype(); |
| 167 | } |
| 168 | |
| 169 | template<> void JSDOMMatrixReadOnlyConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) |
| 170 | { |
| 171 | putDirect(vm, vm.propertyNames->prototype, JSDOMMatrixReadOnly::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
| 172 | putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("DOMMatrixReadOnly"_s )), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
| 173 | putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
| 174 | reifyStaticProperties(vm, JSDOMMatrixReadOnly::info(), JSDOMMatrixReadOnlyConstructorTableValues, *this); |
| 175 | } |
| 176 | |
| 177 | template<> const ClassInfo JSDOMMatrixReadOnlyConstructor::s_info = { "DOMMatrixReadOnly" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSDOMMatrixReadOnlyConstructor) }; |
| 178 | |
| 179 | /* Hash table for prototype */ |
| 180 | |
| 181 | static const HashTableValue JSDOMMatrixReadOnlyPrototypeTableValues[] = |
| 182 | { |
| 183 | { "constructor" , static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixReadOnlyConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDOMMatrixReadOnlyConstructor) } }, |
| 184 | { "a" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixReadOnlyA), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 185 | { "b" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixReadOnlyB), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 186 | { "c" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixReadOnlyC), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 187 | { "d" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixReadOnlyD), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 188 | { "e" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixReadOnlyE), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 189 | { "f" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixReadOnlyF), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 190 | { "m11" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixReadOnlyM11), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 191 | { "m12" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixReadOnlyM12), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 192 | { "m13" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixReadOnlyM13), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 193 | { "m14" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixReadOnlyM14), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 194 | { "m21" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixReadOnlyM21), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 195 | { "m22" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixReadOnlyM22), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 196 | { "m23" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixReadOnlyM23), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 197 | { "m24" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixReadOnlyM24), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 198 | { "m31" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixReadOnlyM31), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 199 | { "m32" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixReadOnlyM32), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 200 | { "m33" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixReadOnlyM33), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 201 | { "m34" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixReadOnlyM34), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 202 | { "m41" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixReadOnlyM41), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 203 | { "m42" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixReadOnlyM42), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 204 | { "m43" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixReadOnlyM43), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 205 | { "m44" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixReadOnlyM44), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 206 | { "is2D" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixReadOnlyIs2D), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 207 | { "isIdentity" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMMatrixReadOnlyIsIdentity), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 208 | { "translate" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixReadOnlyPrototypeFunctionTranslate), (intptr_t) (0) } }, |
| 209 | { "scale" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixReadOnlyPrototypeFunctionScale), (intptr_t) (0) } }, |
| 210 | { "scale3d" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixReadOnlyPrototypeFunctionScale3d), (intptr_t) (0) } }, |
| 211 | { "rotate" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixReadOnlyPrototypeFunctionRotate), (intptr_t) (0) } }, |
| 212 | { "rotateFromVector" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixReadOnlyPrototypeFunctionRotateFromVector), (intptr_t) (0) } }, |
| 213 | { "rotateAxisAngle" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixReadOnlyPrototypeFunctionRotateAxisAngle), (intptr_t) (0) } }, |
| 214 | { "skewX" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixReadOnlyPrototypeFunctionSkewX), (intptr_t) (0) } }, |
| 215 | { "skewY" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixReadOnlyPrototypeFunctionSkewY), (intptr_t) (0) } }, |
| 216 | { "multiply" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixReadOnlyPrototypeFunctionMultiply), (intptr_t) (0) } }, |
| 217 | { "flipX" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixReadOnlyPrototypeFunctionFlipX), (intptr_t) (0) } }, |
| 218 | { "flipY" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixReadOnlyPrototypeFunctionFlipY), (intptr_t) (0) } }, |
| 219 | { "inverse" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixReadOnlyPrototypeFunctionInverse), (intptr_t) (0) } }, |
| 220 | { "transformPoint" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixReadOnlyPrototypeFunctionTransformPoint), (intptr_t) (0) } }, |
| 221 | { "toFloat32Array" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixReadOnlyPrototypeFunctionToFloat32Array), (intptr_t) (0) } }, |
| 222 | { "toFloat64Array" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixReadOnlyPrototypeFunctionToFloat64Array), (intptr_t) (0) } }, |
| 223 | { "toString" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixReadOnlyPrototypeFunctionToString), (intptr_t) (0) } }, |
| 224 | { "toJSON" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDOMMatrixReadOnlyPrototypeFunctionToJSON), (intptr_t) (0) } }, |
| 225 | }; |
| 226 | |
| 227 | const ClassInfo JSDOMMatrixReadOnlyPrototype::s_info = { "DOMMatrixReadOnlyPrototype" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSDOMMatrixReadOnlyPrototype) }; |
| 228 | |
| 229 | void JSDOMMatrixReadOnlyPrototype::finishCreation(VM& vm) |
| 230 | { |
| 231 | Base::finishCreation(vm); |
| 232 | reifyStaticProperties(vm, JSDOMMatrixReadOnly::info(), JSDOMMatrixReadOnlyPrototypeTableValues, *this); |
| 233 | bool hasDisabledRuntimeProperties = false; |
| 234 | if (!jsCast<JSDOMGlobalObject*>(globalObject())->scriptExecutionContext()->isDocument()) { |
| 235 | hasDisabledRuntimeProperties = true; |
| 236 | auto propertyName = Identifier::fromString(&vm, reinterpret_cast<const LChar*>("toString" ), strlen("toString" )); |
| 237 | VM::DeletePropertyModeScope scope(vm, VM::DeletePropertyMode::IgnoreConfigurable); |
| 238 | JSObject::deleteProperty(this, globalObject()->globalExec(), propertyName); |
| 239 | } |
| 240 | if (hasDisabledRuntimeProperties && structure()->isDictionary()) |
| 241 | flattenDictionaryObject(vm); |
| 242 | } |
| 243 | |
| 244 | const ClassInfo JSDOMMatrixReadOnly::s_info = { "DOMMatrixReadOnly" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSDOMMatrixReadOnly) }; |
| 245 | |
| 246 | JSDOMMatrixReadOnly::JSDOMMatrixReadOnly(Structure* structure, JSDOMGlobalObject& globalObject, Ref<DOMMatrixReadOnly>&& impl) |
| 247 | : JSDOMWrapper<DOMMatrixReadOnly>(structure, globalObject, WTFMove(impl)) |
| 248 | { |
| 249 | } |
| 250 | |
| 251 | void JSDOMMatrixReadOnly::finishCreation(VM& vm) |
| 252 | { |
| 253 | Base::finishCreation(vm); |
| 254 | ASSERT(inherits(vm, info())); |
| 255 | |
| 256 | } |
| 257 | |
| 258 | JSObject* JSDOMMatrixReadOnly::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) |
| 259 | { |
| 260 | return JSDOMMatrixReadOnlyPrototype::create(vm, &globalObject, JSDOMMatrixReadOnlyPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); |
| 261 | } |
| 262 | |
| 263 | JSObject* JSDOMMatrixReadOnly::prototype(VM& vm, JSDOMGlobalObject& globalObject) |
| 264 | { |
| 265 | return getDOMPrototype<JSDOMMatrixReadOnly>(vm, globalObject); |
| 266 | } |
| 267 | |
| 268 | JSValue JSDOMMatrixReadOnly::getConstructor(VM& vm, const JSGlobalObject* globalObject) |
| 269 | { |
| 270 | return getDOMConstructor<JSDOMMatrixReadOnlyConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject)); |
| 271 | } |
| 272 | |
| 273 | void JSDOMMatrixReadOnly::destroy(JSC::JSCell* cell) |
| 274 | { |
| 275 | JSDOMMatrixReadOnly* thisObject = static_cast<JSDOMMatrixReadOnly*>(cell); |
| 276 | thisObject->JSDOMMatrixReadOnly::~JSDOMMatrixReadOnly(); |
| 277 | } |
| 278 | |
| 279 | template<> inline JSDOMMatrixReadOnly* IDLAttribute<JSDOMMatrixReadOnly>::cast(ExecState& state, EncodedJSValue thisValue) |
| 280 | { |
| 281 | return jsDynamicCast<JSDOMMatrixReadOnly*>(state.vm(), JSValue::decode(thisValue)); |
| 282 | } |
| 283 | |
| 284 | template<> inline JSDOMMatrixReadOnly* IDLOperation<JSDOMMatrixReadOnly>::cast(ExecState& state) |
| 285 | { |
| 286 | return jsDynamicCast<JSDOMMatrixReadOnly*>(state.vm(), state.thisValue()); |
| 287 | } |
| 288 | |
| 289 | EncodedJSValue jsDOMMatrixReadOnlyConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 290 | { |
| 291 | VM& vm = state->vm(); |
| 292 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
| 293 | auto* prototype = jsDynamicCast<JSDOMMatrixReadOnlyPrototype*>(vm, JSValue::decode(thisValue)); |
| 294 | if (UNLIKELY(!prototype)) |
| 295 | return throwVMTypeError(state, throwScope); |
| 296 | return JSValue::encode(JSDOMMatrixReadOnly::getConstructor(state->vm(), prototype->globalObject())); |
| 297 | } |
| 298 | |
| 299 | bool setJSDOMMatrixReadOnlyConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 300 | { |
| 301 | VM& vm = state->vm(); |
| 302 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
| 303 | auto* prototype = jsDynamicCast<JSDOMMatrixReadOnlyPrototype*>(vm, JSValue::decode(thisValue)); |
| 304 | if (UNLIKELY(!prototype)) { |
| 305 | throwVMTypeError(state, throwScope); |
| 306 | return false; |
| 307 | } |
| 308 | // Shadowing a built-in constructor |
| 309 | return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue)); |
| 310 | } |
| 311 | |
| 312 | static inline JSValue jsDOMMatrixReadOnlyAGetter(ExecState& state, JSDOMMatrixReadOnly& thisObject, ThrowScope& throwScope) |
| 313 | { |
| 314 | UNUSED_PARAM(throwScope); |
| 315 | UNUSED_PARAM(state); |
| 316 | auto& impl = thisObject.wrapped(); |
| 317 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.a()); |
| 318 | return result; |
| 319 | } |
| 320 | |
| 321 | EncodedJSValue jsDOMMatrixReadOnlyA(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 322 | { |
| 323 | return IDLAttribute<JSDOMMatrixReadOnly>::get<jsDOMMatrixReadOnlyAGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "a" ); |
| 324 | } |
| 325 | |
| 326 | static inline JSValue jsDOMMatrixReadOnlyBGetter(ExecState& state, JSDOMMatrixReadOnly& thisObject, ThrowScope& throwScope) |
| 327 | { |
| 328 | UNUSED_PARAM(throwScope); |
| 329 | UNUSED_PARAM(state); |
| 330 | auto& impl = thisObject.wrapped(); |
| 331 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.b()); |
| 332 | return result; |
| 333 | } |
| 334 | |
| 335 | EncodedJSValue jsDOMMatrixReadOnlyB(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 336 | { |
| 337 | return IDLAttribute<JSDOMMatrixReadOnly>::get<jsDOMMatrixReadOnlyBGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "b" ); |
| 338 | } |
| 339 | |
| 340 | static inline JSValue jsDOMMatrixReadOnlyCGetter(ExecState& state, JSDOMMatrixReadOnly& thisObject, ThrowScope& throwScope) |
| 341 | { |
| 342 | UNUSED_PARAM(throwScope); |
| 343 | UNUSED_PARAM(state); |
| 344 | auto& impl = thisObject.wrapped(); |
| 345 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.c()); |
| 346 | return result; |
| 347 | } |
| 348 | |
| 349 | EncodedJSValue jsDOMMatrixReadOnlyC(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 350 | { |
| 351 | return IDLAttribute<JSDOMMatrixReadOnly>::get<jsDOMMatrixReadOnlyCGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "c" ); |
| 352 | } |
| 353 | |
| 354 | static inline JSValue jsDOMMatrixReadOnlyDGetter(ExecState& state, JSDOMMatrixReadOnly& thisObject, ThrowScope& throwScope) |
| 355 | { |
| 356 | UNUSED_PARAM(throwScope); |
| 357 | UNUSED_PARAM(state); |
| 358 | auto& impl = thisObject.wrapped(); |
| 359 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.d()); |
| 360 | return result; |
| 361 | } |
| 362 | |
| 363 | EncodedJSValue jsDOMMatrixReadOnlyD(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 364 | { |
| 365 | return IDLAttribute<JSDOMMatrixReadOnly>::get<jsDOMMatrixReadOnlyDGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "d" ); |
| 366 | } |
| 367 | |
| 368 | static inline JSValue jsDOMMatrixReadOnlyEGetter(ExecState& state, JSDOMMatrixReadOnly& thisObject, ThrowScope& throwScope) |
| 369 | { |
| 370 | UNUSED_PARAM(throwScope); |
| 371 | UNUSED_PARAM(state); |
| 372 | auto& impl = thisObject.wrapped(); |
| 373 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.e()); |
| 374 | return result; |
| 375 | } |
| 376 | |
| 377 | EncodedJSValue jsDOMMatrixReadOnlyE(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 378 | { |
| 379 | return IDLAttribute<JSDOMMatrixReadOnly>::get<jsDOMMatrixReadOnlyEGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "e" ); |
| 380 | } |
| 381 | |
| 382 | static inline JSValue jsDOMMatrixReadOnlyFGetter(ExecState& state, JSDOMMatrixReadOnly& thisObject, ThrowScope& throwScope) |
| 383 | { |
| 384 | UNUSED_PARAM(throwScope); |
| 385 | UNUSED_PARAM(state); |
| 386 | auto& impl = thisObject.wrapped(); |
| 387 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.f()); |
| 388 | return result; |
| 389 | } |
| 390 | |
| 391 | EncodedJSValue jsDOMMatrixReadOnlyF(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 392 | { |
| 393 | return IDLAttribute<JSDOMMatrixReadOnly>::get<jsDOMMatrixReadOnlyFGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "f" ); |
| 394 | } |
| 395 | |
| 396 | static inline JSValue jsDOMMatrixReadOnlyM11Getter(ExecState& state, JSDOMMatrixReadOnly& thisObject, ThrowScope& throwScope) |
| 397 | { |
| 398 | UNUSED_PARAM(throwScope); |
| 399 | UNUSED_PARAM(state); |
| 400 | auto& impl = thisObject.wrapped(); |
| 401 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m11()); |
| 402 | return result; |
| 403 | } |
| 404 | |
| 405 | EncodedJSValue jsDOMMatrixReadOnlyM11(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 406 | { |
| 407 | return IDLAttribute<JSDOMMatrixReadOnly>::get<jsDOMMatrixReadOnlyM11Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m11" ); |
| 408 | } |
| 409 | |
| 410 | static inline JSValue jsDOMMatrixReadOnlyM12Getter(ExecState& state, JSDOMMatrixReadOnly& thisObject, ThrowScope& throwScope) |
| 411 | { |
| 412 | UNUSED_PARAM(throwScope); |
| 413 | UNUSED_PARAM(state); |
| 414 | auto& impl = thisObject.wrapped(); |
| 415 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m12()); |
| 416 | return result; |
| 417 | } |
| 418 | |
| 419 | EncodedJSValue jsDOMMatrixReadOnlyM12(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 420 | { |
| 421 | return IDLAttribute<JSDOMMatrixReadOnly>::get<jsDOMMatrixReadOnlyM12Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m12" ); |
| 422 | } |
| 423 | |
| 424 | static inline JSValue jsDOMMatrixReadOnlyM13Getter(ExecState& state, JSDOMMatrixReadOnly& thisObject, ThrowScope& throwScope) |
| 425 | { |
| 426 | UNUSED_PARAM(throwScope); |
| 427 | UNUSED_PARAM(state); |
| 428 | auto& impl = thisObject.wrapped(); |
| 429 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m13()); |
| 430 | return result; |
| 431 | } |
| 432 | |
| 433 | EncodedJSValue jsDOMMatrixReadOnlyM13(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 434 | { |
| 435 | return IDLAttribute<JSDOMMatrixReadOnly>::get<jsDOMMatrixReadOnlyM13Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m13" ); |
| 436 | } |
| 437 | |
| 438 | static inline JSValue jsDOMMatrixReadOnlyM14Getter(ExecState& state, JSDOMMatrixReadOnly& thisObject, ThrowScope& throwScope) |
| 439 | { |
| 440 | UNUSED_PARAM(throwScope); |
| 441 | UNUSED_PARAM(state); |
| 442 | auto& impl = thisObject.wrapped(); |
| 443 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m14()); |
| 444 | return result; |
| 445 | } |
| 446 | |
| 447 | EncodedJSValue jsDOMMatrixReadOnlyM14(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 448 | { |
| 449 | return IDLAttribute<JSDOMMatrixReadOnly>::get<jsDOMMatrixReadOnlyM14Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m14" ); |
| 450 | } |
| 451 | |
| 452 | static inline JSValue jsDOMMatrixReadOnlyM21Getter(ExecState& state, JSDOMMatrixReadOnly& thisObject, ThrowScope& throwScope) |
| 453 | { |
| 454 | UNUSED_PARAM(throwScope); |
| 455 | UNUSED_PARAM(state); |
| 456 | auto& impl = thisObject.wrapped(); |
| 457 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m21()); |
| 458 | return result; |
| 459 | } |
| 460 | |
| 461 | EncodedJSValue jsDOMMatrixReadOnlyM21(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 462 | { |
| 463 | return IDLAttribute<JSDOMMatrixReadOnly>::get<jsDOMMatrixReadOnlyM21Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m21" ); |
| 464 | } |
| 465 | |
| 466 | static inline JSValue jsDOMMatrixReadOnlyM22Getter(ExecState& state, JSDOMMatrixReadOnly& thisObject, ThrowScope& throwScope) |
| 467 | { |
| 468 | UNUSED_PARAM(throwScope); |
| 469 | UNUSED_PARAM(state); |
| 470 | auto& impl = thisObject.wrapped(); |
| 471 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m22()); |
| 472 | return result; |
| 473 | } |
| 474 | |
| 475 | EncodedJSValue jsDOMMatrixReadOnlyM22(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 476 | { |
| 477 | return IDLAttribute<JSDOMMatrixReadOnly>::get<jsDOMMatrixReadOnlyM22Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m22" ); |
| 478 | } |
| 479 | |
| 480 | static inline JSValue jsDOMMatrixReadOnlyM23Getter(ExecState& state, JSDOMMatrixReadOnly& thisObject, ThrowScope& throwScope) |
| 481 | { |
| 482 | UNUSED_PARAM(throwScope); |
| 483 | UNUSED_PARAM(state); |
| 484 | auto& impl = thisObject.wrapped(); |
| 485 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m23()); |
| 486 | return result; |
| 487 | } |
| 488 | |
| 489 | EncodedJSValue jsDOMMatrixReadOnlyM23(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 490 | { |
| 491 | return IDLAttribute<JSDOMMatrixReadOnly>::get<jsDOMMatrixReadOnlyM23Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m23" ); |
| 492 | } |
| 493 | |
| 494 | static inline JSValue jsDOMMatrixReadOnlyM24Getter(ExecState& state, JSDOMMatrixReadOnly& thisObject, ThrowScope& throwScope) |
| 495 | { |
| 496 | UNUSED_PARAM(throwScope); |
| 497 | UNUSED_PARAM(state); |
| 498 | auto& impl = thisObject.wrapped(); |
| 499 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m24()); |
| 500 | return result; |
| 501 | } |
| 502 | |
| 503 | EncodedJSValue jsDOMMatrixReadOnlyM24(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 504 | { |
| 505 | return IDLAttribute<JSDOMMatrixReadOnly>::get<jsDOMMatrixReadOnlyM24Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m24" ); |
| 506 | } |
| 507 | |
| 508 | static inline JSValue jsDOMMatrixReadOnlyM31Getter(ExecState& state, JSDOMMatrixReadOnly& thisObject, ThrowScope& throwScope) |
| 509 | { |
| 510 | UNUSED_PARAM(throwScope); |
| 511 | UNUSED_PARAM(state); |
| 512 | auto& impl = thisObject.wrapped(); |
| 513 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m31()); |
| 514 | return result; |
| 515 | } |
| 516 | |
| 517 | EncodedJSValue jsDOMMatrixReadOnlyM31(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 518 | { |
| 519 | return IDLAttribute<JSDOMMatrixReadOnly>::get<jsDOMMatrixReadOnlyM31Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m31" ); |
| 520 | } |
| 521 | |
| 522 | static inline JSValue jsDOMMatrixReadOnlyM32Getter(ExecState& state, JSDOMMatrixReadOnly& thisObject, ThrowScope& throwScope) |
| 523 | { |
| 524 | UNUSED_PARAM(throwScope); |
| 525 | UNUSED_PARAM(state); |
| 526 | auto& impl = thisObject.wrapped(); |
| 527 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m32()); |
| 528 | return result; |
| 529 | } |
| 530 | |
| 531 | EncodedJSValue jsDOMMatrixReadOnlyM32(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 532 | { |
| 533 | return IDLAttribute<JSDOMMatrixReadOnly>::get<jsDOMMatrixReadOnlyM32Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m32" ); |
| 534 | } |
| 535 | |
| 536 | static inline JSValue jsDOMMatrixReadOnlyM33Getter(ExecState& state, JSDOMMatrixReadOnly& thisObject, ThrowScope& throwScope) |
| 537 | { |
| 538 | UNUSED_PARAM(throwScope); |
| 539 | UNUSED_PARAM(state); |
| 540 | auto& impl = thisObject.wrapped(); |
| 541 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m33()); |
| 542 | return result; |
| 543 | } |
| 544 | |
| 545 | EncodedJSValue jsDOMMatrixReadOnlyM33(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 546 | { |
| 547 | return IDLAttribute<JSDOMMatrixReadOnly>::get<jsDOMMatrixReadOnlyM33Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m33" ); |
| 548 | } |
| 549 | |
| 550 | static inline JSValue jsDOMMatrixReadOnlyM34Getter(ExecState& state, JSDOMMatrixReadOnly& thisObject, ThrowScope& throwScope) |
| 551 | { |
| 552 | UNUSED_PARAM(throwScope); |
| 553 | UNUSED_PARAM(state); |
| 554 | auto& impl = thisObject.wrapped(); |
| 555 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m34()); |
| 556 | return result; |
| 557 | } |
| 558 | |
| 559 | EncodedJSValue jsDOMMatrixReadOnlyM34(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 560 | { |
| 561 | return IDLAttribute<JSDOMMatrixReadOnly>::get<jsDOMMatrixReadOnlyM34Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m34" ); |
| 562 | } |
| 563 | |
| 564 | static inline JSValue jsDOMMatrixReadOnlyM41Getter(ExecState& state, JSDOMMatrixReadOnly& thisObject, ThrowScope& throwScope) |
| 565 | { |
| 566 | UNUSED_PARAM(throwScope); |
| 567 | UNUSED_PARAM(state); |
| 568 | auto& impl = thisObject.wrapped(); |
| 569 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m41()); |
| 570 | return result; |
| 571 | } |
| 572 | |
| 573 | EncodedJSValue jsDOMMatrixReadOnlyM41(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 574 | { |
| 575 | return IDLAttribute<JSDOMMatrixReadOnly>::get<jsDOMMatrixReadOnlyM41Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m41" ); |
| 576 | } |
| 577 | |
| 578 | static inline JSValue jsDOMMatrixReadOnlyM42Getter(ExecState& state, JSDOMMatrixReadOnly& thisObject, ThrowScope& throwScope) |
| 579 | { |
| 580 | UNUSED_PARAM(throwScope); |
| 581 | UNUSED_PARAM(state); |
| 582 | auto& impl = thisObject.wrapped(); |
| 583 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m42()); |
| 584 | return result; |
| 585 | } |
| 586 | |
| 587 | EncodedJSValue jsDOMMatrixReadOnlyM42(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 588 | { |
| 589 | return IDLAttribute<JSDOMMatrixReadOnly>::get<jsDOMMatrixReadOnlyM42Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m42" ); |
| 590 | } |
| 591 | |
| 592 | static inline JSValue jsDOMMatrixReadOnlyM43Getter(ExecState& state, JSDOMMatrixReadOnly& thisObject, ThrowScope& throwScope) |
| 593 | { |
| 594 | UNUSED_PARAM(throwScope); |
| 595 | UNUSED_PARAM(state); |
| 596 | auto& impl = thisObject.wrapped(); |
| 597 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m43()); |
| 598 | return result; |
| 599 | } |
| 600 | |
| 601 | EncodedJSValue jsDOMMatrixReadOnlyM43(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 602 | { |
| 603 | return IDLAttribute<JSDOMMatrixReadOnly>::get<jsDOMMatrixReadOnlyM43Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m43" ); |
| 604 | } |
| 605 | |
| 606 | static inline JSValue jsDOMMatrixReadOnlyM44Getter(ExecState& state, JSDOMMatrixReadOnly& thisObject, ThrowScope& throwScope) |
| 607 | { |
| 608 | UNUSED_PARAM(throwScope); |
| 609 | UNUSED_PARAM(state); |
| 610 | auto& impl = thisObject.wrapped(); |
| 611 | JSValue result = toJS<IDLUnrestrictedDouble>(state, throwScope, impl.m44()); |
| 612 | return result; |
| 613 | } |
| 614 | |
| 615 | EncodedJSValue jsDOMMatrixReadOnlyM44(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 616 | { |
| 617 | return IDLAttribute<JSDOMMatrixReadOnly>::get<jsDOMMatrixReadOnlyM44Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "m44" ); |
| 618 | } |
| 619 | |
| 620 | static inline JSValue jsDOMMatrixReadOnlyIs2DGetter(ExecState& state, JSDOMMatrixReadOnly& thisObject, ThrowScope& throwScope) |
| 621 | { |
| 622 | UNUSED_PARAM(throwScope); |
| 623 | UNUSED_PARAM(state); |
| 624 | auto& impl = thisObject.wrapped(); |
| 625 | JSValue result = toJS<IDLBoolean>(state, throwScope, impl.is2D()); |
| 626 | return result; |
| 627 | } |
| 628 | |
| 629 | EncodedJSValue jsDOMMatrixReadOnlyIs2D(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 630 | { |
| 631 | return IDLAttribute<JSDOMMatrixReadOnly>::get<jsDOMMatrixReadOnlyIs2DGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "is2D" ); |
| 632 | } |
| 633 | |
| 634 | static inline JSValue jsDOMMatrixReadOnlyIsIdentityGetter(ExecState& state, JSDOMMatrixReadOnly& thisObject, ThrowScope& throwScope) |
| 635 | { |
| 636 | UNUSED_PARAM(throwScope); |
| 637 | UNUSED_PARAM(state); |
| 638 | auto& impl = thisObject.wrapped(); |
| 639 | JSValue result = toJS<IDLBoolean>(state, throwScope, impl.isIdentity()); |
| 640 | return result; |
| 641 | } |
| 642 | |
| 643 | EncodedJSValue jsDOMMatrixReadOnlyIsIdentity(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 644 | { |
| 645 | return IDLAttribute<JSDOMMatrixReadOnly>::get<jsDOMMatrixReadOnlyIsIdentityGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "isIdentity" ); |
| 646 | } |
| 647 | |
| 648 | static inline JSC::EncodedJSValue jsDOMMatrixReadOnlyConstructorFunctionFromMatrixBody(JSC::ExecState* state, JSC::ThrowScope& throwScope) |
| 649 | { |
| 650 | UNUSED_PARAM(state); |
| 651 | UNUSED_PARAM(throwScope); |
| 652 | auto other = convert<IDLDictionary<DOMMatrixInit>>(*state, state->argument(0)); |
| 653 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 654 | return JSValue::encode(toJSNewlyCreated<IDLInterface<DOMMatrixReadOnly>>(*state, *jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject()), throwScope, DOMMatrixReadOnly::fromMatrix(WTFMove(other)))); |
| 655 | } |
| 656 | |
| 657 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyConstructorFunctionFromMatrix(ExecState* state) |
| 658 | { |
| 659 | return IDLOperation<JSDOMMatrixReadOnly>::callStatic<jsDOMMatrixReadOnlyConstructorFunctionFromMatrixBody>(*state, "fromMatrix" ); |
| 660 | } |
| 661 | |
| 662 | static inline JSC::EncodedJSValue jsDOMMatrixReadOnlyConstructorFunctionFromFloat32ArrayBody(JSC::ExecState* state, JSC::ThrowScope& throwScope) |
| 663 | { |
| 664 | UNUSED_PARAM(state); |
| 665 | UNUSED_PARAM(throwScope); |
| 666 | if (UNLIKELY(state->argumentCount() < 1)) |
| 667 | return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| 668 | auto array32 = convert<IDLFloat32Array>(*state, state->uncheckedArgument(0), [](JSC::ExecState& state, JSC::ThrowScope& scope) { throwArgumentTypeError(state, scope, 0, "array32" , "DOMMatrixReadOnly" , "fromFloat32Array" , "Float32Array" ); }); |
| 669 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 670 | return JSValue::encode(toJSNewlyCreated<IDLInterface<DOMMatrixReadOnly>>(*state, *jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject()), throwScope, DOMMatrixReadOnly::fromFloat32Array(array32.releaseNonNull()))); |
| 671 | } |
| 672 | |
| 673 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyConstructorFunctionFromFloat32Array(ExecState* state) |
| 674 | { |
| 675 | return IDLOperation<JSDOMMatrixReadOnly>::callStatic<jsDOMMatrixReadOnlyConstructorFunctionFromFloat32ArrayBody>(*state, "fromFloat32Array" ); |
| 676 | } |
| 677 | |
| 678 | static inline JSC::EncodedJSValue jsDOMMatrixReadOnlyConstructorFunctionFromFloat64ArrayBody(JSC::ExecState* state, JSC::ThrowScope& throwScope) |
| 679 | { |
| 680 | UNUSED_PARAM(state); |
| 681 | UNUSED_PARAM(throwScope); |
| 682 | if (UNLIKELY(state->argumentCount() < 1)) |
| 683 | return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| 684 | auto array64 = convert<IDLFloat64Array>(*state, state->uncheckedArgument(0), [](JSC::ExecState& state, JSC::ThrowScope& scope) { throwArgumentTypeError(state, scope, 0, "array64" , "DOMMatrixReadOnly" , "fromFloat64Array" , "Float64Array" ); }); |
| 685 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 686 | return JSValue::encode(toJSNewlyCreated<IDLInterface<DOMMatrixReadOnly>>(*state, *jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject()), throwScope, DOMMatrixReadOnly::fromFloat64Array(array64.releaseNonNull()))); |
| 687 | } |
| 688 | |
| 689 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyConstructorFunctionFromFloat64Array(ExecState* state) |
| 690 | { |
| 691 | return IDLOperation<JSDOMMatrixReadOnly>::callStatic<jsDOMMatrixReadOnlyConstructorFunctionFromFloat64ArrayBody>(*state, "fromFloat64Array" ); |
| 692 | } |
| 693 | |
| 694 | static inline JSC::EncodedJSValue jsDOMMatrixReadOnlyPrototypeFunctionTranslateBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrixReadOnly>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 695 | { |
| 696 | UNUSED_PARAM(state); |
| 697 | UNUSED_PARAM(throwScope); |
| 698 | auto& impl = castedThis->wrapped(); |
| 699 | auto tx = state->argument(0).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(0)); |
| 700 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 701 | auto ty = state->argument(1).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(1)); |
| 702 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 703 | auto tz = state->argument(2).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(2)); |
| 704 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 705 | return JSValue::encode(toJSNewlyCreated<IDLInterface<DOMMatrix>>(*state, *castedThis->globalObject(), impl.translate(WTFMove(tx), WTFMove(ty), WTFMove(tz)))); |
| 706 | } |
| 707 | |
| 708 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionTranslate(ExecState* state) |
| 709 | { |
| 710 | return IDLOperation<JSDOMMatrixReadOnly>::call<jsDOMMatrixReadOnlyPrototypeFunctionTranslateBody>(*state, "translate" ); |
| 711 | } |
| 712 | |
| 713 | static inline JSC::EncodedJSValue jsDOMMatrixReadOnlyPrototypeFunctionScaleBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrixReadOnly>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 714 | { |
| 715 | UNUSED_PARAM(state); |
| 716 | UNUSED_PARAM(throwScope); |
| 717 | auto& impl = castedThis->wrapped(); |
| 718 | auto scaleX = state->argument(0).isUndefined() ? 1 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(0)); |
| 719 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 720 | auto scaleY = state->argument(1).isUndefined() ? Optional<Converter<IDLUnrestrictedDouble>::ReturnType>() : Optional<Converter<IDLUnrestrictedDouble>::ReturnType>(convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(1))); |
| 721 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 722 | auto scaleZ = state->argument(2).isUndefined() ? 1 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(2)); |
| 723 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 724 | auto originX = state->argument(3).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(3)); |
| 725 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 726 | auto originY = state->argument(4).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(4)); |
| 727 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 728 | auto originZ = state->argument(5).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(5)); |
| 729 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 730 | return JSValue::encode(toJSNewlyCreated<IDLInterface<DOMMatrix>>(*state, *castedThis->globalObject(), impl.scale(WTFMove(scaleX), WTFMove(scaleY), WTFMove(scaleZ), WTFMove(originX), WTFMove(originY), WTFMove(originZ)))); |
| 731 | } |
| 732 | |
| 733 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionScale(ExecState* state) |
| 734 | { |
| 735 | return IDLOperation<JSDOMMatrixReadOnly>::call<jsDOMMatrixReadOnlyPrototypeFunctionScaleBody>(*state, "scale" ); |
| 736 | } |
| 737 | |
| 738 | static inline JSC::EncodedJSValue jsDOMMatrixReadOnlyPrototypeFunctionScale3dBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrixReadOnly>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 739 | { |
| 740 | UNUSED_PARAM(state); |
| 741 | UNUSED_PARAM(throwScope); |
| 742 | auto& impl = castedThis->wrapped(); |
| 743 | auto scale = state->argument(0).isUndefined() ? 1 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(0)); |
| 744 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 745 | auto originX = state->argument(1).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(1)); |
| 746 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 747 | auto originY = state->argument(2).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(2)); |
| 748 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 749 | auto originZ = state->argument(3).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(3)); |
| 750 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 751 | return JSValue::encode(toJSNewlyCreated<IDLInterface<DOMMatrix>>(*state, *castedThis->globalObject(), impl.scale3d(WTFMove(scale), WTFMove(originX), WTFMove(originY), WTFMove(originZ)))); |
| 752 | } |
| 753 | |
| 754 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionScale3d(ExecState* state) |
| 755 | { |
| 756 | return IDLOperation<JSDOMMatrixReadOnly>::call<jsDOMMatrixReadOnlyPrototypeFunctionScale3dBody>(*state, "scale3d" ); |
| 757 | } |
| 758 | |
| 759 | static inline JSC::EncodedJSValue jsDOMMatrixReadOnlyPrototypeFunctionRotateBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrixReadOnly>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 760 | { |
| 761 | UNUSED_PARAM(state); |
| 762 | UNUSED_PARAM(throwScope); |
| 763 | auto& impl = castedThis->wrapped(); |
| 764 | auto rotX = state->argument(0).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(0)); |
| 765 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 766 | auto rotY = state->argument(1).isUndefined() ? Optional<Converter<IDLUnrestrictedDouble>::ReturnType>() : Optional<Converter<IDLUnrestrictedDouble>::ReturnType>(convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(1))); |
| 767 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 768 | auto rotZ = state->argument(2).isUndefined() ? Optional<Converter<IDLUnrestrictedDouble>::ReturnType>() : Optional<Converter<IDLUnrestrictedDouble>::ReturnType>(convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(2))); |
| 769 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 770 | return JSValue::encode(toJSNewlyCreated<IDLInterface<DOMMatrix>>(*state, *castedThis->globalObject(), impl.rotate(WTFMove(rotX), WTFMove(rotY), WTFMove(rotZ)))); |
| 771 | } |
| 772 | |
| 773 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionRotate(ExecState* state) |
| 774 | { |
| 775 | return IDLOperation<JSDOMMatrixReadOnly>::call<jsDOMMatrixReadOnlyPrototypeFunctionRotateBody>(*state, "rotate" ); |
| 776 | } |
| 777 | |
| 778 | static inline JSC::EncodedJSValue jsDOMMatrixReadOnlyPrototypeFunctionRotateFromVectorBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrixReadOnly>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 779 | { |
| 780 | UNUSED_PARAM(state); |
| 781 | UNUSED_PARAM(throwScope); |
| 782 | auto& impl = castedThis->wrapped(); |
| 783 | auto x = state->argument(0).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(0)); |
| 784 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 785 | auto y = state->argument(1).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(1)); |
| 786 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 787 | return JSValue::encode(toJSNewlyCreated<IDLInterface<DOMMatrix>>(*state, *castedThis->globalObject(), impl.rotateFromVector(WTFMove(x), WTFMove(y)))); |
| 788 | } |
| 789 | |
| 790 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionRotateFromVector(ExecState* state) |
| 791 | { |
| 792 | return IDLOperation<JSDOMMatrixReadOnly>::call<jsDOMMatrixReadOnlyPrototypeFunctionRotateFromVectorBody>(*state, "rotateFromVector" ); |
| 793 | } |
| 794 | |
| 795 | static inline JSC::EncodedJSValue jsDOMMatrixReadOnlyPrototypeFunctionRotateAxisAngleBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrixReadOnly>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 796 | { |
| 797 | UNUSED_PARAM(state); |
| 798 | UNUSED_PARAM(throwScope); |
| 799 | auto& impl = castedThis->wrapped(); |
| 800 | auto x = state->argument(0).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(0)); |
| 801 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 802 | auto y = state->argument(1).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(1)); |
| 803 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 804 | auto z = state->argument(2).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(2)); |
| 805 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 806 | auto angle = state->argument(3).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(3)); |
| 807 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 808 | return JSValue::encode(toJSNewlyCreated<IDLInterface<DOMMatrix>>(*state, *castedThis->globalObject(), impl.rotateAxisAngle(WTFMove(x), WTFMove(y), WTFMove(z), WTFMove(angle)))); |
| 809 | } |
| 810 | |
| 811 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionRotateAxisAngle(ExecState* state) |
| 812 | { |
| 813 | return IDLOperation<JSDOMMatrixReadOnly>::call<jsDOMMatrixReadOnlyPrototypeFunctionRotateAxisAngleBody>(*state, "rotateAxisAngle" ); |
| 814 | } |
| 815 | |
| 816 | static inline JSC::EncodedJSValue jsDOMMatrixReadOnlyPrototypeFunctionSkewXBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrixReadOnly>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 817 | { |
| 818 | UNUSED_PARAM(state); |
| 819 | UNUSED_PARAM(throwScope); |
| 820 | auto& impl = castedThis->wrapped(); |
| 821 | auto sx = state->argument(0).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(0)); |
| 822 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 823 | return JSValue::encode(toJSNewlyCreated<IDLInterface<DOMMatrix>>(*state, *castedThis->globalObject(), impl.skewX(WTFMove(sx)))); |
| 824 | } |
| 825 | |
| 826 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionSkewX(ExecState* state) |
| 827 | { |
| 828 | return IDLOperation<JSDOMMatrixReadOnly>::call<jsDOMMatrixReadOnlyPrototypeFunctionSkewXBody>(*state, "skewX" ); |
| 829 | } |
| 830 | |
| 831 | static inline JSC::EncodedJSValue jsDOMMatrixReadOnlyPrototypeFunctionSkewYBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrixReadOnly>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 832 | { |
| 833 | UNUSED_PARAM(state); |
| 834 | UNUSED_PARAM(throwScope); |
| 835 | auto& impl = castedThis->wrapped(); |
| 836 | auto sy = state->argument(0).isUndefined() ? 0 : convert<IDLUnrestrictedDouble>(*state, state->uncheckedArgument(0)); |
| 837 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 838 | return JSValue::encode(toJSNewlyCreated<IDLInterface<DOMMatrix>>(*state, *castedThis->globalObject(), impl.skewY(WTFMove(sy)))); |
| 839 | } |
| 840 | |
| 841 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionSkewY(ExecState* state) |
| 842 | { |
| 843 | return IDLOperation<JSDOMMatrixReadOnly>::call<jsDOMMatrixReadOnlyPrototypeFunctionSkewYBody>(*state, "skewY" ); |
| 844 | } |
| 845 | |
| 846 | static inline JSC::EncodedJSValue jsDOMMatrixReadOnlyPrototypeFunctionMultiplyBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrixReadOnly>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 847 | { |
| 848 | UNUSED_PARAM(state); |
| 849 | UNUSED_PARAM(throwScope); |
| 850 | auto& impl = castedThis->wrapped(); |
| 851 | auto other = convert<IDLDictionary<DOMMatrixInit>>(*state, state->argument(0)); |
| 852 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 853 | return JSValue::encode(toJSNewlyCreated<IDLInterface<DOMMatrix>>(*state, *castedThis->globalObject(), throwScope, impl.multiply(WTFMove(other)))); |
| 854 | } |
| 855 | |
| 856 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionMultiply(ExecState* state) |
| 857 | { |
| 858 | return IDLOperation<JSDOMMatrixReadOnly>::call<jsDOMMatrixReadOnlyPrototypeFunctionMultiplyBody>(*state, "multiply" ); |
| 859 | } |
| 860 | |
| 861 | static inline JSC::EncodedJSValue jsDOMMatrixReadOnlyPrototypeFunctionFlipXBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrixReadOnly>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 862 | { |
| 863 | UNUSED_PARAM(state); |
| 864 | UNUSED_PARAM(throwScope); |
| 865 | auto& impl = castedThis->wrapped(); |
| 866 | return JSValue::encode(toJSNewlyCreated<IDLInterface<DOMMatrix>>(*state, *castedThis->globalObject(), impl.flipX())); |
| 867 | } |
| 868 | |
| 869 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionFlipX(ExecState* state) |
| 870 | { |
| 871 | return IDLOperation<JSDOMMatrixReadOnly>::call<jsDOMMatrixReadOnlyPrototypeFunctionFlipXBody>(*state, "flipX" ); |
| 872 | } |
| 873 | |
| 874 | static inline JSC::EncodedJSValue jsDOMMatrixReadOnlyPrototypeFunctionFlipYBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrixReadOnly>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 875 | { |
| 876 | UNUSED_PARAM(state); |
| 877 | UNUSED_PARAM(throwScope); |
| 878 | auto& impl = castedThis->wrapped(); |
| 879 | return JSValue::encode(toJSNewlyCreated<IDLInterface<DOMMatrix>>(*state, *castedThis->globalObject(), impl.flipY())); |
| 880 | } |
| 881 | |
| 882 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionFlipY(ExecState* state) |
| 883 | { |
| 884 | return IDLOperation<JSDOMMatrixReadOnly>::call<jsDOMMatrixReadOnlyPrototypeFunctionFlipYBody>(*state, "flipY" ); |
| 885 | } |
| 886 | |
| 887 | static inline JSC::EncodedJSValue jsDOMMatrixReadOnlyPrototypeFunctionInverseBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrixReadOnly>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 888 | { |
| 889 | UNUSED_PARAM(state); |
| 890 | UNUSED_PARAM(throwScope); |
| 891 | auto& impl = castedThis->wrapped(); |
| 892 | return JSValue::encode(toJSNewlyCreated<IDLInterface<DOMMatrix>>(*state, *castedThis->globalObject(), impl.inverse())); |
| 893 | } |
| 894 | |
| 895 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionInverse(ExecState* state) |
| 896 | { |
| 897 | return IDLOperation<JSDOMMatrixReadOnly>::call<jsDOMMatrixReadOnlyPrototypeFunctionInverseBody>(*state, "inverse" ); |
| 898 | } |
| 899 | |
| 900 | static inline JSC::EncodedJSValue jsDOMMatrixReadOnlyPrototypeFunctionTransformPointBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrixReadOnly>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 901 | { |
| 902 | UNUSED_PARAM(state); |
| 903 | UNUSED_PARAM(throwScope); |
| 904 | auto& impl = castedThis->wrapped(); |
| 905 | auto point = convert<IDLDictionary<DOMPointInit>>(*state, state->argument(0)); |
| 906 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| 907 | return JSValue::encode(toJSNewlyCreated<IDLInterface<DOMPoint>>(*state, *castedThis->globalObject(), impl.transformPoint(WTFMove(point)))); |
| 908 | } |
| 909 | |
| 910 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionTransformPoint(ExecState* state) |
| 911 | { |
| 912 | return IDLOperation<JSDOMMatrixReadOnly>::call<jsDOMMatrixReadOnlyPrototypeFunctionTransformPointBody>(*state, "transformPoint" ); |
| 913 | } |
| 914 | |
| 915 | static inline JSC::EncodedJSValue jsDOMMatrixReadOnlyPrototypeFunctionToFloat32ArrayBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrixReadOnly>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 916 | { |
| 917 | UNUSED_PARAM(state); |
| 918 | UNUSED_PARAM(throwScope); |
| 919 | auto& impl = castedThis->wrapped(); |
| 920 | return JSValue::encode(toJS<IDLFloat32Array>(*state, *castedThis->globalObject(), throwScope, impl.toFloat32Array())); |
| 921 | } |
| 922 | |
| 923 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionToFloat32Array(ExecState* state) |
| 924 | { |
| 925 | return IDLOperation<JSDOMMatrixReadOnly>::call<jsDOMMatrixReadOnlyPrototypeFunctionToFloat32ArrayBody>(*state, "toFloat32Array" ); |
| 926 | } |
| 927 | |
| 928 | static inline JSC::EncodedJSValue jsDOMMatrixReadOnlyPrototypeFunctionToFloat64ArrayBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrixReadOnly>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 929 | { |
| 930 | UNUSED_PARAM(state); |
| 931 | UNUSED_PARAM(throwScope); |
| 932 | auto& impl = castedThis->wrapped(); |
| 933 | return JSValue::encode(toJS<IDLFloat64Array>(*state, *castedThis->globalObject(), throwScope, impl.toFloat64Array())); |
| 934 | } |
| 935 | |
| 936 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionToFloat64Array(ExecState* state) |
| 937 | { |
| 938 | return IDLOperation<JSDOMMatrixReadOnly>::call<jsDOMMatrixReadOnlyPrototypeFunctionToFloat64ArrayBody>(*state, "toFloat64Array" ); |
| 939 | } |
| 940 | |
| 941 | static inline JSC::EncodedJSValue jsDOMMatrixReadOnlyPrototypeFunctionToStringBody(JSC::ExecState* state, typename IDLOperation<JSDOMMatrixReadOnly>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 942 | { |
| 943 | UNUSED_PARAM(state); |
| 944 | UNUSED_PARAM(throwScope); |
| 945 | auto& impl = castedThis->wrapped(); |
| 946 | return JSValue::encode(toJS<IDLDOMString>(*state, throwScope, impl.toString())); |
| 947 | } |
| 948 | |
| 949 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionToString(ExecState* state) |
| 950 | { |
| 951 | return IDLOperation<JSDOMMatrixReadOnly>::call<jsDOMMatrixReadOnlyPrototypeFunctionToStringBody>(*state, "toString" ); |
| 952 | } |
| 953 | |
| 954 | JSC::JSObject* JSDOMMatrixReadOnly::serialize(ExecState& state, JSDOMMatrixReadOnly& thisObject, JSDOMGlobalObject& globalObject, ThrowScope& throwScope) |
| 955 | { |
| 956 | auto& vm = state.vm(); |
| 957 | auto* result = constructEmptyObject(&state, globalObject.objectPrototype()); |
| 958 | |
| 959 | auto aValue = jsDOMMatrixReadOnlyAGetter(state, thisObject, throwScope); |
| 960 | throwScope.assertNoException(); |
| 961 | result->putDirect(vm, Identifier::fromString(&vm, "a" ), aValue); |
| 962 | |
| 963 | auto bValue = jsDOMMatrixReadOnlyBGetter(state, thisObject, throwScope); |
| 964 | throwScope.assertNoException(); |
| 965 | result->putDirect(vm, Identifier::fromString(&vm, "b" ), bValue); |
| 966 | |
| 967 | auto cValue = jsDOMMatrixReadOnlyCGetter(state, thisObject, throwScope); |
| 968 | throwScope.assertNoException(); |
| 969 | result->putDirect(vm, Identifier::fromString(&vm, "c" ), cValue); |
| 970 | |
| 971 | auto dValue = jsDOMMatrixReadOnlyDGetter(state, thisObject, throwScope); |
| 972 | throwScope.assertNoException(); |
| 973 | result->putDirect(vm, Identifier::fromString(&vm, "d" ), dValue); |
| 974 | |
| 975 | auto eValue = jsDOMMatrixReadOnlyEGetter(state, thisObject, throwScope); |
| 976 | throwScope.assertNoException(); |
| 977 | result->putDirect(vm, Identifier::fromString(&vm, "e" ), eValue); |
| 978 | |
| 979 | auto fValue = jsDOMMatrixReadOnlyFGetter(state, thisObject, throwScope); |
| 980 | throwScope.assertNoException(); |
| 981 | result->putDirect(vm, Identifier::fromString(&vm, "f" ), fValue); |
| 982 | |
| 983 | auto m11Value = jsDOMMatrixReadOnlyM11Getter(state, thisObject, throwScope); |
| 984 | throwScope.assertNoException(); |
| 985 | result->putDirect(vm, Identifier::fromString(&vm, "m11" ), m11Value); |
| 986 | |
| 987 | auto m12Value = jsDOMMatrixReadOnlyM12Getter(state, thisObject, throwScope); |
| 988 | throwScope.assertNoException(); |
| 989 | result->putDirect(vm, Identifier::fromString(&vm, "m12" ), m12Value); |
| 990 | |
| 991 | auto m13Value = jsDOMMatrixReadOnlyM13Getter(state, thisObject, throwScope); |
| 992 | throwScope.assertNoException(); |
| 993 | result->putDirect(vm, Identifier::fromString(&vm, "m13" ), m13Value); |
| 994 | |
| 995 | auto m14Value = jsDOMMatrixReadOnlyM14Getter(state, thisObject, throwScope); |
| 996 | throwScope.assertNoException(); |
| 997 | result->putDirect(vm, Identifier::fromString(&vm, "m14" ), m14Value); |
| 998 | |
| 999 | auto m21Value = jsDOMMatrixReadOnlyM21Getter(state, thisObject, throwScope); |
| 1000 | throwScope.assertNoException(); |
| 1001 | result->putDirect(vm, Identifier::fromString(&vm, "m21" ), m21Value); |
| 1002 | |
| 1003 | auto m22Value = jsDOMMatrixReadOnlyM22Getter(state, thisObject, throwScope); |
| 1004 | throwScope.assertNoException(); |
| 1005 | result->putDirect(vm, Identifier::fromString(&vm, "m22" ), m22Value); |
| 1006 | |
| 1007 | auto m23Value = jsDOMMatrixReadOnlyM23Getter(state, thisObject, throwScope); |
| 1008 | throwScope.assertNoException(); |
| 1009 | result->putDirect(vm, Identifier::fromString(&vm, "m23" ), m23Value); |
| 1010 | |
| 1011 | auto m24Value = jsDOMMatrixReadOnlyM24Getter(state, thisObject, throwScope); |
| 1012 | throwScope.assertNoException(); |
| 1013 | result->putDirect(vm, Identifier::fromString(&vm, "m24" ), m24Value); |
| 1014 | |
| 1015 | auto m31Value = jsDOMMatrixReadOnlyM31Getter(state, thisObject, throwScope); |
| 1016 | throwScope.assertNoException(); |
| 1017 | result->putDirect(vm, Identifier::fromString(&vm, "m31" ), m31Value); |
| 1018 | |
| 1019 | auto m32Value = jsDOMMatrixReadOnlyM32Getter(state, thisObject, throwScope); |
| 1020 | throwScope.assertNoException(); |
| 1021 | result->putDirect(vm, Identifier::fromString(&vm, "m32" ), m32Value); |
| 1022 | |
| 1023 | auto m33Value = jsDOMMatrixReadOnlyM33Getter(state, thisObject, throwScope); |
| 1024 | throwScope.assertNoException(); |
| 1025 | result->putDirect(vm, Identifier::fromString(&vm, "m33" ), m33Value); |
| 1026 | |
| 1027 | auto m34Value = jsDOMMatrixReadOnlyM34Getter(state, thisObject, throwScope); |
| 1028 | throwScope.assertNoException(); |
| 1029 | result->putDirect(vm, Identifier::fromString(&vm, "m34" ), m34Value); |
| 1030 | |
| 1031 | auto m41Value = jsDOMMatrixReadOnlyM41Getter(state, thisObject, throwScope); |
| 1032 | throwScope.assertNoException(); |
| 1033 | result->putDirect(vm, Identifier::fromString(&vm, "m41" ), m41Value); |
| 1034 | |
| 1035 | auto m42Value = jsDOMMatrixReadOnlyM42Getter(state, thisObject, throwScope); |
| 1036 | throwScope.assertNoException(); |
| 1037 | result->putDirect(vm, Identifier::fromString(&vm, "m42" ), m42Value); |
| 1038 | |
| 1039 | auto m43Value = jsDOMMatrixReadOnlyM43Getter(state, thisObject, throwScope); |
| 1040 | throwScope.assertNoException(); |
| 1041 | result->putDirect(vm, Identifier::fromString(&vm, "m43" ), m43Value); |
| 1042 | |
| 1043 | auto m44Value = jsDOMMatrixReadOnlyM44Getter(state, thisObject, throwScope); |
| 1044 | throwScope.assertNoException(); |
| 1045 | result->putDirect(vm, Identifier::fromString(&vm, "m44" ), m44Value); |
| 1046 | |
| 1047 | auto is2DValue = jsDOMMatrixReadOnlyIs2DGetter(state, thisObject, throwScope); |
| 1048 | throwScope.assertNoException(); |
| 1049 | result->putDirect(vm, Identifier::fromString(&vm, "is2D" ), is2DValue); |
| 1050 | |
| 1051 | auto isIdentityValue = jsDOMMatrixReadOnlyIsIdentityGetter(state, thisObject, throwScope); |
| 1052 | throwScope.assertNoException(); |
| 1053 | result->putDirect(vm, Identifier::fromString(&vm, "isIdentity" ), isIdentityValue); |
| 1054 | |
| 1055 | return result; |
| 1056 | } |
| 1057 | |
| 1058 | static inline EncodedJSValue jsDOMMatrixReadOnlyPrototypeFunctionToJSONBody(ExecState* state, JSDOMMatrixReadOnly* thisObject, JSC::ThrowScope& throwScope) |
| 1059 | { |
| 1060 | return JSValue::encode(JSDOMMatrixReadOnly::serialize(*state, *thisObject, *thisObject->globalObject(), throwScope)); |
| 1061 | } |
| 1062 | |
| 1063 | EncodedJSValue JSC_HOST_CALL jsDOMMatrixReadOnlyPrototypeFunctionToJSON(ExecState* state) |
| 1064 | { |
| 1065 | return IDLOperation<JSDOMMatrixReadOnly>::call<jsDOMMatrixReadOnlyPrototypeFunctionToJSONBody>(*state, "toJSON" ); |
| 1066 | } |
| 1067 | |
| 1068 | void JSDOMMatrixReadOnly::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) |
| 1069 | { |
| 1070 | auto* thisObject = jsCast<JSDOMMatrixReadOnly*>(cell); |
| 1071 | builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); |
| 1072 | if (thisObject->scriptExecutionContext()) |
| 1073 | builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); |
| 1074 | Base::heapSnapshot(cell, builder); |
| 1075 | } |
| 1076 | |
| 1077 | bool JSDOMMatrixReadOnlyOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor, const char** reason) |
| 1078 | { |
| 1079 | UNUSED_PARAM(handle); |
| 1080 | UNUSED_PARAM(visitor); |
| 1081 | UNUSED_PARAM(reason); |
| 1082 | return false; |
| 1083 | } |
| 1084 | |
| 1085 | void JSDOMMatrixReadOnlyOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context) |
| 1086 | { |
| 1087 | auto* jsDOMMatrixReadOnly = static_cast<JSDOMMatrixReadOnly*>(handle.slot()->asCell()); |
| 1088 | auto& world = *static_cast<DOMWrapperWorld*>(context); |
| 1089 | uncacheWrapper(world, &jsDOMMatrixReadOnly->wrapped(), jsDOMMatrixReadOnly); |
| 1090 | } |
| 1091 | |
| 1092 | JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref<DOMMatrixReadOnly>&& impl) |
| 1093 | { |
| 1094 | // If you hit this failure the interface definition has the ImplementationLacksVTable |
| 1095 | // attribute. You should remove that attribute. If the class has subclasses |
| 1096 | // that may be passed through this toJS() function you should use the SkipVTableValidation |
| 1097 | // attribute to DOMMatrixReadOnly. |
| 1098 | static_assert(!std::is_polymorphic<DOMMatrixReadOnly>::value, "DOMMatrixReadOnly is polymorphic but the IDL claims it is not" ); |
| 1099 | return createWrapper<DOMMatrixReadOnly>(globalObject, WTFMove(impl)); |
| 1100 | } |
| 1101 | |
| 1102 | JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, DOMMatrixReadOnly& impl) |
| 1103 | { |
| 1104 | return wrap(state, globalObject, impl); |
| 1105 | } |
| 1106 | |
| 1107 | DOMMatrixReadOnly* JSDOMMatrixReadOnly::toWrapped(JSC::VM& vm, JSC::JSValue value) |
| 1108 | { |
| 1109 | if (auto* wrapper = jsDynamicCast<JSDOMMatrixReadOnly*>(vm, value)) |
| 1110 | return &wrapper->wrapped(); |
| 1111 | return nullptr; |
| 1112 | } |
| 1113 | |
| 1114 | } |
| 1115 | |