blob: 2035dfd42e50f6c8804a384e205fc7ee249bef3c [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 "JSSVGFEFloodElement.h"
#include "JSDOMBinding.h"
#include "JSDOMConstructor.h"
#include "JSSVGAnimatedLength.h"
#include "JSSVGAnimatedString.h"
#include <wtf/GetPtr.h>
using namespace JSC;
namespace WebCore {
// Attributes
JSC::EncodedJSValue jsSVGFEFloodElementX(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsSVGFEFloodElementY(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsSVGFEFloodElementWidth(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsSVGFEFloodElementHeight(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsSVGFEFloodElementResult(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsSVGFEFloodElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSSVGFEFloodElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
class JSSVGFEFloodElementPrototype : public JSC::JSNonFinalObject {
public:
typedef JSC::JSNonFinalObject Base;
static JSSVGFEFloodElementPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
{
JSSVGFEFloodElementPrototype* ptr = new (NotNull, JSC::allocateCell<JSSVGFEFloodElementPrototype>(vm.heap)) JSSVGFEFloodElementPrototype(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:
JSSVGFEFloodElementPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
: JSC::JSNonFinalObject(vm, structure)
{
}
void finishCreation(JSC::VM&);
};
typedef JSDOMConstructorNotConstructable<JSSVGFEFloodElement> JSSVGFEFloodElementConstructor;
template<> JSValue JSSVGFEFloodElementConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
{
return JSSVGElement::getConstructor(vm, &globalObject);
}
template<> void JSSVGFEFloodElementConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
{
putDirect(vm, vm.propertyNames->prototype, JSSVGFEFloodElement::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);
putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("SVGFEFloodElement"))), ReadOnly | DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
}
template<> const ClassInfo JSSVGFEFloodElementConstructor::s_info = { "SVGFEFloodElement", &Base::s_info, 0, CREATE_METHOD_TABLE(JSSVGFEFloodElementConstructor) };
/* Hash table for prototype */
static const HashTableValue JSSVGFEFloodElementPrototypeTableValues[] =
{
{ "constructor", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEFloodElementConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGFEFloodElementConstructor) } },
{ "x", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEFloodElementX), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
{ "y", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEFloodElementY), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
{ "width", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEFloodElementWidth), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
{ "height", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEFloodElementHeight), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
{ "result", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEFloodElementResult), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
};
const ClassInfo JSSVGFEFloodElementPrototype::s_info = { "SVGFEFloodElementPrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSSVGFEFloodElementPrototype) };
void JSSVGFEFloodElementPrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
reifyStaticProperties(vm, JSSVGFEFloodElementPrototypeTableValues, *this);
}
const ClassInfo JSSVGFEFloodElement::s_info = { "SVGFEFloodElement", &Base::s_info, 0, CREATE_METHOD_TABLE(JSSVGFEFloodElement) };
JSSVGFEFloodElement::JSSVGFEFloodElement(Structure* structure, JSDOMGlobalObject& globalObject, Ref<SVGFEFloodElement>&& impl)
: JSSVGElement(structure, globalObject, WTFMove(impl))
{
}
JSObject* JSSVGFEFloodElement::createPrototype(VM& vm, JSGlobalObject* globalObject)
{
return JSSVGFEFloodElementPrototype::create(vm, globalObject, JSSVGFEFloodElementPrototype::createStructure(vm, globalObject, JSSVGElement::prototype(vm, globalObject)));
}
JSObject* JSSVGFEFloodElement::prototype(VM& vm, JSGlobalObject* globalObject)
{
return getDOMPrototype<JSSVGFEFloodElement>(vm, globalObject);
}
EncodedJSValue jsSVGFEFloodElementX(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<JSSVGFEFloodElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGFEFloodElement", "x");
}
auto& impl = castedThis->wrapped();
auto obj = impl.xAnimated();
JSValue result = toJS(state, castedThis->globalObject(), obj.get());
return JSValue::encode(result);
}
EncodedJSValue jsSVGFEFloodElementY(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<JSSVGFEFloodElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGFEFloodElement", "y");
}
auto& impl = castedThis->wrapped();
auto obj = impl.yAnimated();
JSValue result = toJS(state, castedThis->globalObject(), obj.get());
return JSValue::encode(result);
}
EncodedJSValue jsSVGFEFloodElementWidth(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<JSSVGFEFloodElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGFEFloodElement", "width");
}
auto& impl = castedThis->wrapped();
auto obj = impl.widthAnimated();
JSValue result = toJS(state, castedThis->globalObject(), obj.get());
return JSValue::encode(result);
}
EncodedJSValue jsSVGFEFloodElementHeight(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<JSSVGFEFloodElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGFEFloodElement", "height");
}
auto& impl = castedThis->wrapped();
auto obj = impl.heightAnimated();
JSValue result = toJS(state, castedThis->globalObject(), obj.get());
return JSValue::encode(result);
}
EncodedJSValue jsSVGFEFloodElementResult(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<JSSVGFEFloodElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGFEFloodElement", "result");
}
auto& impl = castedThis->wrapped();
auto obj = impl.resultAnimated();
JSValue result = toJS(state, castedThis->globalObject(), obj.get());
return JSValue::encode(result);
}
EncodedJSValue jsSVGFEFloodElementConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
JSSVGFEFloodElementPrototype* domObject = jsDynamicCast<JSSVGFEFloodElementPrototype*>(JSValue::decode(thisValue));
if (UNLIKELY(!domObject))
return throwVMTypeError(state, throwScope);
return JSValue::encode(JSSVGFEFloodElement::getConstructor(state->vm(), domObject->globalObject()));
}
bool setJSSVGFEFloodElementConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
JSValue value = JSValue::decode(encodedValue);
JSSVGFEFloodElementPrototype* domObject = jsDynamicCast<JSSVGFEFloodElementPrototype*>(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 JSSVGFEFloodElement::getConstructor(VM& vm, const JSGlobalObject* globalObject)
{
return getDOMConstructor<JSSVGFEFloodElementConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
}
void JSSVGFEFloodElement::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
auto* thisObject = jsCast<JSSVGFEFloodElement*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, info());
Base::visitChildren(thisObject, visitor);
thisObject->wrapped().visitJSEventListeners(visitor);
}
}