webengine/osswebengine/DerivedSources/WebCore/JSSVGPathSegCurvetoQuadraticSmoothAbs.cpp
/*
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"
#if ENABLE(SVG)
#include "Document.h"
#include "Frame.h"
#include "SVGDocumentExtensions.h"
#include "SVGElement.h"
#include "SVGAnimatedTemplate.h"
#include "JSSVGPathSegCurvetoQuadraticSmoothAbs.h"
#include <wtf/GetPtr.h>
#include "SVGPathSegCurvetoQuadraticSmooth.h"
using namespace KJS;
namespace WebCore {
/* Hash table */
static const HashEntry JSSVGPathSegCurvetoQuadraticSmoothAbsTableEntries[] =
{
{ "y", JSSVGPathSegCurvetoQuadraticSmoothAbs::YAttrNum, DontDelete, 0, 0 },
{ "x", JSSVGPathSegCurvetoQuadraticSmoothAbs::XAttrNum, DontDelete, 0, 0 }
};
static const HashTable JSSVGPathSegCurvetoQuadraticSmoothAbsTable =
{
2, 2, JSSVGPathSegCurvetoQuadraticSmoothAbsTableEntries, 2
};
/* Hash table for prototype */
static const HashEntry JSSVGPathSegCurvetoQuadraticSmoothAbsPrototypeTableEntries[] =
{
{ 0, 0, 0, 0, 0 }
};
static const HashTable JSSVGPathSegCurvetoQuadraticSmoothAbsPrototypeTable =
{
2, 1, JSSVGPathSegCurvetoQuadraticSmoothAbsPrototypeTableEntries, 1
};
const ClassInfo JSSVGPathSegCurvetoQuadraticSmoothAbsPrototype::info = { "SVGPathSegCurvetoQuadraticSmoothAbsPrototype", 0, &JSSVGPathSegCurvetoQuadraticSmoothAbsPrototypeTable, 0 };
JSObject* JSSVGPathSegCurvetoQuadraticSmoothAbsPrototype::self(ExecState* exec)
{
return KJS::cacheGlobalObject<JSSVGPathSegCurvetoQuadraticSmoothAbsPrototype>(exec, "[[JSSVGPathSegCurvetoQuadraticSmoothAbs.prototype]]");
}
const ClassInfo JSSVGPathSegCurvetoQuadraticSmoothAbs::info = { "SVGPathSegCurvetoQuadraticSmoothAbs", &JSSVGPathSeg::info, &JSSVGPathSegCurvetoQuadraticSmoothAbsTable, 0 };
JSSVGPathSegCurvetoQuadraticSmoothAbs::JSSVGPathSegCurvetoQuadraticSmoothAbs(ExecState* exec, SVGPathSegCurvetoQuadraticSmoothAbs* impl)
: JSSVGPathSeg(exec, impl)
{
setPrototype(JSSVGPathSegCurvetoQuadraticSmoothAbsPrototype::self(exec));
}
bool JSSVGPathSegCurvetoQuadraticSmoothAbs::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
return getStaticValueSlot<JSSVGPathSegCurvetoQuadraticSmoothAbs, JSSVGPathSeg>(exec, &JSSVGPathSegCurvetoQuadraticSmoothAbsTable, this, propertyName, slot);
}
JSValue* JSSVGPathSegCurvetoQuadraticSmoothAbs::getValueProperty(ExecState* exec, int token) const
{
switch (token) {
case XAttrNum: {
SVGPathSegCurvetoQuadraticSmoothAbs* imp = static_cast<SVGPathSegCurvetoQuadraticSmoothAbs*>(impl());
return jsNumber(imp->x());
}
case YAttrNum: {
SVGPathSegCurvetoQuadraticSmoothAbs* imp = static_cast<SVGPathSegCurvetoQuadraticSmoothAbs*>(impl());
return jsNumber(imp->y());
}
}
return 0;
}
void JSSVGPathSegCurvetoQuadraticSmoothAbs::put(ExecState* exec, const Identifier& propertyName, JSValue* value, int attr)
{
lookupPut<JSSVGPathSegCurvetoQuadraticSmoothAbs, JSSVGPathSeg>(exec, propertyName, value, attr, &JSSVGPathSegCurvetoQuadraticSmoothAbsTable, this);
}
void JSSVGPathSegCurvetoQuadraticSmoothAbs::putValueProperty(ExecState* exec, int token, JSValue* value, int /*attr*/)
{
switch (token) {
case XAttrNum: {
SVGPathSegCurvetoQuadraticSmoothAbs* imp = static_cast<SVGPathSegCurvetoQuadraticSmoothAbs*>(impl());
imp->setX(value->toFloat(exec));
break;
}
case YAttrNum: {
SVGPathSegCurvetoQuadraticSmoothAbs* imp = static_cast<SVGPathSegCurvetoQuadraticSmoothAbs*>(impl());
imp->setY(value->toFloat(exec));
break;
}
}
SVGPathSegCurvetoQuadraticSmoothAbs* imp = static_cast<SVGPathSegCurvetoQuadraticSmoothAbs*>(impl());
ASSERT(exec && exec->dynamicInterpreter());
Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
if (!activeFrame)
return;
SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
if (extensions && extensions->hasGenericContext<SVGPathSeg>(imp)) {
const SVGElement* context = extensions->genericContext<SVGPathSeg>(imp);
ASSERT(context);
context->notifyAttributeChange();
}
}
}
#endif // ENABLE(SVG)