| /* |
| This file is part of the WebKit open source project. |
| This file has been generated by generate-bindings.pl. DO NOT MODIFY! |
| |
| This library is free software; you can redistribute it and/or |
| modify it under the terms of the GNU Library General Public |
| License as published by the Free Software Foundation; either |
| version 2 of the License, or (at your option) any later version. |
| |
| This library is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| Library General Public License for more details. |
| |
| You should have received a copy of the GNU Library General Public License |
| along with this library; see the file COPYING.LIB. If not, write to |
| the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| Boston, MA 02110-1301, USA. |
| */ |
| |
| #include "config.h" |
| #include "JSSVGComponentTransferFunctionElement.h" |
| |
| #include "JSDOMBinding.h" |
| #include "JSDOMConstructor.h" |
| #include "JSSVGAnimatedEnumeration.h" |
| #include "JSSVGAnimatedNumber.h" |
| #include "JSSVGAnimatedNumberList.h" |
| #include <wtf/GetPtr.h> |
| |
| using namespace JSC; |
| |
| namespace WebCore { |
| |
| // Attributes |
| |
| JSC::EncodedJSValue jsSVGComponentTransferFunctionElementType(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsSVGComponentTransferFunctionElementTableValues(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsSVGComponentTransferFunctionElementSlope(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsSVGComponentTransferFunctionElementIntercept(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsSVGComponentTransferFunctionElementAmplitude(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsSVGComponentTransferFunctionElementExponent(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsSVGComponentTransferFunctionElementOffset(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsSVGComponentTransferFunctionElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSSVGComponentTransferFunctionElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| |
| class JSSVGComponentTransferFunctionElementPrototype : public JSC::JSNonFinalObject { |
| public: |
| typedef JSC::JSNonFinalObject Base; |
| static JSSVGComponentTransferFunctionElementPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) |
| { |
| JSSVGComponentTransferFunctionElementPrototype* ptr = new (NotNull, JSC::allocateCell<JSSVGComponentTransferFunctionElementPrototype>(vm.heap)) JSSVGComponentTransferFunctionElementPrototype(vm, globalObject, structure); |
| ptr->finishCreation(vm); |
| return ptr; |
| } |
| |
| DECLARE_INFO; |
| static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) |
| { |
| return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); |
| } |
| |
| private: |
| JSSVGComponentTransferFunctionElementPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) |
| : JSC::JSNonFinalObject(vm, structure) |
| { |
| } |
| |
| void finishCreation(JSC::VM&); |
| }; |
| |
| typedef JSDOMConstructorNotConstructable<JSSVGComponentTransferFunctionElement> JSSVGComponentTransferFunctionElementConstructor; |
| |
| /* Hash table for constructor */ |
| |
| static const HashTableValue JSSVGComponentTransferFunctionElementConstructorTableValues[] = |
| { |
| { "SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0) } }, |
| { "SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(1) } }, |
| { "SVG_FECOMPONENTTRANSFER_TYPE_TABLE", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(2) } }, |
| { "SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(3) } }, |
| { "SVG_FECOMPONENTTRANSFER_TYPE_LINEAR", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(4) } }, |
| { "SVG_FECOMPONENTTRANSFER_TYPE_GAMMA", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(5) } }, |
| }; |
| |
| template<> JSValue JSSVGComponentTransferFunctionElementConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject) |
| { |
| return JSSVGElement::getConstructor(vm, &globalObject); |
| } |
| |
| template<> void JSSVGComponentTransferFunctionElementConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) |
| { |
| putDirect(vm, vm.propertyNames->prototype, JSSVGComponentTransferFunctionElement::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); |
| putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("SVGComponentTransferFunctionElement"))), ReadOnly | DontEnum); |
| putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); |
| reifyStaticProperties(vm, JSSVGComponentTransferFunctionElementConstructorTableValues, *this); |
| } |
| |
| template<> const ClassInfo JSSVGComponentTransferFunctionElementConstructor::s_info = { "SVGComponentTransferFunctionElement", &Base::s_info, 0, CREATE_METHOD_TABLE(JSSVGComponentTransferFunctionElementConstructor) }; |
| |
| /* Hash table for prototype */ |
| |
| static const HashTableValue JSSVGComponentTransferFunctionElementPrototypeTableValues[] = |
| { |
| { "constructor", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGComponentTransferFunctionElementConstructor) } }, |
| { "type", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementType), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "tableValues", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementTableValues), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "slope", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementSlope), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "intercept", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementIntercept), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "amplitude", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementAmplitude), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "exponent", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementExponent), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "offset", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementOffset), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0) } }, |
| { "SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(1) } }, |
| { "SVG_FECOMPONENTTRANSFER_TYPE_TABLE", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(2) } }, |
| { "SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(3) } }, |
| { "SVG_FECOMPONENTTRANSFER_TYPE_LINEAR", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(4) } }, |
| { "SVG_FECOMPONENTTRANSFER_TYPE_GAMMA", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(5) } }, |
| }; |
| |
| const ClassInfo JSSVGComponentTransferFunctionElementPrototype::s_info = { "SVGComponentTransferFunctionElementPrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSSVGComponentTransferFunctionElementPrototype) }; |
| |
| void JSSVGComponentTransferFunctionElementPrototype::finishCreation(VM& vm) |
| { |
| Base::finishCreation(vm); |
| reifyStaticProperties(vm, JSSVGComponentTransferFunctionElementPrototypeTableValues, *this); |
| } |
| |
| const ClassInfo JSSVGComponentTransferFunctionElement::s_info = { "SVGComponentTransferFunctionElement", &Base::s_info, 0, CREATE_METHOD_TABLE(JSSVGComponentTransferFunctionElement) }; |
| |
| JSSVGComponentTransferFunctionElement::JSSVGComponentTransferFunctionElement(Structure* structure, JSDOMGlobalObject& globalObject, Ref<SVGComponentTransferFunctionElement>&& impl) |
| : JSSVGElement(structure, globalObject, WTFMove(impl)) |
| { |
| } |
| |
| JSObject* JSSVGComponentTransferFunctionElement::createPrototype(VM& vm, JSGlobalObject* globalObject) |
| { |
| return JSSVGComponentTransferFunctionElementPrototype::create(vm, globalObject, JSSVGComponentTransferFunctionElementPrototype::createStructure(vm, globalObject, JSSVGElement::prototype(vm, globalObject))); |
| } |
| |
| JSObject* JSSVGComponentTransferFunctionElement::prototype(VM& vm, JSGlobalObject* globalObject) |
| { |
| return getDOMPrototype<JSSVGComponentTransferFunctionElement>(vm, globalObject); |
| } |
| |
| EncodedJSValue jsSVGComponentTransferFunctionElementType(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDynamicCast<JSSVGComponentTransferFunctionElement*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "SVGComponentTransferFunctionElement", "type"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto obj = impl.typeAnimated(); |
| JSValue result = toJS(state, castedThis->globalObject(), obj.get()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsSVGComponentTransferFunctionElementTableValues(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDynamicCast<JSSVGComponentTransferFunctionElement*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "SVGComponentTransferFunctionElement", "tableValues"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto obj = impl.tableValuesAnimated(); |
| JSValue result = toJS(state, castedThis->globalObject(), obj.get()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsSVGComponentTransferFunctionElementSlope(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDynamicCast<JSSVGComponentTransferFunctionElement*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "SVGComponentTransferFunctionElement", "slope"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto obj = impl.slopeAnimated(); |
| JSValue result = toJS(state, castedThis->globalObject(), obj.get()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsSVGComponentTransferFunctionElementIntercept(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDynamicCast<JSSVGComponentTransferFunctionElement*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "SVGComponentTransferFunctionElement", "intercept"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto obj = impl.interceptAnimated(); |
| JSValue result = toJS(state, castedThis->globalObject(), obj.get()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsSVGComponentTransferFunctionElementAmplitude(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDynamicCast<JSSVGComponentTransferFunctionElement*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "SVGComponentTransferFunctionElement", "amplitude"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto obj = impl.amplitudeAnimated(); |
| JSValue result = toJS(state, castedThis->globalObject(), obj.get()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsSVGComponentTransferFunctionElementExponent(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDynamicCast<JSSVGComponentTransferFunctionElement*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "SVGComponentTransferFunctionElement", "exponent"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto obj = impl.exponentAnimated(); |
| JSValue result = toJS(state, castedThis->globalObject(), obj.get()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsSVGComponentTransferFunctionElementOffset(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDynamicCast<JSSVGComponentTransferFunctionElement*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "SVGComponentTransferFunctionElement", "offset"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto obj = impl.offsetAnimated(); |
| JSValue result = toJS(state, castedThis->globalObject(), obj.get()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsSVGComponentTransferFunctionElementConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| JSSVGComponentTransferFunctionElementPrototype* domObject = jsDynamicCast<JSSVGComponentTransferFunctionElementPrototype*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!domObject)) |
| return throwVMTypeError(state, throwScope); |
| return JSValue::encode(JSSVGComponentTransferFunctionElement::getConstructor(state->vm(), domObject->globalObject())); |
| } |
| |
| bool setJSSVGComponentTransferFunctionElementConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| JSValue value = JSValue::decode(encodedValue); |
| JSSVGComponentTransferFunctionElementPrototype* domObject = jsDynamicCast<JSSVGComponentTransferFunctionElementPrototype*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!domObject)) { |
| throwVMTypeError(state, throwScope); |
| return false; |
| } |
| // Shadowing a built-in constructor |
| return domObject->putDirect(state->vm(), state->propertyNames().constructor, value); |
| } |
| |
| JSValue JSSVGComponentTransferFunctionElement::getConstructor(VM& vm, const JSGlobalObject* globalObject) |
| { |
| return getDOMConstructor<JSSVGComponentTransferFunctionElementConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject)); |
| } |
| |
| void JSSVGComponentTransferFunctionElement::visitChildren(JSCell* cell, SlotVisitor& visitor) |
| { |
| auto* thisObject = jsCast<JSSVGComponentTransferFunctionElement*>(cell); |
| ASSERT_GC_OBJECT_INHERITS(thisObject, info()); |
| Base::visitChildren(thisObject, visitor); |
| thisObject->wrapped().visitJSEventListeners(visitor); |
| } |
| |
| |
| } |