| /* |
| 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 "JSSVGFEOffsetElement.h" |
| |
| #include "JSDOMBinding.h" |
| #include "JSDOMConstructor.h" |
| #include "JSSVGAnimatedLength.h" |
| #include "JSSVGAnimatedNumber.h" |
| #include "JSSVGAnimatedString.h" |
| #include <wtf/GetPtr.h> |
| |
| using namespace JSC; |
| |
| namespace WebCore { |
| |
| // Attributes |
| |
| JSC::EncodedJSValue jsSVGFEOffsetElementIn1(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsSVGFEOffsetElementDx(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsSVGFEOffsetElementDy(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsSVGFEOffsetElementX(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsSVGFEOffsetElementY(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsSVGFEOffsetElementWidth(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsSVGFEOffsetElementHeight(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsSVGFEOffsetElementResult(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsSVGFEOffsetElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSSVGFEOffsetElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| |
| class JSSVGFEOffsetElementPrototype : public JSC::JSNonFinalObject { |
| public: |
| typedef JSC::JSNonFinalObject Base; |
| static JSSVGFEOffsetElementPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) |
| { |
| JSSVGFEOffsetElementPrototype* ptr = new (NotNull, JSC::allocateCell<JSSVGFEOffsetElementPrototype>(vm.heap)) JSSVGFEOffsetElementPrototype(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: |
| JSSVGFEOffsetElementPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) |
| : JSC::JSNonFinalObject(vm, structure) |
| { |
| } |
| |
| void finishCreation(JSC::VM&); |
| }; |
| |
| typedef JSDOMConstructorNotConstructable<JSSVGFEOffsetElement> JSSVGFEOffsetElementConstructor; |
| |
| template<> JSValue JSSVGFEOffsetElementConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject) |
| { |
| return JSSVGElement::getConstructor(vm, &globalObject); |
| } |
| |
| template<> void JSSVGFEOffsetElementConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) |
| { |
| putDirect(vm, vm.propertyNames->prototype, JSSVGFEOffsetElement::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); |
| putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("SVGFEOffsetElement"))), ReadOnly | DontEnum); |
| putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); |
| } |
| |
| template<> const ClassInfo JSSVGFEOffsetElementConstructor::s_info = { "SVGFEOffsetElement", &Base::s_info, 0, CREATE_METHOD_TABLE(JSSVGFEOffsetElementConstructor) }; |
| |
| /* Hash table for prototype */ |
| |
| static const HashTableValue JSSVGFEOffsetElementPrototypeTableValues[] = |
| { |
| { "constructor", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEOffsetElementConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGFEOffsetElementConstructor) } }, |
| { "in1", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEOffsetElementIn1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "dx", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEOffsetElementDx), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "dy", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEOffsetElementDy), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "x", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEOffsetElementX), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "y", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEOffsetElementY), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "width", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEOffsetElementWidth), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "height", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEOffsetElementHeight), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "result", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEOffsetElementResult), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| }; |
| |
| const ClassInfo JSSVGFEOffsetElementPrototype::s_info = { "SVGFEOffsetElementPrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSSVGFEOffsetElementPrototype) }; |
| |
| void JSSVGFEOffsetElementPrototype::finishCreation(VM& vm) |
| { |
| Base::finishCreation(vm); |
| reifyStaticProperties(vm, JSSVGFEOffsetElementPrototypeTableValues, *this); |
| } |
| |
| const ClassInfo JSSVGFEOffsetElement::s_info = { "SVGFEOffsetElement", &Base::s_info, 0, CREATE_METHOD_TABLE(JSSVGFEOffsetElement) }; |
| |
| JSSVGFEOffsetElement::JSSVGFEOffsetElement(Structure* structure, JSDOMGlobalObject& globalObject, Ref<SVGFEOffsetElement>&& impl) |
| : JSSVGElement(structure, globalObject, WTFMove(impl)) |
| { |
| } |
| |
| JSObject* JSSVGFEOffsetElement::createPrototype(VM& vm, JSGlobalObject* globalObject) |
| { |
| return JSSVGFEOffsetElementPrototype::create(vm, globalObject, JSSVGFEOffsetElementPrototype::createStructure(vm, globalObject, JSSVGElement::prototype(vm, globalObject))); |
| } |
| |
| JSObject* JSSVGFEOffsetElement::prototype(VM& vm, JSGlobalObject* globalObject) |
| { |
| return getDOMPrototype<JSSVGFEOffsetElement>(vm, globalObject); |
| } |
| |
| EncodedJSValue jsSVGFEOffsetElementIn1(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<JSSVGFEOffsetElement*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "SVGFEOffsetElement", "in1"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto obj = impl.in1Animated(); |
| JSValue result = toJS(state, castedThis->globalObject(), obj.get()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsSVGFEOffsetElementDx(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<JSSVGFEOffsetElement*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "SVGFEOffsetElement", "dx"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto obj = impl.dxAnimated(); |
| JSValue result = toJS(state, castedThis->globalObject(), obj.get()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsSVGFEOffsetElementDy(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<JSSVGFEOffsetElement*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "SVGFEOffsetElement", "dy"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto obj = impl.dyAnimated(); |
| JSValue result = toJS(state, castedThis->globalObject(), obj.get()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsSVGFEOffsetElementX(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<JSSVGFEOffsetElement*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "SVGFEOffsetElement", "x"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto obj = impl.xAnimated(); |
| JSValue result = toJS(state, castedThis->globalObject(), obj.get()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsSVGFEOffsetElementY(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<JSSVGFEOffsetElement*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "SVGFEOffsetElement", "y"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto obj = impl.yAnimated(); |
| JSValue result = toJS(state, castedThis->globalObject(), obj.get()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsSVGFEOffsetElementWidth(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<JSSVGFEOffsetElement*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "SVGFEOffsetElement", "width"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto obj = impl.widthAnimated(); |
| JSValue result = toJS(state, castedThis->globalObject(), obj.get()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsSVGFEOffsetElementHeight(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<JSSVGFEOffsetElement*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "SVGFEOffsetElement", "height"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto obj = impl.heightAnimated(); |
| JSValue result = toJS(state, castedThis->globalObject(), obj.get()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsSVGFEOffsetElementResult(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<JSSVGFEOffsetElement*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "SVGFEOffsetElement", "result"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto obj = impl.resultAnimated(); |
| JSValue result = toJS(state, castedThis->globalObject(), obj.get()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsSVGFEOffsetElementConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| JSSVGFEOffsetElementPrototype* domObject = jsDynamicCast<JSSVGFEOffsetElementPrototype*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!domObject)) |
| return throwVMTypeError(state, throwScope); |
| return JSValue::encode(JSSVGFEOffsetElement::getConstructor(state->vm(), domObject->globalObject())); |
| } |
| |
| bool setJSSVGFEOffsetElementConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| JSValue value = JSValue::decode(encodedValue); |
| JSSVGFEOffsetElementPrototype* domObject = jsDynamicCast<JSSVGFEOffsetElementPrototype*>(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 JSSVGFEOffsetElement::getConstructor(VM& vm, const JSGlobalObject* globalObject) |
| { |
| return getDOMConstructor<JSSVGFEOffsetElementConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject)); |
| } |
| |
| void JSSVGFEOffsetElement::visitChildren(JSCell* cell, SlotVisitor& visitor) |
| { |
| auto* thisObject = jsCast<JSSVGFEOffsetElement*>(cell); |
| ASSERT_GC_OBJECT_INHERITS(thisObject, info()); |
| Base::visitChildren(thisObject, visitor); |
| thisObject->wrapped().visitJSEventListeners(visitor); |
| } |
| |
| |
| } |