blob: 93fad6090b7d7ed3da9eb7c93e7db7a4bf92a86a [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 "JSSVGPathSegCurvetoCubicSmoothRel.h"
#include "JSDOMBinding.h"
#include "JSDOMConstructor.h"
#include "JSDOMConvert.h"
#include <wtf/GetPtr.h>
using namespace JSC;
namespace WebCore {
// Attributes
JSC::EncodedJSValue jsSVGPathSegCurvetoCubicSmoothRelX(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSSVGPathSegCurvetoCubicSmoothRelX(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsSVGPathSegCurvetoCubicSmoothRelY(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSSVGPathSegCurvetoCubicSmoothRelY(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsSVGPathSegCurvetoCubicSmoothRelX2(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSSVGPathSegCurvetoCubicSmoothRelX2(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsSVGPathSegCurvetoCubicSmoothRelY2(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSSVGPathSegCurvetoCubicSmoothRelY2(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsSVGPathSegCurvetoCubicSmoothRelConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSSVGPathSegCurvetoCubicSmoothRelConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
class JSSVGPathSegCurvetoCubicSmoothRelPrototype : public JSC::JSNonFinalObject {
public:
typedef JSC::JSNonFinalObject Base;
static JSSVGPathSegCurvetoCubicSmoothRelPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
{
JSSVGPathSegCurvetoCubicSmoothRelPrototype* ptr = new (NotNull, JSC::allocateCell<JSSVGPathSegCurvetoCubicSmoothRelPrototype>(vm.heap)) JSSVGPathSegCurvetoCubicSmoothRelPrototype(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:
JSSVGPathSegCurvetoCubicSmoothRelPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
: JSC::JSNonFinalObject(vm, structure)
{
}
void finishCreation(JSC::VM&);
};
typedef JSDOMConstructorNotConstructable<JSSVGPathSegCurvetoCubicSmoothRel> JSSVGPathSegCurvetoCubicSmoothRelConstructor;
template<> JSValue JSSVGPathSegCurvetoCubicSmoothRelConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
{
return JSSVGPathSeg::getConstructor(vm, &globalObject);
}
template<> void JSSVGPathSegCurvetoCubicSmoothRelConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
{
putDirect(vm, vm.propertyNames->prototype, JSSVGPathSegCurvetoCubicSmoothRel::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);
putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("SVGPathSegCurvetoCubicSmoothRel"))), ReadOnly | DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
}
template<> const ClassInfo JSSVGPathSegCurvetoCubicSmoothRelConstructor::s_info = { "SVGPathSegCurvetoCubicSmoothRel", &Base::s_info, 0, CREATE_METHOD_TABLE(JSSVGPathSegCurvetoCubicSmoothRelConstructor) };
/* Hash table for prototype */
static const HashTableValue JSSVGPathSegCurvetoCubicSmoothRelPrototypeTableValues[] =
{
{ "constructor", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicSmoothRelConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicSmoothRelConstructor) } },
{ "x", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicSmoothRelX), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicSmoothRelX) } },
{ "y", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicSmoothRelY), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicSmoothRelY) } },
{ "x2", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicSmoothRelX2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicSmoothRelX2) } },
{ "y2", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicSmoothRelY2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicSmoothRelY2) } },
};
const ClassInfo JSSVGPathSegCurvetoCubicSmoothRelPrototype::s_info = { "SVGPathSegCurvetoCubicSmoothRelPrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSSVGPathSegCurvetoCubicSmoothRelPrototype) };
void JSSVGPathSegCurvetoCubicSmoothRelPrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
reifyStaticProperties(vm, JSSVGPathSegCurvetoCubicSmoothRelPrototypeTableValues, *this);
}
const ClassInfo JSSVGPathSegCurvetoCubicSmoothRel::s_info = { "SVGPathSegCurvetoCubicSmoothRel", &Base::s_info, 0, CREATE_METHOD_TABLE(JSSVGPathSegCurvetoCubicSmoothRel) };
JSSVGPathSegCurvetoCubicSmoothRel::JSSVGPathSegCurvetoCubicSmoothRel(Structure* structure, JSDOMGlobalObject& globalObject, Ref<SVGPathSegCurvetoCubicSmoothRel>&& impl)
: JSSVGPathSeg(structure, globalObject, WTFMove(impl))
{
}
JSObject* JSSVGPathSegCurvetoCubicSmoothRel::createPrototype(VM& vm, JSGlobalObject* globalObject)
{
return JSSVGPathSegCurvetoCubicSmoothRelPrototype::create(vm, globalObject, JSSVGPathSegCurvetoCubicSmoothRelPrototype::createStructure(vm, globalObject, JSSVGPathSeg::prototype(vm, globalObject)));
}
JSObject* JSSVGPathSegCurvetoCubicSmoothRel::prototype(VM& vm, JSGlobalObject* globalObject)
{
return getDOMPrototype<JSSVGPathSegCurvetoCubicSmoothRel>(vm, globalObject);
}
EncodedJSValue jsSVGPathSegCurvetoCubicSmoothRelX(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<JSSVGPathSegCurvetoCubicSmoothRel*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicSmoothRel", "x");
}
auto& impl = castedThis->wrapped();
JSValue result = jsNumber(impl.x());
return JSValue::encode(result);
}
EncodedJSValue jsSVGPathSegCurvetoCubicSmoothRelY(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<JSSVGPathSegCurvetoCubicSmoothRel*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicSmoothRel", "y");
}
auto& impl = castedThis->wrapped();
JSValue result = jsNumber(impl.y());
return JSValue::encode(result);
}
EncodedJSValue jsSVGPathSegCurvetoCubicSmoothRelX2(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<JSSVGPathSegCurvetoCubicSmoothRel*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicSmoothRel", "x2");
}
auto& impl = castedThis->wrapped();
JSValue result = jsNumber(impl.x2());
return JSValue::encode(result);
}
EncodedJSValue jsSVGPathSegCurvetoCubicSmoothRelY2(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<JSSVGPathSegCurvetoCubicSmoothRel*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicSmoothRel", "y2");
}
auto& impl = castedThis->wrapped();
JSValue result = jsNumber(impl.y2());
return JSValue::encode(result);
}
EncodedJSValue jsSVGPathSegCurvetoCubicSmoothRelConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
JSSVGPathSegCurvetoCubicSmoothRelPrototype* domObject = jsDynamicCast<JSSVGPathSegCurvetoCubicSmoothRelPrototype*>(JSValue::decode(thisValue));
if (UNLIKELY(!domObject))
return throwVMTypeError(state, throwScope);
return JSValue::encode(JSSVGPathSegCurvetoCubicSmoothRel::getConstructor(state->vm(), domObject->globalObject()));
}
bool setJSSVGPathSegCurvetoCubicSmoothRelConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
JSValue value = JSValue::decode(encodedValue);
JSSVGPathSegCurvetoCubicSmoothRelPrototype* domObject = jsDynamicCast<JSSVGPathSegCurvetoCubicSmoothRelPrototype*>(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 setJSSVGPathSegCurvetoCubicSmoothRelX(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);
JSSVGPathSegCurvetoCubicSmoothRel* castedThis = jsDynamicCast<JSSVGPathSegCurvetoCubicSmoothRel*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicSmoothRel", "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 setJSSVGPathSegCurvetoCubicSmoothRelY(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);
JSSVGPathSegCurvetoCubicSmoothRel* castedThis = jsDynamicCast<JSSVGPathSegCurvetoCubicSmoothRel*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicSmoothRel", "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 setJSSVGPathSegCurvetoCubicSmoothRelX2(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);
JSSVGPathSegCurvetoCubicSmoothRel* castedThis = jsDynamicCast<JSSVGPathSegCurvetoCubicSmoothRel*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicSmoothRel", "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 setJSSVGPathSegCurvetoCubicSmoothRelY2(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);
JSSVGPathSegCurvetoCubicSmoothRel* castedThis = jsDynamicCast<JSSVGPathSegCurvetoCubicSmoothRel*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicSmoothRel", "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 JSSVGPathSegCurvetoCubicSmoothRel::getConstructor(VM& vm, const JSGlobalObject* globalObject)
{
return getDOMConstructor<JSSVGPathSegCurvetoCubicSmoothRelConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
}
}