/*
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) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
#include "Document.h"
#include "Frame.h"
#include "SVGDocumentExtensions.h"
#include "SVGElement.h"
#include "SVGAnimatedTemplate.h"
#include "JSSVGFETurbulenceElement.h"
#include <wtf/GetPtr.h>
#include "CSSMutableStyleDeclaration.h"
#include "CSSStyleDeclaration.h"
#include "JSCSSStyleDeclaration.h"
#include "JSSVGAnimatedEnumeration.h"
#include "JSSVGAnimatedInteger.h"
#include "JSSVGAnimatedLength.h"
#include "JSSVGAnimatedNumber.h"
#include "JSSVGAnimatedString.h"
#include "SVGFETurbulenceElement.h"
using namespace KJS;
namespace WebCore {
/* Hash table */
static const HashEntry JSSVGFETurbulenceElementTableEntries[] =
{
{ "stitchTiles", JSSVGFETurbulenceElement::StitchTilesAttrNum, DontDelete|ReadOnly, 0, &JSSVGFETurbulenceElementTableEntries[14] },
{ 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0 },
{ "y", JSSVGFETurbulenceElement::YAttrNum, DontDelete|ReadOnly, 0, &JSSVGFETurbulenceElementTableEntries[15] },
{ "baseFrequencyX", JSSVGFETurbulenceElement::BaseFrequencyXAttrNum, DontDelete|ReadOnly, 0, &JSSVGFETurbulenceElementTableEntries[13] },
{ "seed", JSSVGFETurbulenceElement::SeedAttrNum, DontDelete|ReadOnly, 0, 0 },
{ 0, 0, 0, 0, 0 },
{ "x", JSSVGFETurbulenceElement::XAttrNum, DontDelete|ReadOnly, 0, 0 },
{ "type", JSSVGFETurbulenceElement::TypeAttrNum, DontDelete|ReadOnly, 0, &JSSVGFETurbulenceElementTableEntries[16] },
{ "baseFrequencyY", JSSVGFETurbulenceElement::BaseFrequencyYAttrNum, DontDelete|ReadOnly, 0, 0 },
{ "className", JSSVGFETurbulenceElement::ClassNameAttrNum, DontDelete|ReadOnly, 0, 0 },
{ 0, 0, 0, 0, 0 },
{ "numOctaves", JSSVGFETurbulenceElement::NumOctavesAttrNum, DontDelete|ReadOnly, 0, 0 },
{ "width", JSSVGFETurbulenceElement::WidthAttrNum, DontDelete|ReadOnly, 0, 0 },
{ "height", JSSVGFETurbulenceElement::HeightAttrNum, DontDelete|ReadOnly, 0, 0 },
{ "result", JSSVGFETurbulenceElement::ResultAttrNum, DontDelete|ReadOnly, 0, 0 },
{ "style", JSSVGFETurbulenceElement::StyleAttrNum, DontDelete|ReadOnly, 0, 0 }
};
static const HashTable JSSVGFETurbulenceElementTable =
{
2, 17, JSSVGFETurbulenceElementTableEntries, 13
};
/* Hash table for prototype */
static const HashEntry JSSVGFETurbulenceElementPrototypeTableEntries[] =
{
{ 0, 0, 0, 0, 0 },
{ "SVG_TURBULENCE_TYPE_UNKNOWN", WebCore::SVG_TURBULENCE_TYPE_UNKNOWN, DontDelete|ReadOnly, 0, &JSSVGFETurbulenceElementPrototypeTableEntries[8] },
{ "SVG_TURBULENCE_TYPE_FRACTALNOISE", WebCore::SVG_TURBULENCE_TYPE_FRACTALNOISE, DontDelete|ReadOnly, 0, 0 },
{ 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0 },
{ "SVG_TURBULENCE_TYPE_TURBULENCE", WebCore::SVG_TURBULENCE_TYPE_TURBULENCE, DontDelete|ReadOnly, 0, &JSSVGFETurbulenceElementPrototypeTableEntries[6] },
{ "SVG_STITCHTYPE_UNKNOWN", WebCore::SVG_STITCHTYPE_UNKNOWN, DontDelete|ReadOnly, 0, &JSSVGFETurbulenceElementPrototypeTableEntries[7] },
{ "SVG_STITCHTYPE_STITCH", WebCore::SVG_STITCHTYPE_STITCH, DontDelete|ReadOnly, 0, 0 },
{ "SVG_STITCHTYPE_NOSTITCH", WebCore::SVG_STITCHTYPE_NOSTITCH, DontDelete|ReadOnly, 0, 0 }
};
static const HashTable JSSVGFETurbulenceElementPrototypeTable =
{
2, 9, JSSVGFETurbulenceElementPrototypeTableEntries, 6
};
const ClassInfo JSSVGFETurbulenceElementPrototype::info = { "SVGFETurbulenceElementPrototype", 0, &JSSVGFETurbulenceElementPrototypeTable, 0 };
JSObject* JSSVGFETurbulenceElementPrototype::self(ExecState* exec)
{
return KJS::cacheGlobalObject<JSSVGFETurbulenceElementPrototype>(exec, "[[JSSVGFETurbulenceElement.prototype]]");
}
bool JSSVGFETurbulenceElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
return getStaticValueSlot<JSSVGFETurbulenceElementPrototype, JSObject>(exec, &JSSVGFETurbulenceElementPrototypeTable, this, propertyName, slot);
}
JSValue* JSSVGFETurbulenceElementPrototype::getValueProperty(ExecState*, int token) const
{
// The token is the numeric value of its associated constant
return jsNumber(token);
}
const ClassInfo JSSVGFETurbulenceElement::info = { "SVGFETurbulenceElement", &JSSVGElement::info, &JSSVGFETurbulenceElementTable, 0 };
JSSVGFETurbulenceElement::JSSVGFETurbulenceElement(ExecState* exec, SVGFETurbulenceElement* impl)
: JSSVGElement(exec, impl)
{
setPrototype(JSSVGFETurbulenceElementPrototype::self(exec));
}
bool JSSVGFETurbulenceElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
return getStaticValueSlot<JSSVGFETurbulenceElement, JSSVGElement>(exec, &JSSVGFETurbulenceElementTable, this, propertyName, slot);
}
JSValue* JSSVGFETurbulenceElement::getValueProperty(ExecState* exec, int token) const
{
switch (token) {
case BaseFrequencyXAttrNum: {
SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(impl());
ASSERT(exec && exec->dynamicInterpreter());
RefPtr<SVGAnimatedNumber> obj = imp->baseFrequencyXAnimated();
Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
if (activeFrame) {
SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
if (extensions) {
if (extensions->hasGenericContext<SVGAnimatedNumber>(obj.get()))
ASSERT(extensions->genericContext<SVGAnimatedNumber>(obj.get()) == imp);
else
extensions->setGenericContext<SVGAnimatedNumber>(obj.get(), imp);
}
}
return toJS(exec, obj.get());
}
case BaseFrequencyYAttrNum: {
SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(impl());
ASSERT(exec && exec->dynamicInterpreter());
RefPtr<SVGAnimatedNumber> obj = imp->baseFrequencyYAnimated();
Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
if (activeFrame) {
SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
if (extensions) {
if (extensions->hasGenericContext<SVGAnimatedNumber>(obj.get()))
ASSERT(extensions->genericContext<SVGAnimatedNumber>(obj.get()) == imp);
else
extensions->setGenericContext<SVGAnimatedNumber>(obj.get(), imp);
}
}
return toJS(exec, obj.get());
}
case NumOctavesAttrNum: {
SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(impl());
ASSERT(exec && exec->dynamicInterpreter());
RefPtr<SVGAnimatedInteger> obj = imp->numOctavesAnimated();
Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
if (activeFrame) {
SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
if (extensions) {
if (extensions->hasGenericContext<SVGAnimatedInteger>(obj.get()))
ASSERT(extensions->genericContext<SVGAnimatedInteger>(obj.get()) == imp);
else
extensions->setGenericContext<SVGAnimatedInteger>(obj.get(), imp);
}
}
return toJS(exec, obj.get());
}
case SeedAttrNum: {
SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(impl());
ASSERT(exec && exec->dynamicInterpreter());
RefPtr<SVGAnimatedNumber> obj = imp->seedAnimated();
Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
if (activeFrame) {
SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
if (extensions) {
if (extensions->hasGenericContext<SVGAnimatedNumber>(obj.get()))
ASSERT(extensions->genericContext<SVGAnimatedNumber>(obj.get()) == imp);
else
extensions->setGenericContext<SVGAnimatedNumber>(obj.get(), imp);
}
}
return toJS(exec, obj.get());
}
case StitchTilesAttrNum: {
SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(impl());
ASSERT(exec && exec->dynamicInterpreter());
RefPtr<SVGAnimatedEnumeration> obj = imp->stitchTilesAnimated();
Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
if (activeFrame) {
SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
if (extensions) {
if (extensions->hasGenericContext<SVGAnimatedEnumeration>(obj.get()))
ASSERT(extensions->genericContext<SVGAnimatedEnumeration>(obj.get()) == imp);
else
extensions->setGenericContext<SVGAnimatedEnumeration>(obj.get(), imp);
}
}
return toJS(exec, obj.get());
}
case TypeAttrNum: {
SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(impl());
ASSERT(exec && exec->dynamicInterpreter());
RefPtr<SVGAnimatedEnumeration> obj = imp->typeAnimated();
Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
if (activeFrame) {
SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
if (extensions) {
if (extensions->hasGenericContext<SVGAnimatedEnumeration>(obj.get()))
ASSERT(extensions->genericContext<SVGAnimatedEnumeration>(obj.get()) == imp);
else
extensions->setGenericContext<SVGAnimatedEnumeration>(obj.get(), imp);
}
}
return toJS(exec, obj.get());
}
case XAttrNum: {
SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(impl());
ASSERT(exec && exec->dynamicInterpreter());
RefPtr<SVGAnimatedLength> obj = imp->xAnimated();
Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
if (activeFrame) {
SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
if (extensions) {
if (extensions->hasGenericContext<SVGAnimatedLength>(obj.get()))
ASSERT(extensions->genericContext<SVGAnimatedLength>(obj.get()) == imp);
else
extensions->setGenericContext<SVGAnimatedLength>(obj.get(), imp);
}
}
return toJS(exec, obj.get());
}
case YAttrNum: {
SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(impl());
ASSERT(exec && exec->dynamicInterpreter());
RefPtr<SVGAnimatedLength> obj = imp->yAnimated();
Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
if (activeFrame) {
SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
if (extensions) {
if (extensions->hasGenericContext<SVGAnimatedLength>(obj.get()))
ASSERT(extensions->genericContext<SVGAnimatedLength>(obj.get()) == imp);
else
extensions->setGenericContext<SVGAnimatedLength>(obj.get(), imp);
}
}
return toJS(exec, obj.get());
}
case WidthAttrNum: {
SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(impl());
ASSERT(exec && exec->dynamicInterpreter());
RefPtr<SVGAnimatedLength> obj = imp->widthAnimated();
Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
if (activeFrame) {
SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
if (extensions) {
if (extensions->hasGenericContext<SVGAnimatedLength>(obj.get()))
ASSERT(extensions->genericContext<SVGAnimatedLength>(obj.get()) == imp);
else
extensions->setGenericContext<SVGAnimatedLength>(obj.get(), imp);
}
}
return toJS(exec, obj.get());
}
case HeightAttrNum: {
SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(impl());
ASSERT(exec && exec->dynamicInterpreter());
RefPtr<SVGAnimatedLength> obj = imp->heightAnimated();
Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
if (activeFrame) {
SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
if (extensions) {
if (extensions->hasGenericContext<SVGAnimatedLength>(obj.get()))
ASSERT(extensions->genericContext<SVGAnimatedLength>(obj.get()) == imp);
else
extensions->setGenericContext<SVGAnimatedLength>(obj.get(), imp);
}
}
return toJS(exec, obj.get());
}
case ResultAttrNum: {
SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(impl());
ASSERT(exec && exec->dynamicInterpreter());
RefPtr<SVGAnimatedString> obj = imp->resultAnimated();
Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
if (activeFrame) {
SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
if (extensions) {
if (extensions->hasGenericContext<SVGAnimatedString>(obj.get()))
ASSERT(extensions->genericContext<SVGAnimatedString>(obj.get()) == imp);
else
extensions->setGenericContext<SVGAnimatedString>(obj.get(), imp);
}
}
return toJS(exec, obj.get());
}
case ClassNameAttrNum: {
SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(impl());
ASSERT(exec && exec->dynamicInterpreter());
RefPtr<SVGAnimatedString> obj = imp->classNameAnimated();
Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
if (activeFrame) {
SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
if (extensions) {
if (extensions->hasGenericContext<SVGAnimatedString>(obj.get()))
ASSERT(extensions->genericContext<SVGAnimatedString>(obj.get()) == imp);
else
extensions->setGenericContext<SVGAnimatedString>(obj.get(), imp);
}
}
return toJS(exec, obj.get());
}
case StyleAttrNum: {
SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(impl());
return toJS(exec, WTF::getPtr(imp->style()));
}
}
return 0;
}
}
#endif // ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)