blob: 027000afdb1dec0c75a10f15e05799573df2eb0a [file] [log] [blame]
/*
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 "JSSVGFEMorphologyElement.h"
#include "ExceptionCode.h"
#include "JSDOMBinding.h"
#include "JSDOMConstructor.h"
#include "JSDOMConvert.h"
#include "JSSVGAnimatedEnumeration.h"
#include "JSSVGAnimatedLength.h"
#include "JSSVGAnimatedNumber.h"
#include "JSSVGAnimatedString.h"
#include <runtime/Error.h>
#include <wtf/GetPtr.h>
using namespace JSC;
namespace WebCore {
// Functions
JSC::EncodedJSValue JSC_HOST_CALL jsSVGFEMorphologyElementPrototypeFunctionSetRadius(JSC::ExecState*);
// Attributes
JSC::EncodedJSValue jsSVGFEMorphologyElementIn1(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsSVGFEMorphologyElementOperator(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsSVGFEMorphologyElementRadiusX(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsSVGFEMorphologyElementRadiusY(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsSVGFEMorphologyElementX(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsSVGFEMorphologyElementY(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsSVGFEMorphologyElementWidth(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsSVGFEMorphologyElementHeight(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsSVGFEMorphologyElementResult(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsSVGFEMorphologyElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSSVGFEMorphologyElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
class JSSVGFEMorphologyElementPrototype : public JSC::JSNonFinalObject {
public:
typedef JSC::JSNonFinalObject Base;
static JSSVGFEMorphologyElementPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
{
JSSVGFEMorphologyElementPrototype* ptr = new (NotNull, JSC::allocateCell<JSSVGFEMorphologyElementPrototype>(vm.heap)) JSSVGFEMorphologyElementPrototype(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:
JSSVGFEMorphologyElementPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
: JSC::JSNonFinalObject(vm, structure)
{
}
void finishCreation(JSC::VM&);
};
typedef JSDOMConstructorNotConstructable<JSSVGFEMorphologyElement> JSSVGFEMorphologyElementConstructor;
/* Hash table for constructor */
static const HashTableValue JSSVGFEMorphologyElementConstructorTableValues[] =
{
{ "SVG_MORPHOLOGY_OPERATOR_UNKNOWN", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0) } },
{ "SVG_MORPHOLOGY_OPERATOR_ERODE", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(1) } },
{ "SVG_MORPHOLOGY_OPERATOR_DILATE", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(2) } },
};
template<> JSValue JSSVGFEMorphologyElementConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
{
return JSSVGElement::getConstructor(vm, &globalObject);
}
template<> void JSSVGFEMorphologyElementConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
{
putDirect(vm, vm.propertyNames->prototype, JSSVGFEMorphologyElement::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);
putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("SVGFEMorphologyElement"))), ReadOnly | DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
reifyStaticProperties(vm, JSSVGFEMorphologyElementConstructorTableValues, *this);
}
template<> const ClassInfo JSSVGFEMorphologyElementConstructor::s_info = { "SVGFEMorphologyElement", &Base::s_info, 0, CREATE_METHOD_TABLE(JSSVGFEMorphologyElementConstructor) };
/* Hash table for prototype */
static const HashTableValue JSSVGFEMorphologyElementPrototypeTableValues[] =
{
{ "constructor", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGFEMorphologyElementConstructor) } },
{ "in1", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementIn1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
{ "operator", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementOperator), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
{ "radiusX", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementRadiusX), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
{ "radiusY", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementRadiusY), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
{ "x", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementX), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
{ "y", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementY), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
{ "width", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementWidth), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
{ "height", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementHeight), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
{ "result", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEMorphologyElementResult), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
{ "setRadius", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsSVGFEMorphologyElementPrototypeFunctionSetRadius), (intptr_t) (0) } },
{ "SVG_MORPHOLOGY_OPERATOR_UNKNOWN", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0) } },
{ "SVG_MORPHOLOGY_OPERATOR_ERODE", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(1) } },
{ "SVG_MORPHOLOGY_OPERATOR_DILATE", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(2) } },
};
const ClassInfo JSSVGFEMorphologyElementPrototype::s_info = { "SVGFEMorphologyElementPrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSSVGFEMorphologyElementPrototype) };
void JSSVGFEMorphologyElementPrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
reifyStaticProperties(vm, JSSVGFEMorphologyElementPrototypeTableValues, *this);
}
const ClassInfo JSSVGFEMorphologyElement::s_info = { "SVGFEMorphologyElement", &Base::s_info, 0, CREATE_METHOD_TABLE(JSSVGFEMorphologyElement) };
JSSVGFEMorphologyElement::JSSVGFEMorphologyElement(Structure* structure, JSDOMGlobalObject& globalObject, Ref<SVGFEMorphologyElement>&& impl)
: JSSVGElement(structure, globalObject, WTFMove(impl))
{
}
JSObject* JSSVGFEMorphologyElement::createPrototype(VM& vm, JSGlobalObject* globalObject)
{
return JSSVGFEMorphologyElementPrototype::create(vm, globalObject, JSSVGFEMorphologyElementPrototype::createStructure(vm, globalObject, JSSVGElement::prototype(vm, globalObject)));
}
JSObject* JSSVGFEMorphologyElement::prototype(VM& vm, JSGlobalObject* globalObject)
{
return getDOMPrototype<JSSVGFEMorphologyElement>(vm, globalObject);
}
EncodedJSValue jsSVGFEMorphologyElementIn1(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<JSSVGFEMorphologyElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGFEMorphologyElement", "in1");
}
auto& impl = castedThis->wrapped();
auto obj = impl.in1Animated();
JSValue result = toJS(state, castedThis->globalObject(), obj.get());
return JSValue::encode(result);
}
EncodedJSValue jsSVGFEMorphologyElementOperator(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<JSSVGFEMorphologyElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGFEMorphologyElement", "operator");
}
auto& impl = castedThis->wrapped();
auto obj = impl.svgOperatorAnimated();
JSValue result = toJS(state, castedThis->globalObject(), obj.get());
return JSValue::encode(result);
}
EncodedJSValue jsSVGFEMorphologyElementRadiusX(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<JSSVGFEMorphologyElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGFEMorphologyElement", "radiusX");
}
auto& impl = castedThis->wrapped();
auto obj = impl.radiusXAnimated();
JSValue result = toJS(state, castedThis->globalObject(), obj.get());
return JSValue::encode(result);
}
EncodedJSValue jsSVGFEMorphologyElementRadiusY(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<JSSVGFEMorphologyElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGFEMorphologyElement", "radiusY");
}
auto& impl = castedThis->wrapped();
auto obj = impl.radiusYAnimated();
JSValue result = toJS(state, castedThis->globalObject(), obj.get());
return JSValue::encode(result);
}
EncodedJSValue jsSVGFEMorphologyElementX(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<JSSVGFEMorphologyElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGFEMorphologyElement", "x");
}
auto& impl = castedThis->wrapped();
auto obj = impl.xAnimated();
JSValue result = toJS(state, castedThis->globalObject(), obj.get());
return JSValue::encode(result);
}
EncodedJSValue jsSVGFEMorphologyElementY(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<JSSVGFEMorphologyElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGFEMorphologyElement", "y");
}
auto& impl = castedThis->wrapped();
auto obj = impl.yAnimated();
JSValue result = toJS(state, castedThis->globalObject(), obj.get());
return JSValue::encode(result);
}
EncodedJSValue jsSVGFEMorphologyElementWidth(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<JSSVGFEMorphologyElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGFEMorphologyElement", "width");
}
auto& impl = castedThis->wrapped();
auto obj = impl.widthAnimated();
JSValue result = toJS(state, castedThis->globalObject(), obj.get());
return JSValue::encode(result);
}
EncodedJSValue jsSVGFEMorphologyElementHeight(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<JSSVGFEMorphologyElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGFEMorphologyElement", "height");
}
auto& impl = castedThis->wrapped();
auto obj = impl.heightAnimated();
JSValue result = toJS(state, castedThis->globalObject(), obj.get());
return JSValue::encode(result);
}
EncodedJSValue jsSVGFEMorphologyElementResult(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<JSSVGFEMorphologyElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGFEMorphologyElement", "result");
}
auto& impl = castedThis->wrapped();
auto obj = impl.resultAnimated();
JSValue result = toJS(state, castedThis->globalObject(), obj.get());
return JSValue::encode(result);
}
EncodedJSValue jsSVGFEMorphologyElementConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
JSSVGFEMorphologyElementPrototype* domObject = jsDynamicCast<JSSVGFEMorphologyElementPrototype*>(JSValue::decode(thisValue));
if (UNLIKELY(!domObject))
return throwVMTypeError(state, throwScope);
return JSValue::encode(JSSVGFEMorphologyElement::getConstructor(state->vm(), domObject->globalObject()));
}
bool setJSSVGFEMorphologyElementConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
JSValue value = JSValue::decode(encodedValue);
JSSVGFEMorphologyElementPrototype* domObject = jsDynamicCast<JSSVGFEMorphologyElementPrototype*>(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 JSSVGFEMorphologyElement::getConstructor(VM& vm, const JSGlobalObject* globalObject)
{
return getDOMConstructor<JSSVGFEMorphologyElementConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
}
EncodedJSValue JSC_HOST_CALL jsSVGFEMorphologyElementPrototypeFunctionSetRadius(ExecState* state)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue thisValue = state->thisValue();
auto castedThis = jsDynamicCast<JSSVGFEMorphologyElement*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*state, throwScope, "SVGFEMorphologyElement", "setRadius");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSSVGFEMorphologyElement::info());
auto& impl = castedThis->wrapped();
auto radiusX = convert<float>(*state, state->argument(0), ShouldAllowNonFinite::Yes);
RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
auto radiusY = convert<float>(*state, state->argument(1), ShouldAllowNonFinite::Yes);
RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
impl.setRadius(WTFMove(radiusX), WTFMove(radiusY));
return JSValue::encode(jsUndefined());
}
void JSSVGFEMorphologyElement::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
auto* thisObject = jsCast<JSSVGFEMorphologyElement*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, info());
Base::visitChildren(thisObject, visitor);
thisObject->wrapped().visitJSEventListeners(visitor);
}
}