blob: c61fcd31ebaf2f68bb9afde4d72913578d7890fa [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 "JSSVGRadialGradientElement.h"
#include "JSDOMBinding.h"
#include "JSDOMConstructor.h"
#include "JSSVGAnimatedLength.h"
#include <wtf/GetPtr.h>
using namespace JSC;
namespace WebCore {
// Attributes
JSC::EncodedJSValue jsSVGRadialGradientElementCx(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsSVGRadialGradientElementCy(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsSVGRadialGradientElementR(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsSVGRadialGradientElementFx(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsSVGRadialGradientElementFy(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsSVGRadialGradientElementFr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsSVGRadialGradientElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSSVGRadialGradientElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
class JSSVGRadialGradientElementPrototype : public JSC::JSNonFinalObject {
public:
typedef JSC::JSNonFinalObject Base;
static JSSVGRadialGradientElementPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
{
JSSVGRadialGradientElementPrototype* ptr = new (NotNull, JSC::allocateCell<JSSVGRadialGradientElementPrototype>(vm.heap)) JSSVGRadialGradientElementPrototype(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:
JSSVGRadialGradientElementPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
: JSC::JSNonFinalObject(vm, structure)
{
}
void finishCreation(JSC::VM&);
};
typedef JSDOMConstructorNotConstructable<JSSVGRadialGradientElement> JSSVGRadialGradientElementConstructor;
template<> JSValue JSSVGRadialGradientElementConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
{
return JSSVGGradientElement::getConstructor(vm, &globalObject);
}
template<> void JSSVGRadialGradientElementConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
{
putDirect(vm, vm.propertyNames->prototype, JSSVGRadialGradientElement::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);
putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("SVGRadialGradientElement"))), ReadOnly | DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
}
template<> const ClassInfo JSSVGRadialGradientElementConstructor::s_info = { "SVGRadialGradientElement", &Base::s_info, 0, CREATE_METHOD_TABLE(JSSVGRadialGradientElementConstructor) };
/* Hash table for prototype */
static const HashTableValue JSSVGRadialGradientElementPrototypeTableValues[] =
{
{ "constructor", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGRadialGradientElementConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGRadialGradientElementConstructor) } },
{ "cx", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGRadialGradientElementCx), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
{ "cy", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGRadialGradientElementCy), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
{ "r", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGRadialGradientElementR), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
{ "fx", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGRadialGradientElementFx), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
{ "fy", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGRadialGradientElementFy), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
{ "fr", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGRadialGradientElementFr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
};
const ClassInfo JSSVGRadialGradientElementPrototype::s_info = { "SVGRadialGradientElementPrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSSVGRadialGradientElementPrototype) };
void JSSVGRadialGradientElementPrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
reifyStaticProperties(vm, JSSVGRadialGradientElementPrototypeTableValues, *this);
}
const ClassInfo JSSVGRadialGradientElement::s_info = { "SVGRadialGradientElement", &Base::s_info, 0, CREATE_METHOD_TABLE(JSSVGRadialGradientElement) };
JSSVGRadialGradientElement::JSSVGRadialGradientElement(Structure* structure, JSDOMGlobalObject& globalObject, Ref<SVGRadialGradientElement>&& impl)
: JSSVGGradientElement(structure, globalObject, WTFMove(impl))
{
}
JSObject* JSSVGRadialGradientElement::createPrototype(VM& vm, JSGlobalObject* globalObject)
{
return JSSVGRadialGradientElementPrototype::create(vm, globalObject, JSSVGRadialGradientElementPrototype::createStructure(vm, globalObject, JSSVGGradientElement::prototype(vm, globalObject)));
}
JSObject* JSSVGRadialGradientElement::prototype(VM& vm, JSGlobalObject* globalObject)
{
return getDOMPrototype<JSSVGRadialGradientElement>(vm, globalObject);
}
EncodedJSValue jsSVGRadialGradientElementCx(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<JSSVGRadialGradientElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGRadialGradientElement", "cx");
}
auto& impl = castedThis->wrapped();
auto obj = impl.cxAnimated();
JSValue result = toJS(state, castedThis->globalObject(), obj.get());
return JSValue::encode(result);
}
EncodedJSValue jsSVGRadialGradientElementCy(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<JSSVGRadialGradientElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGRadialGradientElement", "cy");
}
auto& impl = castedThis->wrapped();
auto obj = impl.cyAnimated();
JSValue result = toJS(state, castedThis->globalObject(), obj.get());
return JSValue::encode(result);
}
EncodedJSValue jsSVGRadialGradientElementR(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<JSSVGRadialGradientElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGRadialGradientElement", "r");
}
auto& impl = castedThis->wrapped();
auto obj = impl.rAnimated();
JSValue result = toJS(state, castedThis->globalObject(), obj.get());
return JSValue::encode(result);
}
EncodedJSValue jsSVGRadialGradientElementFx(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<JSSVGRadialGradientElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGRadialGradientElement", "fx");
}
auto& impl = castedThis->wrapped();
auto obj = impl.fxAnimated();
JSValue result = toJS(state, castedThis->globalObject(), obj.get());
return JSValue::encode(result);
}
EncodedJSValue jsSVGRadialGradientElementFy(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<JSSVGRadialGradientElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGRadialGradientElement", "fy");
}
auto& impl = castedThis->wrapped();
auto obj = impl.fyAnimated();
JSValue result = toJS(state, castedThis->globalObject(), obj.get());
return JSValue::encode(result);
}
EncodedJSValue jsSVGRadialGradientElementFr(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<JSSVGRadialGradientElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGRadialGradientElement", "fr");
}
auto& impl = castedThis->wrapped();
auto obj = impl.frAnimated();
JSValue result = toJS(state, castedThis->globalObject(), obj.get());
return JSValue::encode(result);
}
EncodedJSValue jsSVGRadialGradientElementConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
JSSVGRadialGradientElementPrototype* domObject = jsDynamicCast<JSSVGRadialGradientElementPrototype*>(JSValue::decode(thisValue));
if (UNLIKELY(!domObject))
return throwVMTypeError(state, throwScope);
return JSValue::encode(JSSVGRadialGradientElement::getConstructor(state->vm(), domObject->globalObject()));
}
bool setJSSVGRadialGradientElementConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
JSValue value = JSValue::decode(encodedValue);
JSSVGRadialGradientElementPrototype* domObject = jsDynamicCast<JSSVGRadialGradientElementPrototype*>(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 JSSVGRadialGradientElement::getConstructor(VM& vm, const JSGlobalObject* globalObject)
{
return getDOMConstructor<JSSVGRadialGradientElementConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
}
void JSSVGRadialGradientElement::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
auto* thisObject = jsCast<JSSVGRadialGradientElement*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, info());
Base::visitChildren(thisObject, visitor);
thisObject->wrapped().visitJSEventListeners(visitor);
}
}