WebCore/generated/JSSVGFEGaussianBlurElement.cpp
changeset 0 4f2f89ce4247
equal deleted inserted replaced
-1:000000000000 0:4f2f89ce4247
       
     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 #if ENABLE(SVG) && ENABLE(FILTERS)
       
    24 
       
    25 #include "JSSVGFEGaussianBlurElement.h"
       
    26 
       
    27 #include "CSSMutableStyleDeclaration.h"
       
    28 #include "CSSStyleDeclaration.h"
       
    29 #include "CSSValue.h"
       
    30 #include "JSCSSStyleDeclaration.h"
       
    31 #include "JSCSSValue.h"
       
    32 #include "JSSVGAnimatedLength.h"
       
    33 #include "JSSVGAnimatedNumber.h"
       
    34 #include "JSSVGAnimatedString.h"
       
    35 #include "SVGFEGaussianBlurElement.h"
       
    36 #include <runtime/Error.h>
       
    37 #include <wtf/GetPtr.h>
       
    38 
       
    39 using namespace JSC;
       
    40 
       
    41 namespace WebCore {
       
    42 
       
    43 ASSERT_CLASS_FITS_IN_CELL(JSSVGFEGaussianBlurElement);
       
    44 
       
    45 /* Hash table */
       
    46 #if ENABLE(JIT)
       
    47 #define THUNK_GENERATOR(generator) , generator
       
    48 #else
       
    49 #define THUNK_GENERATOR(generator)
       
    50 #endif
       
    51 
       
    52 static const HashTableValue JSSVGFEGaussianBlurElementTableValues[12] =
       
    53 {
       
    54     { "in1", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEGaussianBlurElementIn1), (intptr_t)0 THUNK_GENERATOR(0) },
       
    55     { "stdDeviationX", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEGaussianBlurElementStdDeviationX), (intptr_t)0 THUNK_GENERATOR(0) },
       
    56     { "stdDeviationY", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEGaussianBlurElementStdDeviationY), (intptr_t)0 THUNK_GENERATOR(0) },
       
    57     { "x", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEGaussianBlurElementX), (intptr_t)0 THUNK_GENERATOR(0) },
       
    58     { "y", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEGaussianBlurElementY), (intptr_t)0 THUNK_GENERATOR(0) },
       
    59     { "width", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEGaussianBlurElementWidth), (intptr_t)0 THUNK_GENERATOR(0) },
       
    60     { "height", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEGaussianBlurElementHeight), (intptr_t)0 THUNK_GENERATOR(0) },
       
    61     { "result", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEGaussianBlurElementResult), (intptr_t)0 THUNK_GENERATOR(0) },
       
    62     { "className", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEGaussianBlurElementClassName), (intptr_t)0 THUNK_GENERATOR(0) },
       
    63     { "style", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEGaussianBlurElementStyle), (intptr_t)0 THUNK_GENERATOR(0) },
       
    64     { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEGaussianBlurElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) },
       
    65     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    66 };
       
    67 
       
    68 #undef THUNK_GENERATOR
       
    69 static JSC_CONST_HASHTABLE HashTable JSSVGFEGaussianBlurElementTable = { 34, 31, JSSVGFEGaussianBlurElementTableValues, 0 };
       
    70 /* Hash table for constructor */
       
    71 #if ENABLE(JIT)
       
    72 #define THUNK_GENERATOR(generator) , generator
       
    73 #else
       
    74 #define THUNK_GENERATOR(generator)
       
    75 #endif
       
    76 
       
    77 static const HashTableValue JSSVGFEGaussianBlurElementConstructorTableValues[1] =
       
    78 {
       
    79     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    80 };
       
    81 
       
    82 #undef THUNK_GENERATOR
       
    83 static JSC_CONST_HASHTABLE HashTable JSSVGFEGaussianBlurElementConstructorTable = { 1, 0, JSSVGFEGaussianBlurElementConstructorTableValues, 0 };
       
    84 class JSSVGFEGaussianBlurElementConstructor : public DOMConstructorObject {
       
    85 public:
       
    86     JSSVGFEGaussianBlurElementConstructor(JSC::ExecState*, JSDOMGlobalObject*);
       
    87 
       
    88     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
       
    89     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
       
    90     virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
       
    91     static const JSC::ClassInfo s_info;
       
    92     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
       
    93     {
       
    94         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
       
    95     }
       
    96 protected:
       
    97     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
       
    98 };
       
    99 
       
   100 const ClassInfo JSSVGFEGaussianBlurElementConstructor::s_info = { "SVGFEGaussianBlurElementConstructor", 0, &JSSVGFEGaussianBlurElementConstructorTable, 0 };
       
   101 
       
   102 JSSVGFEGaussianBlurElementConstructor::JSSVGFEGaussianBlurElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
       
   103     : DOMConstructorObject(JSSVGFEGaussianBlurElementConstructor::createStructure(globalObject->objectPrototype()), globalObject)
       
   104 {
       
   105     putDirect(exec->propertyNames().prototype, JSSVGFEGaussianBlurElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
       
   106 }
       
   107 
       
   108 bool JSSVGFEGaussianBlurElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   109 {
       
   110     return getStaticValueSlot<JSSVGFEGaussianBlurElementConstructor, DOMObject>(exec, &JSSVGFEGaussianBlurElementConstructorTable, this, propertyName, slot);
       
   111 }
       
   112 
       
   113 bool JSSVGFEGaussianBlurElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   114 {
       
   115     return getStaticValueDescriptor<JSSVGFEGaussianBlurElementConstructor, DOMObject>(exec, &JSSVGFEGaussianBlurElementConstructorTable, this, propertyName, descriptor);
       
   116 }
       
   117 
       
   118 /* Hash table for prototype */
       
   119 #if ENABLE(JIT)
       
   120 #define THUNK_GENERATOR(generator) , generator
       
   121 #else
       
   122 #define THUNK_GENERATOR(generator)
       
   123 #endif
       
   124 
       
   125 static const HashTableValue JSSVGFEGaussianBlurElementPrototypeTableValues[3] =
       
   126 {
       
   127     { "setStdDeviation", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGFEGaussianBlurElementPrototypeFunctionSetStdDeviation), (intptr_t)2 THUNK_GENERATOR(0) },
       
   128     { "getPresentationAttribute", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGFEGaussianBlurElementPrototypeFunctionGetPresentationAttribute), (intptr_t)1 THUNK_GENERATOR(0) },
       
   129     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
   130 };
       
   131 
       
   132 #undef THUNK_GENERATOR
       
   133 static JSC_CONST_HASHTABLE HashTable JSSVGFEGaussianBlurElementPrototypeTable = { 4, 3, JSSVGFEGaussianBlurElementPrototypeTableValues, 0 };
       
   134 const ClassInfo JSSVGFEGaussianBlurElementPrototype::s_info = { "SVGFEGaussianBlurElementPrototype", 0, &JSSVGFEGaussianBlurElementPrototypeTable, 0 };
       
   135 
       
   136 JSObject* JSSVGFEGaussianBlurElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
       
   137 {
       
   138     return getDOMPrototype<JSSVGFEGaussianBlurElement>(exec, globalObject);
       
   139 }
       
   140 
       
   141 bool JSSVGFEGaussianBlurElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   142 {
       
   143     return getStaticFunctionSlot<JSObject>(exec, &JSSVGFEGaussianBlurElementPrototypeTable, this, propertyName, slot);
       
   144 }
       
   145 
       
   146 bool JSSVGFEGaussianBlurElementPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   147 {
       
   148     return getStaticFunctionDescriptor<JSObject>(exec, &JSSVGFEGaussianBlurElementPrototypeTable, this, propertyName, descriptor);
       
   149 }
       
   150 
       
   151 const ClassInfo JSSVGFEGaussianBlurElement::s_info = { "SVGFEGaussianBlurElement", &JSSVGElement::s_info, &JSSVGFEGaussianBlurElementTable, 0 };
       
   152 
       
   153 JSSVGFEGaussianBlurElement::JSSVGFEGaussianBlurElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFEGaussianBlurElement> impl)
       
   154     : JSSVGElement(structure, globalObject, impl)
       
   155 {
       
   156 }
       
   157 
       
   158 JSObject* JSSVGFEGaussianBlurElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
       
   159 {
       
   160     return new (exec) JSSVGFEGaussianBlurElementPrototype(globalObject, JSSVGFEGaussianBlurElementPrototype::createStructure(JSSVGElementPrototype::self(exec, globalObject)));
       
   161 }
       
   162 
       
   163 bool JSSVGFEGaussianBlurElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   164 {
       
   165     return getStaticValueSlot<JSSVGFEGaussianBlurElement, Base>(exec, &JSSVGFEGaussianBlurElementTable, this, propertyName, slot);
       
   166 }
       
   167 
       
   168 bool JSSVGFEGaussianBlurElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   169 {
       
   170     return getStaticValueDescriptor<JSSVGFEGaussianBlurElement, Base>(exec, &JSSVGFEGaussianBlurElementTable, this, propertyName, descriptor);
       
   171 }
       
   172 
       
   173 JSValue jsSVGFEGaussianBlurElementIn1(ExecState* exec, JSValue slotBase, const Identifier&)
       
   174 {
       
   175     JSSVGFEGaussianBlurElement* castedThis = static_cast<JSSVGFEGaussianBlurElement*>(asObject(slotBase));
       
   176     UNUSED_PARAM(exec);
       
   177     SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(castedThis->impl());
       
   178     RefPtr<SVGAnimatedString> obj = imp->in1Animated();
       
   179     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
       
   180     return result;
       
   181 }
       
   182 
       
   183 JSValue jsSVGFEGaussianBlurElementStdDeviationX(ExecState* exec, JSValue slotBase, const Identifier&)
       
   184 {
       
   185     JSSVGFEGaussianBlurElement* castedThis = static_cast<JSSVGFEGaussianBlurElement*>(asObject(slotBase));
       
   186     UNUSED_PARAM(exec);
       
   187     SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(castedThis->impl());
       
   188     RefPtr<SVGAnimatedNumber> obj = imp->stdDeviationXAnimated();
       
   189     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
       
   190     return result;
       
   191 }
       
   192 
       
   193 JSValue jsSVGFEGaussianBlurElementStdDeviationY(ExecState* exec, JSValue slotBase, const Identifier&)
       
   194 {
       
   195     JSSVGFEGaussianBlurElement* castedThis = static_cast<JSSVGFEGaussianBlurElement*>(asObject(slotBase));
       
   196     UNUSED_PARAM(exec);
       
   197     SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(castedThis->impl());
       
   198     RefPtr<SVGAnimatedNumber> obj = imp->stdDeviationYAnimated();
       
   199     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
       
   200     return result;
       
   201 }
       
   202 
       
   203 JSValue jsSVGFEGaussianBlurElementX(ExecState* exec, JSValue slotBase, const Identifier&)
       
   204 {
       
   205     JSSVGFEGaussianBlurElement* castedThis = static_cast<JSSVGFEGaussianBlurElement*>(asObject(slotBase));
       
   206     UNUSED_PARAM(exec);
       
   207     SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(castedThis->impl());
       
   208     RefPtr<SVGAnimatedLength> obj = imp->xAnimated();
       
   209     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
       
   210     return result;
       
   211 }
       
   212 
       
   213 JSValue jsSVGFEGaussianBlurElementY(ExecState* exec, JSValue slotBase, const Identifier&)
       
   214 {
       
   215     JSSVGFEGaussianBlurElement* castedThis = static_cast<JSSVGFEGaussianBlurElement*>(asObject(slotBase));
       
   216     UNUSED_PARAM(exec);
       
   217     SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(castedThis->impl());
       
   218     RefPtr<SVGAnimatedLength> obj = imp->yAnimated();
       
   219     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
       
   220     return result;
       
   221 }
       
   222 
       
   223 JSValue jsSVGFEGaussianBlurElementWidth(ExecState* exec, JSValue slotBase, const Identifier&)
       
   224 {
       
   225     JSSVGFEGaussianBlurElement* castedThis = static_cast<JSSVGFEGaussianBlurElement*>(asObject(slotBase));
       
   226     UNUSED_PARAM(exec);
       
   227     SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(castedThis->impl());
       
   228     RefPtr<SVGAnimatedLength> obj = imp->widthAnimated();
       
   229     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
       
   230     return result;
       
   231 }
       
   232 
       
   233 JSValue jsSVGFEGaussianBlurElementHeight(ExecState* exec, JSValue slotBase, const Identifier&)
       
   234 {
       
   235     JSSVGFEGaussianBlurElement* castedThis = static_cast<JSSVGFEGaussianBlurElement*>(asObject(slotBase));
       
   236     UNUSED_PARAM(exec);
       
   237     SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(castedThis->impl());
       
   238     RefPtr<SVGAnimatedLength> obj = imp->heightAnimated();
       
   239     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
       
   240     return result;
       
   241 }
       
   242 
       
   243 JSValue jsSVGFEGaussianBlurElementResult(ExecState* exec, JSValue slotBase, const Identifier&)
       
   244 {
       
   245     JSSVGFEGaussianBlurElement* castedThis = static_cast<JSSVGFEGaussianBlurElement*>(asObject(slotBase));
       
   246     UNUSED_PARAM(exec);
       
   247     SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(castedThis->impl());
       
   248     RefPtr<SVGAnimatedString> obj = imp->resultAnimated();
       
   249     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
       
   250     return result;
       
   251 }
       
   252 
       
   253 JSValue jsSVGFEGaussianBlurElementClassName(ExecState* exec, JSValue slotBase, const Identifier&)
       
   254 {
       
   255     JSSVGFEGaussianBlurElement* castedThis = static_cast<JSSVGFEGaussianBlurElement*>(asObject(slotBase));
       
   256     UNUSED_PARAM(exec);
       
   257     SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(castedThis->impl());
       
   258     RefPtr<SVGAnimatedString> obj = imp->classNameAnimated();
       
   259     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
       
   260     return result;
       
   261 }
       
   262 
       
   263 JSValue jsSVGFEGaussianBlurElementStyle(ExecState* exec, JSValue slotBase, const Identifier&)
       
   264 {
       
   265     JSSVGFEGaussianBlurElement* castedThis = static_cast<JSSVGFEGaussianBlurElement*>(asObject(slotBase));
       
   266     UNUSED_PARAM(exec);
       
   267     SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(castedThis->impl());
       
   268     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style()));
       
   269     return result;
       
   270 }
       
   271 
       
   272 JSValue jsSVGFEGaussianBlurElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
       
   273 {
       
   274     JSSVGFEGaussianBlurElement* domObject = static_cast<JSSVGFEGaussianBlurElement*>(asObject(slotBase));
       
   275     return JSSVGFEGaussianBlurElement::getConstructor(exec, domObject->globalObject());
       
   276 }
       
   277 JSValue JSSVGFEGaussianBlurElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
       
   278 {
       
   279     return getDOMConstructor<JSSVGFEGaussianBlurElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
       
   280 }
       
   281 
       
   282 EncodedJSValue JSC_HOST_CALL jsSVGFEGaussianBlurElementPrototypeFunctionSetStdDeviation(ExecState* exec)
       
   283 {
       
   284     JSValue thisValue = exec->hostThisValue();
       
   285     if (!thisValue.inherits(&JSSVGFEGaussianBlurElement::s_info))
       
   286         return throwVMTypeError(exec);
       
   287     JSSVGFEGaussianBlurElement* castedThis = static_cast<JSSVGFEGaussianBlurElement*>(asObject(thisValue));
       
   288     SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(castedThis->impl());
       
   289     float stdDeviationX = exec->argument(0).toFloat(exec);
       
   290     float stdDeviationY = exec->argument(1).toFloat(exec);
       
   291 
       
   292     imp->setStdDeviation(stdDeviationX, stdDeviationY);
       
   293     return JSValue::encode(jsUndefined());
       
   294 }
       
   295 
       
   296 EncodedJSValue JSC_HOST_CALL jsSVGFEGaussianBlurElementPrototypeFunctionGetPresentationAttribute(ExecState* exec)
       
   297 {
       
   298     JSValue thisValue = exec->hostThisValue();
       
   299     if (!thisValue.inherits(&JSSVGFEGaussianBlurElement::s_info))
       
   300         return throwVMTypeError(exec);
       
   301     JSSVGFEGaussianBlurElement* castedThis = static_cast<JSSVGFEGaussianBlurElement*>(asObject(thisValue));
       
   302     SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(castedThis->impl());
       
   303     const String& name = ustringToString(exec->argument(0).toString(exec));
       
   304 
       
   305 
       
   306     JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name)));
       
   307     return JSValue::encode(result);
       
   308 }
       
   309 
       
   310 
       
   311 }
       
   312 
       
   313 #endif // ENABLE(SVG) && ENABLE(FILTERS)