blob: 91c5c483af3fdd2b6e5802eb7dc304168f0228c1 [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 "JSSVGPathSegCurvetoCubicAbs.h"
#include "JSDOMBinding.h"
#include "JSDOMConstructor.h"
#include "JSDOMConvert.h"
#include <wtf/GetPtr.h>
using namespace JSC;
namespace WebCore {
// Attributes
JSC::EncodedJSValue jsSVGPathSegCurvetoCubicAbsX(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSSVGPathSegCurvetoCubicAbsX(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsSVGPathSegCurvetoCubicAbsY(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSSVGPathSegCurvetoCubicAbsY(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsSVGPathSegCurvetoCubicAbsX1(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSSVGPathSegCurvetoCubicAbsX1(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsSVGPathSegCurvetoCubicAbsY1(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSSVGPathSegCurvetoCubicAbsY1(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsSVGPathSegCurvetoCubicAbsX2(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSSVGPathSegCurvetoCubicAbsX2(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsSVGPathSegCurvetoCubicAbsY2(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSSVGPathSegCurvetoCubicAbsY2(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsSVGPathSegCurvetoCubicAbsConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSSVGPathSegCurvetoCubicAbsConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
class JSSVGPathSegCurvetoCubicAbsPrototype : public JSC::JSNonFinalObject {
public:
typedef JSC::JSNonFinalObject Base;
static JSSVGPathSegCurvetoCubicAbsPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
{
JSSVGPathSegCurvetoCubicAbsPrototype* ptr = new (NotNull, JSC::allocateCell<JSSVGPathSegCurvetoCubicAbsPrototype>(vm.heap)) JSSVGPathSegCurvetoCubicAbsPrototype(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:
JSSVGPathSegCurvetoCubicAbsPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
: JSC::JSNonFinalObject(vm, structure)
{
}
void finishCreation(JSC::VM&);
};
typedef JSDOMConstructorNotConstructable<JSSVGPathSegCurvetoCubicAbs> JSSVGPathSegCurvetoCubicAbsConstructor;
template<> JSValue JSSVGPathSegCurvetoCubicAbsConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
{
return JSSVGPathSeg::getConstructor(vm, &globalObject);
}
template<> void JSSVGPathSegCurvetoCubicAbsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
{
putDirect(vm, vm.propertyNames->prototype, JSSVGPathSegCurvetoCubicAbs::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);
putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("SVGPathSegCurvetoCubicAbs"))), ReadOnly | DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
}
template<> const ClassInfo JSSVGPathSegCurvetoCubicAbsConstructor::s_info = { "SVGPathSegCurvetoCubicAbs", &Base::s_info, 0, CREATE_METHOD_TABLE(JSSVGPathSegCurvetoCubicAbsConstructor) };
/* Hash table for prototype */
static const HashTableValue JSSVGPathSegCurvetoCubicAbsPrototypeTableValues[] =
{
{ "constructor", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicAbsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicAbsConstructor) } },
{ "x", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicAbsX), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicAbsX) } },
{ "y", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicAbsY), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicAbsY) } },
{ "x1", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicAbsX1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicAbsX1) } },
{ "y1", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicAbsY1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicAbsY1) } },
{ "x2", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicAbsX2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicAbsX2) } },
{ "y2", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicAbsY2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicAbsY2) } },
};
const ClassInfo JSSVGPathSegCurvetoCubicAbsPrototype::s_info = { "SVGPathSegCurvetoCubicAbsPrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSSVGPathSegCurvetoCubicAbsPrototype) };
void JSSVGPathSegCurvetoCubicAbsPrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
reifyStaticProperties(vm, JSSVGPathSegCurvetoCubicAbsPrototypeTableValues, *this);
}
const ClassInfo JSSVGPathSegCurvetoCubicAbs::s_info = { "SVGPathSegCurvetoCubicAbs", &Base::s_info, 0, CREATE_METHOD_TABLE(JSSVGPathSegCurvetoCubicAbs) };
JSSVGPathSegCurvetoCubicAbs::JSSVGPathSegCurvetoCubicAbs(Structure* structure, JSDOMGlobalObject& globalObject, Ref<SVGPathSegCurvetoCubicAbs>&& impl)
: JSSVGPathSeg(structure, globalObject, WTFMove(impl))
{
}
JSObject* JSSVGPathSegCurvetoCubicAbs::createPrototype(VM& vm, JSGlobalObject* globalObject)
{
return JSSVGPathSegCurvetoCubicAbsPrototype::create(vm, globalObject, JSSVGPathSegCurvetoCubicAbsPrototype::createStructure(vm, globalObject, JSSVGPathSeg::prototype(vm, globalObject)));
}
JSObject* JSSVGPathSegCurvetoCubicAbs::prototype(VM& vm, JSGlobalObject* globalObject)
{
return getDOMPrototype<JSSVGPathSegCurvetoCubicAbs>(vm, globalObject);
}
EncodedJSValue jsSVGPathSegCurvetoCubicAbsX(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<JSSVGPathSegCurvetoCubicAbs*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicAbs", "x");
}
auto& impl = castedThis->wrapped();
JSValue result = jsNumber(impl.x());
return JSValue::encode(result);
}
EncodedJSValue jsSVGPathSegCurvetoCubicAbsY(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<JSSVGPathSegCurvetoCubicAbs*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicAbs", "y");
}
auto& impl = castedThis->wrapped();
JSValue result = jsNumber(impl.y());
return JSValue::encode(result);
}
EncodedJSValue jsSVGPathSegCurvetoCubicAbsX1(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<JSSVGPathSegCurvetoCubicAbs*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicAbs", "x1");
}
auto& impl = castedThis->wrapped();
JSValue result = jsNumber(impl.x1());
return JSValue::encode(result);
}
EncodedJSValue jsSVGPathSegCurvetoCubicAbsY1(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<JSSVGPathSegCurvetoCubicAbs*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicAbs", "y1");
}
auto& impl = castedThis->wrapped();
JSValue result = jsNumber(impl.y1());
return JSValue::encode(result);
}
EncodedJSValue jsSVGPathSegCurvetoCubicAbsX2(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<JSSVGPathSegCurvetoCubicAbs*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicAbs", "x2");
}
auto& impl = castedThis->wrapped();
JSValue result = jsNumber(impl.x2());
return JSValue::encode(result);
}
EncodedJSValue jsSVGPathSegCurvetoCubicAbsY2(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<JSSVGPathSegCurvetoCubicAbs*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicAbs", "y2");
}
auto& impl = castedThis->wrapped();
JSValue result = jsNumber(impl.y2());
return JSValue::encode(result);
}
EncodedJSValue jsSVGPathSegCurvetoCubicAbsConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
JSSVGPathSegCurvetoCubicAbsPrototype* domObject = jsDynamicCast<JSSVGPathSegCurvetoCubicAbsPrototype*>(JSValue::decode(thisValue));
if (UNLIKELY(!domObject))
return throwVMTypeError(state, throwScope);
return JSValue::encode(JSSVGPathSegCurvetoCubicAbs::getConstructor(state->vm(), domObject->globalObject()));
}
bool setJSSVGPathSegCurvetoCubicAbsConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
JSValue value = JSValue::decode(encodedValue);
JSSVGPathSegCurvetoCubicAbsPrototype* domObject = jsDynamicCast<JSSVGPathSegCurvetoCubicAbsPrototype*>(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 setJSSVGPathSegCurvetoCubicAbsX(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);
JSSVGPathSegCurvetoCubicAbs* castedThis = jsDynamicCast<JSSVGPathSegCurvetoCubicAbs*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicAbs", "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 setJSSVGPathSegCurvetoCubicAbsY(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);
JSSVGPathSegCurvetoCubicAbs* castedThis = jsDynamicCast<JSSVGPathSegCurvetoCubicAbs*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicAbs", "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 setJSSVGPathSegCurvetoCubicAbsX1(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);
JSSVGPathSegCurvetoCubicAbs* castedThis = jsDynamicCast<JSSVGPathSegCurvetoCubicAbs*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicAbs", "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 setJSSVGPathSegCurvetoCubicAbsY1(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);
JSSVGPathSegCurvetoCubicAbs* castedThis = jsDynamicCast<JSSVGPathSegCurvetoCubicAbs*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicAbs", "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 setJSSVGPathSegCurvetoCubicAbsX2(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);
JSSVGPathSegCurvetoCubicAbs* castedThis = jsDynamicCast<JSSVGPathSegCurvetoCubicAbs*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicAbs", "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 setJSSVGPathSegCurvetoCubicAbsY2(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);
JSSVGPathSegCurvetoCubicAbs* castedThis = jsDynamicCast<JSSVGPathSegCurvetoCubicAbs*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "SVGPathSegCurvetoCubicAbs", "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 JSSVGPathSegCurvetoCubicAbs::getConstructor(VM& vm, const JSGlobalObject* globalObject)
{
return getDOMConstructor<JSSVGPathSegCurvetoCubicAbsConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
}
}