webengine/osswebengine/DerivedSources/WebCore/JSSVGFEDisplacementMapElement.cpp
changeset 0 dd21522fd290
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/webengine/osswebengine/DerivedSources/WebCore/JSSVGFEDisplacementMapElement.cpp	Mon Mar 30 12:54:55 2009 +0300
@@ -0,0 +1,348 @@
+/*
+    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 "JSSVGFEDisplacementMapElement.h"
+
+#include <wtf/GetPtr.h>
+
+#include "CSSMutableStyleDeclaration.h"
+#include "CSSStyleDeclaration.h"
+#include "JSCSSStyleDeclaration.h"
+#include "JSSVGAnimatedEnumeration.h"
+#include "JSSVGAnimatedLength.h"
+#include "JSSVGAnimatedNumber.h"
+#include "JSSVGAnimatedString.h"
+#include "SVGFEDisplacementMapElement.h"
+
+using namespace KJS;
+
+namespace WebCore {
+
+/* Hash table */
+
+static const HashEntry JSSVGFEDisplacementMapElementTableEntries[] =
+{
+    { 0, 0, 0, 0, 0 },
+    { "scale", JSSVGFEDisplacementMapElement::ScaleAttrNum, DontDelete|ReadOnly, 0, 0 },
+    { "in2", JSSVGFEDisplacementMapElement::In2AttrNum, DontDelete|ReadOnly, 0, 0 },
+    { 0, 0, 0, 0, 0 },
+    { "xChannelSelector", JSSVGFEDisplacementMapElement::XChannelSelectorAttrNum, DontDelete|ReadOnly, 0, &JSSVGFEDisplacementMapElementTableEntries[12] },
+    { "x", JSSVGFEDisplacementMapElement::XAttrNum, DontDelete|ReadOnly, 0, &JSSVGFEDisplacementMapElementTableEntries[13] },
+    { "in1", JSSVGFEDisplacementMapElement::In1AttrNum, DontDelete|ReadOnly, 0, &JSSVGFEDisplacementMapElementTableEntries[14] },
+    { "width", JSSVGFEDisplacementMapElement::WidthAttrNum, DontDelete|ReadOnly, 0, 0 },
+    { "style", JSSVGFEDisplacementMapElement::StyleAttrNum, DontDelete|ReadOnly, 0, 0 },
+    { "yChannelSelector", JSSVGFEDisplacementMapElement::YChannelSelectorAttrNum, DontDelete|ReadOnly, 0, 0 },
+    { 0, 0, 0, 0, 0 },
+    { 0, 0, 0, 0, 0 },
+    { "y", JSSVGFEDisplacementMapElement::YAttrNum, DontDelete|ReadOnly, 0, 0 },
+    { "height", JSSVGFEDisplacementMapElement::HeightAttrNum, DontDelete|ReadOnly, 0, 0 },
+    { "result", JSSVGFEDisplacementMapElement::ResultAttrNum, DontDelete|ReadOnly, 0, &JSSVGFEDisplacementMapElementTableEntries[15] },
+    { "className", JSSVGFEDisplacementMapElement::ClassNameAttrNum, DontDelete|ReadOnly, 0, 0 }
+};
+
+static const HashTable JSSVGFEDisplacementMapElementTable = 
+{
+    2, 16, JSSVGFEDisplacementMapElementTableEntries, 12
+};
+
+/* Hash table for prototype */
+
+static const HashEntry JSSVGFEDisplacementMapElementPrototypeTableEntries[] =
+{
+    { "SVG_CHANNEL_R", WebCore::SVG_CHANNEL_R, DontDelete|ReadOnly, 0, &JSSVGFEDisplacementMapElementPrototypeTableEntries[5] },
+    { 0, 0, 0, 0, 0 },
+    { 0, 0, 0, 0, 0 },
+    { "SVG_CHANNEL_UNKNOWN", WebCore::SVG_CHANNEL_UNKNOWN, DontDelete|ReadOnly, 0, 0 },
+    { "SVG_CHANNEL_G", WebCore::SVG_CHANNEL_G, DontDelete|ReadOnly, 0, 0 },
+    { "SVG_CHANNEL_B", WebCore::SVG_CHANNEL_B, DontDelete|ReadOnly, 0, &JSSVGFEDisplacementMapElementPrototypeTableEntries[6] },
+    { "SVG_CHANNEL_A", WebCore::SVG_CHANNEL_A, DontDelete|ReadOnly, 0, 0 }
+};
+
+static const HashTable JSSVGFEDisplacementMapElementPrototypeTable = 
+{
+    2, 7, JSSVGFEDisplacementMapElementPrototypeTableEntries, 5
+};
+
+const ClassInfo JSSVGFEDisplacementMapElementPrototype::info = { "SVGFEDisplacementMapElementPrototype", 0, &JSSVGFEDisplacementMapElementPrototypeTable, 0 };
+
+JSObject* JSSVGFEDisplacementMapElementPrototype::self(ExecState* exec)
+{
+    return KJS::cacheGlobalObject<JSSVGFEDisplacementMapElementPrototype>(exec, "[[JSSVGFEDisplacementMapElement.prototype]]");
+}
+
+bool JSSVGFEDisplacementMapElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
+{
+    return getStaticValueSlot<JSSVGFEDisplacementMapElementPrototype, JSObject>(exec, &JSSVGFEDisplacementMapElementPrototypeTable, this, propertyName, slot);
+}
+
+JSValue* JSSVGFEDisplacementMapElementPrototype::getValueProperty(ExecState*, int token) const
+{
+    // The token is the numeric value of its associated constant
+    return jsNumber(token);
+}
+
+const ClassInfo JSSVGFEDisplacementMapElement::info = { "SVGFEDisplacementMapElement", &JSSVGElement::info, &JSSVGFEDisplacementMapElementTable, 0 };
+
+JSSVGFEDisplacementMapElement::JSSVGFEDisplacementMapElement(ExecState* exec, SVGFEDisplacementMapElement* impl)
+    : JSSVGElement(exec, impl)
+{
+    setPrototype(JSSVGFEDisplacementMapElementPrototype::self(exec));
+}
+
+bool JSSVGFEDisplacementMapElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
+{
+    return getStaticValueSlot<JSSVGFEDisplacementMapElement, JSSVGElement>(exec, &JSSVGFEDisplacementMapElementTable, this, propertyName, slot);
+}
+
+JSValue* JSSVGFEDisplacementMapElement::getValueProperty(ExecState* exec, int token) const
+{
+    switch (token) {
+    case In1AttrNum: {
+        SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(impl());
+
+        ASSERT(exec && exec->dynamicInterpreter());
+
+        RefPtr<SVGAnimatedString> obj = imp->in1Animated();
+        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 In2AttrNum: {
+        SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(impl());
+
+        ASSERT(exec && exec->dynamicInterpreter());
+
+        RefPtr<SVGAnimatedString> obj = imp->in2Animated();
+        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 ScaleAttrNum: {
+        SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(impl());
+
+        ASSERT(exec && exec->dynamicInterpreter());
+
+        RefPtr<SVGAnimatedNumber> obj = imp->scaleAnimated();
+        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 XChannelSelectorAttrNum: {
+        SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(impl());
+
+        ASSERT(exec && exec->dynamicInterpreter());
+
+        RefPtr<SVGAnimatedEnumeration> obj = imp->xChannelSelectorAnimated();
+        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 YChannelSelectorAttrNum: {
+        SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(impl());
+
+        ASSERT(exec && exec->dynamicInterpreter());
+
+        RefPtr<SVGAnimatedEnumeration> obj = imp->yChannelSelectorAnimated();
+        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: {
+        SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(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: {
+        SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(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: {
+        SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(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: {
+        SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(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: {
+        SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(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: {
+        SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(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: {
+        SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(impl());
+
+        return toJS(exec, WTF::getPtr(imp->style()));
+    }
+    }
+    return 0;
+}
+
+
+}
+
+#endif // ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)