webengine/osswebengine/DerivedSources/WebCore/JSSVGFEFloodElement.cpp
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2     This file is part of the WebKit open source project.
       
     3     This file has been generated by generate-bindings.pl. DO NOT MODIFY!
       
     4 
       
     5     This library is free software; you can redistribute it and/or
       
     6     modify it under the terms of the GNU Library General Public
       
     7     License as published by the Free Software Foundation; either
       
     8     version 2 of the License, or (at your option) any later version.
       
     9 
       
    10     This library is distributed in the hope that it will be useful,
       
    11     but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    13     Library General Public License for more details.
       
    14 
       
    15     You should have received a copy of the GNU Library General Public License
       
    16     along with this library; see the file COPYING.LIB.  If not, write to
       
    17     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
       
    18     Boston, MA 02110-1301, USA.
       
    19 */
       
    20 
       
    21 #include "config.h"
       
    22 
       
    23 
       
    24 #if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
       
    25 
       
    26 #include "Document.h"
       
    27 #include "Frame.h"
       
    28 #include "SVGDocumentExtensions.h"
       
    29 #include "SVGElement.h"
       
    30 #include "SVGAnimatedTemplate.h"
       
    31 #include "JSSVGFEFloodElement.h"
       
    32 
       
    33 #include <wtf/GetPtr.h>
       
    34 
       
    35 #include "CSSMutableStyleDeclaration.h"
       
    36 #include "CSSStyleDeclaration.h"
       
    37 #include "JSCSSStyleDeclaration.h"
       
    38 #include "JSSVGAnimatedLength.h"
       
    39 #include "JSSVGAnimatedString.h"
       
    40 #include "SVGFEFloodElement.h"
       
    41 
       
    42 using namespace KJS;
       
    43 
       
    44 namespace WebCore {
       
    45 
       
    46 /* Hash table */
       
    47 
       
    48 static const HashEntry JSSVGFEFloodElementTableEntries[] =
       
    49 {
       
    50     { 0, 0, 0, 0, 0 },
       
    51     { "x", JSSVGFEFloodElement::XAttrNum, DontDelete|ReadOnly, 0, &JSSVGFEFloodElementTableEntries[8] },
       
    52     { "className", JSSVGFEFloodElement::ClassNameAttrNum, DontDelete|ReadOnly, 0, 0 },
       
    53     { "width", JSSVGFEFloodElement::WidthAttrNum, DontDelete|ReadOnly, 0, 0 },
       
    54     { "y", JSSVGFEFloodElement::YAttrNum, DontDelete|ReadOnly, 0, &JSSVGFEFloodElementTableEntries[10] },
       
    55     { 0, 0, 0, 0, 0 },
       
    56     { "in1", JSSVGFEFloodElement::In1AttrNum, DontDelete|ReadOnly, 0, &JSSVGFEFloodElementTableEntries[9] },
       
    57     { 0, 0, 0, 0, 0 },
       
    58     { "height", JSSVGFEFloodElement::HeightAttrNum, DontDelete|ReadOnly, 0, 0 },
       
    59     { "result", JSSVGFEFloodElement::ResultAttrNum, DontDelete|ReadOnly, 0, 0 },
       
    60     { "style", JSSVGFEFloodElement::StyleAttrNum, DontDelete|ReadOnly, 0, 0 }
       
    61 };
       
    62 
       
    63 static const HashTable JSSVGFEFloodElementTable = 
       
    64 {
       
    65     2, 11, JSSVGFEFloodElementTableEntries, 8
       
    66 };
       
    67 
       
    68 /* Hash table for prototype */
       
    69 
       
    70 static const HashEntry JSSVGFEFloodElementPrototypeTableEntries[] =
       
    71 {
       
    72     { 0, 0, 0, 0, 0 }
       
    73 };
       
    74 
       
    75 static const HashTable JSSVGFEFloodElementPrototypeTable = 
       
    76 {
       
    77     2, 1, JSSVGFEFloodElementPrototypeTableEntries, 1
       
    78 };
       
    79 
       
    80 const ClassInfo JSSVGFEFloodElementPrototype::info = { "SVGFEFloodElementPrototype", 0, &JSSVGFEFloodElementPrototypeTable, 0 };
       
    81 
       
    82 JSObject* JSSVGFEFloodElementPrototype::self(ExecState* exec)
       
    83 {
       
    84     return KJS::cacheGlobalObject<JSSVGFEFloodElementPrototype>(exec, "[[JSSVGFEFloodElement.prototype]]");
       
    85 }
       
    86 
       
    87 const ClassInfo JSSVGFEFloodElement::info = { "SVGFEFloodElement", &JSSVGElement::info, &JSSVGFEFloodElementTable, 0 };
       
    88 
       
    89 JSSVGFEFloodElement::JSSVGFEFloodElement(ExecState* exec, SVGFEFloodElement* impl)
       
    90     : JSSVGElement(exec, impl)
       
    91 {
       
    92     setPrototype(JSSVGFEFloodElementPrototype::self(exec));
       
    93 }
       
    94 
       
    95 bool JSSVGFEFloodElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
    96 {
       
    97     return getStaticValueSlot<JSSVGFEFloodElement, JSSVGElement>(exec, &JSSVGFEFloodElementTable, this, propertyName, slot);
       
    98 }
       
    99 
       
   100 JSValue* JSSVGFEFloodElement::getValueProperty(ExecState* exec, int token) const
       
   101 {
       
   102     switch (token) {
       
   103     case In1AttrNum: {
       
   104         SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(impl());
       
   105 
       
   106         ASSERT(exec && exec->dynamicInterpreter());
       
   107 
       
   108         RefPtr<SVGAnimatedString> obj = imp->in1Animated();
       
   109         Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
       
   110         if (activeFrame) {
       
   111             SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
       
   112             if (extensions) {
       
   113                 if (extensions->hasGenericContext<SVGAnimatedString>(obj.get()))
       
   114                     ASSERT(extensions->genericContext<SVGAnimatedString>(obj.get()) == imp);
       
   115                 else
       
   116                     extensions->setGenericContext<SVGAnimatedString>(obj.get(), imp);
       
   117             }
       
   118         }
       
   119 
       
   120         return toJS(exec, obj.get());
       
   121     }
       
   122     case XAttrNum: {
       
   123         SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(impl());
       
   124 
       
   125         ASSERT(exec && exec->dynamicInterpreter());
       
   126 
       
   127         RefPtr<SVGAnimatedLength> obj = imp->xAnimated();
       
   128         Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
       
   129         if (activeFrame) {
       
   130             SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
       
   131             if (extensions) {
       
   132                 if (extensions->hasGenericContext<SVGAnimatedLength>(obj.get()))
       
   133                     ASSERT(extensions->genericContext<SVGAnimatedLength>(obj.get()) == imp);
       
   134                 else
       
   135                     extensions->setGenericContext<SVGAnimatedLength>(obj.get(), imp);
       
   136             }
       
   137         }
       
   138 
       
   139         return toJS(exec, obj.get());
       
   140     }
       
   141     case YAttrNum: {
       
   142         SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(impl());
       
   143 
       
   144         ASSERT(exec && exec->dynamicInterpreter());
       
   145 
       
   146         RefPtr<SVGAnimatedLength> obj = imp->yAnimated();
       
   147         Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
       
   148         if (activeFrame) {
       
   149             SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
       
   150             if (extensions) {
       
   151                 if (extensions->hasGenericContext<SVGAnimatedLength>(obj.get()))
       
   152                     ASSERT(extensions->genericContext<SVGAnimatedLength>(obj.get()) == imp);
       
   153                 else
       
   154                     extensions->setGenericContext<SVGAnimatedLength>(obj.get(), imp);
       
   155             }
       
   156         }
       
   157 
       
   158         return toJS(exec, obj.get());
       
   159     }
       
   160     case WidthAttrNum: {
       
   161         SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(impl());
       
   162 
       
   163         ASSERT(exec && exec->dynamicInterpreter());
       
   164 
       
   165         RefPtr<SVGAnimatedLength> obj = imp->widthAnimated();
       
   166         Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
       
   167         if (activeFrame) {
       
   168             SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
       
   169             if (extensions) {
       
   170                 if (extensions->hasGenericContext<SVGAnimatedLength>(obj.get()))
       
   171                     ASSERT(extensions->genericContext<SVGAnimatedLength>(obj.get()) == imp);
       
   172                 else
       
   173                     extensions->setGenericContext<SVGAnimatedLength>(obj.get(), imp);
       
   174             }
       
   175         }
       
   176 
       
   177         return toJS(exec, obj.get());
       
   178     }
       
   179     case HeightAttrNum: {
       
   180         SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(impl());
       
   181 
       
   182         ASSERT(exec && exec->dynamicInterpreter());
       
   183 
       
   184         RefPtr<SVGAnimatedLength> obj = imp->heightAnimated();
       
   185         Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
       
   186         if (activeFrame) {
       
   187             SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
       
   188             if (extensions) {
       
   189                 if (extensions->hasGenericContext<SVGAnimatedLength>(obj.get()))
       
   190                     ASSERT(extensions->genericContext<SVGAnimatedLength>(obj.get()) == imp);
       
   191                 else
       
   192                     extensions->setGenericContext<SVGAnimatedLength>(obj.get(), imp);
       
   193             }
       
   194         }
       
   195 
       
   196         return toJS(exec, obj.get());
       
   197     }
       
   198     case ResultAttrNum: {
       
   199         SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(impl());
       
   200 
       
   201         ASSERT(exec && exec->dynamicInterpreter());
       
   202 
       
   203         RefPtr<SVGAnimatedString> obj = imp->resultAnimated();
       
   204         Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
       
   205         if (activeFrame) {
       
   206             SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
       
   207             if (extensions) {
       
   208                 if (extensions->hasGenericContext<SVGAnimatedString>(obj.get()))
       
   209                     ASSERT(extensions->genericContext<SVGAnimatedString>(obj.get()) == imp);
       
   210                 else
       
   211                     extensions->setGenericContext<SVGAnimatedString>(obj.get(), imp);
       
   212             }
       
   213         }
       
   214 
       
   215         return toJS(exec, obj.get());
       
   216     }
       
   217     case ClassNameAttrNum: {
       
   218         SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(impl());
       
   219 
       
   220         ASSERT(exec && exec->dynamicInterpreter());
       
   221 
       
   222         RefPtr<SVGAnimatedString> obj = imp->classNameAnimated();
       
   223         Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
       
   224         if (activeFrame) {
       
   225             SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
       
   226             if (extensions) {
       
   227                 if (extensions->hasGenericContext<SVGAnimatedString>(obj.get()))
       
   228                     ASSERT(extensions->genericContext<SVGAnimatedString>(obj.get()) == imp);
       
   229                 else
       
   230                     extensions->setGenericContext<SVGAnimatedString>(obj.get(), imp);
       
   231             }
       
   232         }
       
   233 
       
   234         return toJS(exec, obj.get());
       
   235     }
       
   236     case StyleAttrNum: {
       
   237         SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(impl());
       
   238 
       
   239         return toJS(exec, WTF::getPtr(imp->style()));
       
   240     }
       
   241     }
       
   242     return 0;
       
   243 }
       
   244 
       
   245 
       
   246 }
       
   247 
       
   248 #endif // ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)