blob: 19eaaf7d2c43f0b69604dd6acfe7dd4ce12fe2ec [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 "JSSVGPathSegCurvetoCubicRel.h"
#include "JSDOMBinding.h"
#include "JSDOMConstructor.h"
#include "JSDOMConvert.h"
#include <wtf/GetPtr.h>
using namespace JSC;
namespace WebCore {
// Attributes
JSC::EncodedJSValue jsSVGPathSegCurvetoCubicRelX(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSSVGPathSegCurvetoCubicRelX(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsSVGPathSegCurvetoCubicRelY(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSSVGPathSegCurvetoCubicRelY(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsSVGPathSegCurvetoCubicRelX1(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSSVGPathSegCurvetoCubicRelX1(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsSVGPathSegCurvetoCubicRelY1(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSSVGPathSegCurvetoCubicRelY1(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsSVGPathSegCurvetoCubicRelX2(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSSVGPathSegCurvetoCubicRelX2(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsSVGPathSegCurvetoCubicRelY2(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSSVGPathSegCurvetoCubicRelY2(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsSVGPathSegCurvetoCubicRelConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSSVGPathSegCurvetoCubicRelConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
class JSSVGPathSegCurvetoCubicRelPrototype : public JSC::JSNonFinalObject {
public:
typedef JSC::JSNonFinalObject Base;
static JSSVGPathSegCurvetoCubicRelPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
{
JSSVGPathSegCurvetoCubicRelPrototype* ptr = new (NotNull, JSC::allocateCell<JSSVGPathSegCurvetoCubicRelPrototype>(vm.heap)) JSSVGPathSegCurvetoCubicRelPrototype(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:
JSSVGPathSegCurvetoCubicRelPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
: JSC::JSNonFinalObject(vm, structure)
{
}
void finishCreation(JSC::VM&);
};
typedef JSDOMConstructorNotConstructable<JSSVGPathSegCurvetoCubicRel> JSSVGPathSegCurvetoCubicRelConstructor;
template<> JSValue JSSVGPathSegCurvetoCubicRelConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
{
return JSSVGPathSeg::getConstructor(vm, &globalObject);
}
template<> void JSSVGPathSegCurvetoCubicRelConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
{
putDirect(vm, vm.propertyNames->prototype, JSSVGPathSegCurvetoCubicRel::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);
putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("SVGPathSegCurvetoCubicRel"))), ReadOnly | DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
}
template<> const ClassInfo JSSVGPathSegCurvetoCubicRelConstructor::s_info = { "SVGPathSegCurvetoCubicRel", &Base::s_info, 0, CREATE_METHOD_TABLE(JSSVGPathSegCurvetoCubicRelConstructor) };
/* Hash table for prototype */
static const HashTableValue JSSVGPathSegCurvetoCubicRelPrototypeTableValues[] =
{
{ "constructor", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicRelConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicRelConstructor) } },
{ "x", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicRelX), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicRelX) } },
{ "y", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicRelY), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicRelY) } },
{ "x1", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicRelX1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicRelX1) } },
{ "y1", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicRelY1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicRelY1) } },
{ "x2", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicRelX2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicRelX2) } },
{ "y2", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicRelY2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicRelY2) } },
};
const ClassInfo JSSVGPathSegCurvetoCubicRelPrototype::s_info = { "SVGPathSegCurvetoCubicRelPrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSSVGPathSegCurvetoCubicRelPrototype) };
void JSSVGPathSegCurvetoCubicRelPrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
reifyStaticProperties(vm, JSSVGPathSegCurvetoCubicRelPrototypeTableValues, *this);
}
const ClassInfo JSSVGPathSegCurvetoCubicRel::s_info = { "SVGPathSegCurvetoCubicRel", &Base::s_info, 0, CREATE_METHOD_TABLE(JSSVGPathSegCurvetoCubicRel) };
JSSVGPathSegCurvetoCubicRel::JSSVGPathSegCurvetoCubicRel(Structure* structure, JSDOMGlobalObject& globalObject, Ref<SVGPathSegCurvetoCubicRel>&& impl)
: JSSVGPathSeg(structure, globalObject, WTFMove(impl))
{
}
JSObject* JSSVGPathSegCurvetoCubicRel::createPrototype(VM& vm, JSGlobalObject* globalObject)
{
return JSSVGPathSegCurvetoCubicRelPrototype::create(vm, globalObject, JSSVGPathSegCurvetoCubicRelPrototype::createStructure(vm, globalObject, JSSVGPathSeg::prototype(vm, globalObject)));
}
JSObject* JSSVGPathSegCurvetoCubicRel::prototype(VM& vm, JSGlobalObject* globalObject)
{
return getDOMPrototype<JSSVGPathSegCurvetoCubicRel>(vm, globalObject);
}
EncodedJSValue jsSVGPathSegCurvetoCubicRelX(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<JSSVGPathSegCurvetoCubicRel*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicRel", "x");
}
auto& impl = castedThis->wrapped();
JSValue result = jsNumber(impl.x());
return JSValue::encode(result);
}
EncodedJSValue jsSVGPathSegCurvetoCubicRelY(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<JSSVGPathSegCurvetoCubicRel*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicRel", "y");
}
auto& impl = castedThis->wrapped();
JSValue result = jsNumber(impl.y());
return JSValue::encode(result);
}
EncodedJSValue jsSVGPathSegCurvetoCubicRelX1(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<JSSVGPathSegCurvetoCubicRel*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicRel", "x1");
}
auto& impl = castedThis->wrapped();
JSValue result = jsNumber(impl.x1());
return JSValue::encode(result);
}
EncodedJSValue jsSVGPathSegCurvetoCubicRelY1(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<JSSVGPathSegCurvetoCubicRel*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicRel", "y1");
}
auto& impl = castedThis->wrapped();
JSValue result = jsNumber(impl.y1());
return JSValue::encode(result);
}
EncodedJSValue jsSVGPathSegCurvetoCubicRelX2(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<JSSVGPathSegCurvetoCubicRel*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicRel", "x2");
}
auto& impl = castedThis->wrapped();
JSValue result = jsNumber(impl.x2());
return JSValue::encode(result);
}
EncodedJSValue jsSVGPathSegCurvetoCubicRelY2(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<JSSVGPathSegCurvetoCubicRel*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicRel", "y2");
}
auto& impl = castedThis->wrapped();
JSValue result = jsNumber(impl.y2());
return JSValue::encode(result);
}
EncodedJSValue jsSVGPathSegCurvetoCubicRelConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
JSSVGPathSegCurvetoCubicRelPrototype* domObject = jsDynamicCast<JSSVGPathSegCurvetoCubicRelPrototype*>(JSValue::decode(thisValue));
if (UNLIKELY(!domObject))
return throwVMTypeError(state, throwScope);
return JSValue::encode(JSSVGPathSegCurvetoCubicRel::getConstructor(state->vm(), domObject->globalObject()));
}
bool setJSSVGPathSegCurvetoCubicRelConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
JSValue value = JSValue::decode(encodedValue);
JSSVGPathSegCurvetoCubicRelPrototype* domObject = jsDynamicCast<JSSVGPathSegCurvetoCubicRelPrototype*>(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);
}
bool setJSSVGPathSegCurvetoCubicRelX(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSSVGPathSegCurvetoCubicRel* castedThis = jsDynamicCast<JSSVGPathSegCurvetoCubicRel*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicRel", "x");
}
auto& impl = castedThis->wrapped();
auto nativeValue = convert<float>(*state, value, ShouldAllowNonFinite::Yes);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setX(WTFMove(nativeValue));
return true;
}
bool setJSSVGPathSegCurvetoCubicRelY(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSSVGPathSegCurvetoCubicRel* castedThis = jsDynamicCast<JSSVGPathSegCurvetoCubicRel*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicRel", "y");
}
auto& impl = castedThis->wrapped();
auto nativeValue = convert<float>(*state, value, ShouldAllowNonFinite::Yes);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setY(WTFMove(nativeValue));
return true;
}
bool setJSSVGPathSegCurvetoCubicRelX1(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSSVGPathSegCurvetoCubicRel* castedThis = jsDynamicCast<JSSVGPathSegCurvetoCubicRel*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicRel", "x1");
}
auto& impl = castedThis->wrapped();
auto nativeValue = convert<float>(*state, value, ShouldAllowNonFinite::Yes);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setX1(WTFMove(nativeValue));
return true;
}
bool setJSSVGPathSegCurvetoCubicRelY1(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSSVGPathSegCurvetoCubicRel* castedThis = jsDynamicCast<JSSVGPathSegCurvetoCubicRel*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicRel", "y1");
}
auto& impl = castedThis->wrapped();
auto nativeValue = convert<float>(*state, value, ShouldAllowNonFinite::Yes);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setY1(WTFMove(nativeValue));
return true;
}
bool setJSSVGPathSegCurvetoCubicRelX2(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSSVGPathSegCurvetoCubicRel* castedThis = jsDynamicCast<JSSVGPathSegCurvetoCubicRel*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicRel", "x2");
}
auto& impl = castedThis->wrapped();
auto nativeValue = convert<float>(*state, value, ShouldAllowNonFinite::Yes);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setX2(WTFMove(nativeValue));
return true;
}
bool setJSSVGPathSegCurvetoCubicRelY2(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSSVGPathSegCurvetoCubicRel* castedThis = jsDynamicCast<JSSVGPathSegCurvetoCubicRel*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicRel", "y2");
}
auto& impl = castedThis->wrapped();
auto nativeValue = convert<float>(*state, value, ShouldAllowNonFinite::Yes);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setY2(WTFMove(nativeValue));
return true;
}
JSValue JSSVGPathSegCurvetoCubicRel::getConstructor(VM& vm, const JSGlobalObject* globalObject)
{
return getDOMConstructor<JSSVGPathSegCurvetoCubicRelConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
}
}