webengine/osswebengine/DerivedSources/WebCore/JSSVGFESpotLightElement.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 "JSSVGFESpotLightElement.h"
       
    32 
       
    33 #include <wtf/GetPtr.h>
       
    34 
       
    35 #include "JSSVGAnimatedNumber.h"
       
    36 #include "SVGFESpotLightElement.h"
       
    37 
       
    38 using namespace KJS;
       
    39 
       
    40 namespace WebCore {
       
    41 
       
    42 /* Hash table */
       
    43 
       
    44 static const HashEntry JSSVGFESpotLightElementTableEntries[] =
       
    45 {
       
    46     { "pointsAtZ", JSSVGFESpotLightElement::PointsAtZAttrNum, DontDelete|ReadOnly, 0, &JSSVGFESpotLightElementTableEntries[9] },
       
    47     { "x", JSSVGFESpotLightElement::XAttrNum, DontDelete|ReadOnly, 0, 0 },
       
    48     { "pointsAtX", JSSVGFESpotLightElement::PointsAtXAttrNum, DontDelete|ReadOnly, 0, 0 },
       
    49     { 0, 0, 0, 0, 0 },
       
    50     { "y", JSSVGFESpotLightElement::YAttrNum, DontDelete|ReadOnly, 0, &JSSVGFESpotLightElementTableEntries[8] },
       
    51     { "specularExponent", JSSVGFESpotLightElement::SpecularExponentAttrNum, DontDelete|ReadOnly, 0, 0 },
       
    52     { "z", JSSVGFESpotLightElement::ZAttrNum, DontDelete|ReadOnly, 0, 0 },
       
    53     { 0, 0, 0, 0, 0 },
       
    54     { "pointsAtY", JSSVGFESpotLightElement::PointsAtYAttrNum, DontDelete|ReadOnly, 0, 0 },
       
    55     { "limitingConeAngle", JSSVGFESpotLightElement::LimitingConeAngleAttrNum, DontDelete|ReadOnly, 0, 0 }
       
    56 };
       
    57 
       
    58 static const HashTable JSSVGFESpotLightElementTable = 
       
    59 {
       
    60     2, 10, JSSVGFESpotLightElementTableEntries, 8
       
    61 };
       
    62 
       
    63 /* Hash table for prototype */
       
    64 
       
    65 static const HashEntry JSSVGFESpotLightElementPrototypeTableEntries[] =
       
    66 {
       
    67     { 0, 0, 0, 0, 0 }
       
    68 };
       
    69 
       
    70 static const HashTable JSSVGFESpotLightElementPrototypeTable = 
       
    71 {
       
    72     2, 1, JSSVGFESpotLightElementPrototypeTableEntries, 1
       
    73 };
       
    74 
       
    75 const ClassInfo JSSVGFESpotLightElementPrototype::info = { "SVGFESpotLightElementPrototype", 0, &JSSVGFESpotLightElementPrototypeTable, 0 };
       
    76 
       
    77 JSObject* JSSVGFESpotLightElementPrototype::self(ExecState* exec)
       
    78 {
       
    79     return KJS::cacheGlobalObject<JSSVGFESpotLightElementPrototype>(exec, "[[JSSVGFESpotLightElement.prototype]]");
       
    80 }
       
    81 
       
    82 const ClassInfo JSSVGFESpotLightElement::info = { "SVGFESpotLightElement", &JSSVGElement::info, &JSSVGFESpotLightElementTable, 0 };
       
    83 
       
    84 JSSVGFESpotLightElement::JSSVGFESpotLightElement(ExecState* exec, SVGFESpotLightElement* impl)
       
    85     : JSSVGElement(exec, impl)
       
    86 {
       
    87     setPrototype(JSSVGFESpotLightElementPrototype::self(exec));
       
    88 }
       
    89 
       
    90 bool JSSVGFESpotLightElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
    91 {
       
    92     return getStaticValueSlot<JSSVGFESpotLightElement, JSSVGElement>(exec, &JSSVGFESpotLightElementTable, this, propertyName, slot);
       
    93 }
       
    94 
       
    95 JSValue* JSSVGFESpotLightElement::getValueProperty(ExecState* exec, int token) const
       
    96 {
       
    97     switch (token) {
       
    98     case XAttrNum: {
       
    99         SVGFESpotLightElement* imp = static_cast<SVGFESpotLightElement*>(impl());
       
   100 
       
   101         ASSERT(exec && exec->dynamicInterpreter());
       
   102 
       
   103         RefPtr<SVGAnimatedNumber> obj = imp->xAnimated();
       
   104         Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
       
   105         if (activeFrame) {
       
   106             SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
       
   107             if (extensions) {
       
   108                 if (extensions->hasGenericContext<SVGAnimatedNumber>(obj.get()))
       
   109                     ASSERT(extensions->genericContext<SVGAnimatedNumber>(obj.get()) == imp);
       
   110                 else
       
   111                     extensions->setGenericContext<SVGAnimatedNumber>(obj.get(), imp);
       
   112             }
       
   113         }
       
   114 
       
   115         return toJS(exec, obj.get());
       
   116     }
       
   117     case YAttrNum: {
       
   118         SVGFESpotLightElement* imp = static_cast<SVGFESpotLightElement*>(impl());
       
   119 
       
   120         ASSERT(exec && exec->dynamicInterpreter());
       
   121 
       
   122         RefPtr<SVGAnimatedNumber> obj = imp->yAnimated();
       
   123         Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
       
   124         if (activeFrame) {
       
   125             SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
       
   126             if (extensions) {
       
   127                 if (extensions->hasGenericContext<SVGAnimatedNumber>(obj.get()))
       
   128                     ASSERT(extensions->genericContext<SVGAnimatedNumber>(obj.get()) == imp);
       
   129                 else
       
   130                     extensions->setGenericContext<SVGAnimatedNumber>(obj.get(), imp);
       
   131             }
       
   132         }
       
   133 
       
   134         return toJS(exec, obj.get());
       
   135     }
       
   136     case ZAttrNum: {
       
   137         SVGFESpotLightElement* imp = static_cast<SVGFESpotLightElement*>(impl());
       
   138 
       
   139         ASSERT(exec && exec->dynamicInterpreter());
       
   140 
       
   141         RefPtr<SVGAnimatedNumber> obj = imp->zAnimated();
       
   142         Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
       
   143         if (activeFrame) {
       
   144             SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
       
   145             if (extensions) {
       
   146                 if (extensions->hasGenericContext<SVGAnimatedNumber>(obj.get()))
       
   147                     ASSERT(extensions->genericContext<SVGAnimatedNumber>(obj.get()) == imp);
       
   148                 else
       
   149                     extensions->setGenericContext<SVGAnimatedNumber>(obj.get(), imp);
       
   150             }
       
   151         }
       
   152 
       
   153         return toJS(exec, obj.get());
       
   154     }
       
   155     case PointsAtXAttrNum: {
       
   156         SVGFESpotLightElement* imp = static_cast<SVGFESpotLightElement*>(impl());
       
   157 
       
   158         ASSERT(exec && exec->dynamicInterpreter());
       
   159 
       
   160         RefPtr<SVGAnimatedNumber> obj = imp->pointsAtXAnimated();
       
   161         Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
       
   162         if (activeFrame) {
       
   163             SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
       
   164             if (extensions) {
       
   165                 if (extensions->hasGenericContext<SVGAnimatedNumber>(obj.get()))
       
   166                     ASSERT(extensions->genericContext<SVGAnimatedNumber>(obj.get()) == imp);
       
   167                 else
       
   168                     extensions->setGenericContext<SVGAnimatedNumber>(obj.get(), imp);
       
   169             }
       
   170         }
       
   171 
       
   172         return toJS(exec, obj.get());
       
   173     }
       
   174     case PointsAtYAttrNum: {
       
   175         SVGFESpotLightElement* imp = static_cast<SVGFESpotLightElement*>(impl());
       
   176 
       
   177         ASSERT(exec && exec->dynamicInterpreter());
       
   178 
       
   179         RefPtr<SVGAnimatedNumber> obj = imp->pointsAtYAnimated();
       
   180         Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
       
   181         if (activeFrame) {
       
   182             SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
       
   183             if (extensions) {
       
   184                 if (extensions->hasGenericContext<SVGAnimatedNumber>(obj.get()))
       
   185                     ASSERT(extensions->genericContext<SVGAnimatedNumber>(obj.get()) == imp);
       
   186                 else
       
   187                     extensions->setGenericContext<SVGAnimatedNumber>(obj.get(), imp);
       
   188             }
       
   189         }
       
   190 
       
   191         return toJS(exec, obj.get());
       
   192     }
       
   193     case PointsAtZAttrNum: {
       
   194         SVGFESpotLightElement* imp = static_cast<SVGFESpotLightElement*>(impl());
       
   195 
       
   196         ASSERT(exec && exec->dynamicInterpreter());
       
   197 
       
   198         RefPtr<SVGAnimatedNumber> obj = imp->pointsAtZAnimated();
       
   199         Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
       
   200         if (activeFrame) {
       
   201             SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
       
   202             if (extensions) {
       
   203                 if (extensions->hasGenericContext<SVGAnimatedNumber>(obj.get()))
       
   204                     ASSERT(extensions->genericContext<SVGAnimatedNumber>(obj.get()) == imp);
       
   205                 else
       
   206                     extensions->setGenericContext<SVGAnimatedNumber>(obj.get(), imp);
       
   207             }
       
   208         }
       
   209 
       
   210         return toJS(exec, obj.get());
       
   211     }
       
   212     case SpecularExponentAttrNum: {
       
   213         SVGFESpotLightElement* imp = static_cast<SVGFESpotLightElement*>(impl());
       
   214 
       
   215         ASSERT(exec && exec->dynamicInterpreter());
       
   216 
       
   217         RefPtr<SVGAnimatedNumber> obj = imp->specularExponentAnimated();
       
   218         Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
       
   219         if (activeFrame) {
       
   220             SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
       
   221             if (extensions) {
       
   222                 if (extensions->hasGenericContext<SVGAnimatedNumber>(obj.get()))
       
   223                     ASSERT(extensions->genericContext<SVGAnimatedNumber>(obj.get()) == imp);
       
   224                 else
       
   225                     extensions->setGenericContext<SVGAnimatedNumber>(obj.get(), imp);
       
   226             }
       
   227         }
       
   228 
       
   229         return toJS(exec, obj.get());
       
   230     }
       
   231     case LimitingConeAngleAttrNum: {
       
   232         SVGFESpotLightElement* imp = static_cast<SVGFESpotLightElement*>(impl());
       
   233 
       
   234         ASSERT(exec && exec->dynamicInterpreter());
       
   235 
       
   236         RefPtr<SVGAnimatedNumber> obj = imp->limitingConeAngleAnimated();
       
   237         Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
       
   238         if (activeFrame) {
       
   239             SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0);
       
   240             if (extensions) {
       
   241                 if (extensions->hasGenericContext<SVGAnimatedNumber>(obj.get()))
       
   242                     ASSERT(extensions->genericContext<SVGAnimatedNumber>(obj.get()) == imp);
       
   243                 else
       
   244                     extensions->setGenericContext<SVGAnimatedNumber>(obj.get(), imp);
       
   245             }
       
   246         }
       
   247 
       
   248         return toJS(exec, obj.get());
       
   249     }
       
   250     }
       
   251     return 0;
       
   252 }
       
   253 
       
   254 
       
   255 }
       
   256 
       
   257 #endif // ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)