WebCore/generated/JSSVGTextPathElement.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)
       
    24 
       
    25 #include "JSSVGTextPathElement.h"
       
    26 
       
    27 #include "JSSVGAnimatedEnumeration.h"
       
    28 #include "JSSVGAnimatedLength.h"
       
    29 #include "JSSVGAnimatedString.h"
       
    30 #include "SVGTextPathElement.h"
       
    31 #include <wtf/GetPtr.h>
       
    32 
       
    33 using namespace JSC;
       
    34 
       
    35 namespace WebCore {
       
    36 
       
    37 ASSERT_CLASS_FITS_IN_CELL(JSSVGTextPathElement);
       
    38 
       
    39 /* Hash table */
       
    40 #if ENABLE(JIT)
       
    41 #define THUNK_GENERATOR(generator) , generator
       
    42 #else
       
    43 #define THUNK_GENERATOR(generator)
       
    44 #endif
       
    45 
       
    46 static const HashTableValue JSSVGTextPathElementTableValues[6] =
       
    47 {
       
    48     { "startOffset", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTextPathElementStartOffset), (intptr_t)0 THUNK_GENERATOR(0) },
       
    49     { "method", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTextPathElementMethod), (intptr_t)0 THUNK_GENERATOR(0) },
       
    50     { "spacing", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTextPathElementSpacing), (intptr_t)0 THUNK_GENERATOR(0) },
       
    51     { "href", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTextPathElementHref), (intptr_t)0 THUNK_GENERATOR(0) },
       
    52     { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTextPathElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) },
       
    53     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    54 };
       
    55 
       
    56 #undef THUNK_GENERATOR
       
    57 static JSC_CONST_HASHTABLE HashTable JSSVGTextPathElementTable = { 16, 15, JSSVGTextPathElementTableValues, 0 };
       
    58 /* Hash table for constructor */
       
    59 #if ENABLE(JIT)
       
    60 #define THUNK_GENERATOR(generator) , generator
       
    61 #else
       
    62 #define THUNK_GENERATOR(generator)
       
    63 #endif
       
    64 
       
    65 static const HashTableValue JSSVGTextPathElementConstructorTableValues[7] =
       
    66 {
       
    67     { "TEXTPATH_METHODTYPE_UNKNOWN", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTextPathElementTEXTPATH_METHODTYPE_UNKNOWN), (intptr_t)0 THUNK_GENERATOR(0) },
       
    68     { "TEXTPATH_METHODTYPE_ALIGN", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTextPathElementTEXTPATH_METHODTYPE_ALIGN), (intptr_t)0 THUNK_GENERATOR(0) },
       
    69     { "TEXTPATH_METHODTYPE_STRETCH", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTextPathElementTEXTPATH_METHODTYPE_STRETCH), (intptr_t)0 THUNK_GENERATOR(0) },
       
    70     { "TEXTPATH_SPACINGTYPE_UNKNOWN", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTextPathElementTEXTPATH_SPACINGTYPE_UNKNOWN), (intptr_t)0 THUNK_GENERATOR(0) },
       
    71     { "TEXTPATH_SPACINGTYPE_AUTO", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTextPathElementTEXTPATH_SPACINGTYPE_AUTO), (intptr_t)0 THUNK_GENERATOR(0) },
       
    72     { "TEXTPATH_SPACINGTYPE_EXACT", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTextPathElementTEXTPATH_SPACINGTYPE_EXACT), (intptr_t)0 THUNK_GENERATOR(0) },
       
    73     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    74 };
       
    75 
       
    76 #undef THUNK_GENERATOR
       
    77 static JSC_CONST_HASHTABLE HashTable JSSVGTextPathElementConstructorTable = { 18, 15, JSSVGTextPathElementConstructorTableValues, 0 };
       
    78 
       
    79 COMPILE_ASSERT(0 == SVGTextPathElement::TEXTPATH_METHODTYPE_UNKNOWN, SVGTextPathElementEnumTEXTPATH_METHODTYPE_UNKNOWNIsWrongUseDontCheckEnums);
       
    80 COMPILE_ASSERT(1 == SVGTextPathElement::TEXTPATH_METHODTYPE_ALIGN, SVGTextPathElementEnumTEXTPATH_METHODTYPE_ALIGNIsWrongUseDontCheckEnums);
       
    81 COMPILE_ASSERT(2 == SVGTextPathElement::TEXTPATH_METHODTYPE_STRETCH, SVGTextPathElementEnumTEXTPATH_METHODTYPE_STRETCHIsWrongUseDontCheckEnums);
       
    82 COMPILE_ASSERT(0 == SVGTextPathElement::TEXTPATH_SPACINGTYPE_UNKNOWN, SVGTextPathElementEnumTEXTPATH_SPACINGTYPE_UNKNOWNIsWrongUseDontCheckEnums);
       
    83 COMPILE_ASSERT(1 == SVGTextPathElement::TEXTPATH_SPACINGTYPE_AUTO, SVGTextPathElementEnumTEXTPATH_SPACINGTYPE_AUTOIsWrongUseDontCheckEnums);
       
    84 COMPILE_ASSERT(2 == SVGTextPathElement::TEXTPATH_SPACINGTYPE_EXACT, SVGTextPathElementEnumTEXTPATH_SPACINGTYPE_EXACTIsWrongUseDontCheckEnums);
       
    85 
       
    86 class JSSVGTextPathElementConstructor : public DOMConstructorObject {
       
    87 public:
       
    88     JSSVGTextPathElementConstructor(JSC::ExecState*, JSDOMGlobalObject*);
       
    89 
       
    90     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
       
    91     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
       
    92     virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
       
    93     static const JSC::ClassInfo s_info;
       
    94     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
       
    95     {
       
    96         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
       
    97     }
       
    98 protected:
       
    99     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
       
   100 };
       
   101 
       
   102 const ClassInfo JSSVGTextPathElementConstructor::s_info = { "SVGTextPathElementConstructor", 0, &JSSVGTextPathElementConstructorTable, 0 };
       
   103 
       
   104 JSSVGTextPathElementConstructor::JSSVGTextPathElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
       
   105     : DOMConstructorObject(JSSVGTextPathElementConstructor::createStructure(globalObject->objectPrototype()), globalObject)
       
   106 {
       
   107     putDirect(exec->propertyNames().prototype, JSSVGTextPathElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
       
   108 }
       
   109 
       
   110 bool JSSVGTextPathElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   111 {
       
   112     return getStaticValueSlot<JSSVGTextPathElementConstructor, DOMObject>(exec, &JSSVGTextPathElementConstructorTable, this, propertyName, slot);
       
   113 }
       
   114 
       
   115 bool JSSVGTextPathElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   116 {
       
   117     return getStaticValueDescriptor<JSSVGTextPathElementConstructor, DOMObject>(exec, &JSSVGTextPathElementConstructorTable, this, propertyName, descriptor);
       
   118 }
       
   119 
       
   120 /* Hash table for prototype */
       
   121 #if ENABLE(JIT)
       
   122 #define THUNK_GENERATOR(generator) , generator
       
   123 #else
       
   124 #define THUNK_GENERATOR(generator)
       
   125 #endif
       
   126 
       
   127 static const HashTableValue JSSVGTextPathElementPrototypeTableValues[7] =
       
   128 {
       
   129     { "TEXTPATH_METHODTYPE_UNKNOWN", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTextPathElementTEXTPATH_METHODTYPE_UNKNOWN), (intptr_t)0 THUNK_GENERATOR(0) },
       
   130     { "TEXTPATH_METHODTYPE_ALIGN", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTextPathElementTEXTPATH_METHODTYPE_ALIGN), (intptr_t)0 THUNK_GENERATOR(0) },
       
   131     { "TEXTPATH_METHODTYPE_STRETCH", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTextPathElementTEXTPATH_METHODTYPE_STRETCH), (intptr_t)0 THUNK_GENERATOR(0) },
       
   132     { "TEXTPATH_SPACINGTYPE_UNKNOWN", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTextPathElementTEXTPATH_SPACINGTYPE_UNKNOWN), (intptr_t)0 THUNK_GENERATOR(0) },
       
   133     { "TEXTPATH_SPACINGTYPE_AUTO", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTextPathElementTEXTPATH_SPACINGTYPE_AUTO), (intptr_t)0 THUNK_GENERATOR(0) },
       
   134     { "TEXTPATH_SPACINGTYPE_EXACT", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTextPathElementTEXTPATH_SPACINGTYPE_EXACT), (intptr_t)0 THUNK_GENERATOR(0) },
       
   135     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
   136 };
       
   137 
       
   138 #undef THUNK_GENERATOR
       
   139 static JSC_CONST_HASHTABLE HashTable JSSVGTextPathElementPrototypeTable = { 18, 15, JSSVGTextPathElementPrototypeTableValues, 0 };
       
   140 const ClassInfo JSSVGTextPathElementPrototype::s_info = { "SVGTextPathElementPrototype", 0, &JSSVGTextPathElementPrototypeTable, 0 };
       
   141 
       
   142 JSObject* JSSVGTextPathElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
       
   143 {
       
   144     return getDOMPrototype<JSSVGTextPathElement>(exec, globalObject);
       
   145 }
       
   146 
       
   147 bool JSSVGTextPathElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   148 {
       
   149     return getStaticValueSlot<JSSVGTextPathElementPrototype, JSObject>(exec, &JSSVGTextPathElementPrototypeTable, this, propertyName, slot);
       
   150 }
       
   151 
       
   152 bool JSSVGTextPathElementPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   153 {
       
   154     return getStaticValueDescriptor<JSSVGTextPathElementPrototype, JSObject>(exec, &JSSVGTextPathElementPrototypeTable, this, propertyName, descriptor);
       
   155 }
       
   156 
       
   157 const ClassInfo JSSVGTextPathElement::s_info = { "SVGTextPathElement", &JSSVGTextContentElement::s_info, &JSSVGTextPathElementTable, 0 };
       
   158 
       
   159 JSSVGTextPathElement::JSSVGTextPathElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGTextPathElement> impl)
       
   160     : JSSVGTextContentElement(structure, globalObject, impl)
       
   161 {
       
   162 }
       
   163 
       
   164 JSObject* JSSVGTextPathElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
       
   165 {
       
   166     return new (exec) JSSVGTextPathElementPrototype(globalObject, JSSVGTextPathElementPrototype::createStructure(JSSVGTextContentElementPrototype::self(exec, globalObject)));
       
   167 }
       
   168 
       
   169 bool JSSVGTextPathElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   170 {
       
   171     return getStaticValueSlot<JSSVGTextPathElement, Base>(exec, &JSSVGTextPathElementTable, this, propertyName, slot);
       
   172 }
       
   173 
       
   174 bool JSSVGTextPathElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   175 {
       
   176     return getStaticValueDescriptor<JSSVGTextPathElement, Base>(exec, &JSSVGTextPathElementTable, this, propertyName, descriptor);
       
   177 }
       
   178 
       
   179 JSValue jsSVGTextPathElementStartOffset(ExecState* exec, JSValue slotBase, const Identifier&)
       
   180 {
       
   181     JSSVGTextPathElement* castedThis = static_cast<JSSVGTextPathElement*>(asObject(slotBase));
       
   182     UNUSED_PARAM(exec);
       
   183     SVGTextPathElement* imp = static_cast<SVGTextPathElement*>(castedThis->impl());
       
   184     RefPtr<SVGAnimatedLength> obj = imp->startOffsetAnimated();
       
   185     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
       
   186     return result;
       
   187 }
       
   188 
       
   189 JSValue jsSVGTextPathElementMethod(ExecState* exec, JSValue slotBase, const Identifier&)
       
   190 {
       
   191     JSSVGTextPathElement* castedThis = static_cast<JSSVGTextPathElement*>(asObject(slotBase));
       
   192     UNUSED_PARAM(exec);
       
   193     SVGTextPathElement* imp = static_cast<SVGTextPathElement*>(castedThis->impl());
       
   194     RefPtr<SVGAnimatedEnumeration> obj = imp->methodAnimated();
       
   195     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
       
   196     return result;
       
   197 }
       
   198 
       
   199 JSValue jsSVGTextPathElementSpacing(ExecState* exec, JSValue slotBase, const Identifier&)
       
   200 {
       
   201     JSSVGTextPathElement* castedThis = static_cast<JSSVGTextPathElement*>(asObject(slotBase));
       
   202     UNUSED_PARAM(exec);
       
   203     SVGTextPathElement* imp = static_cast<SVGTextPathElement*>(castedThis->impl());
       
   204     RefPtr<SVGAnimatedEnumeration> obj = imp->spacingAnimated();
       
   205     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
       
   206     return result;
       
   207 }
       
   208 
       
   209 JSValue jsSVGTextPathElementHref(ExecState* exec, JSValue slotBase, const Identifier&)
       
   210 {
       
   211     JSSVGTextPathElement* castedThis = static_cast<JSSVGTextPathElement*>(asObject(slotBase));
       
   212     UNUSED_PARAM(exec);
       
   213     SVGTextPathElement* imp = static_cast<SVGTextPathElement*>(castedThis->impl());
       
   214     RefPtr<SVGAnimatedString> obj = imp->hrefAnimated();
       
   215     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
       
   216     return result;
       
   217 }
       
   218 
       
   219 JSValue jsSVGTextPathElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
       
   220 {
       
   221     JSSVGTextPathElement* domObject = static_cast<JSSVGTextPathElement*>(asObject(slotBase));
       
   222     return JSSVGTextPathElement::getConstructor(exec, domObject->globalObject());
       
   223 }
       
   224 JSValue JSSVGTextPathElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
       
   225 {
       
   226     return getDOMConstructor<JSSVGTextPathElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
       
   227 }
       
   228 
       
   229 // Constant getters
       
   230 
       
   231 JSValue jsSVGTextPathElementTEXTPATH_METHODTYPE_UNKNOWN(ExecState* exec, JSValue, const Identifier&)
       
   232 {
       
   233     return jsNumber(exec, static_cast<int>(0));
       
   234 }
       
   235 
       
   236 JSValue jsSVGTextPathElementTEXTPATH_METHODTYPE_ALIGN(ExecState* exec, JSValue, const Identifier&)
       
   237 {
       
   238     return jsNumber(exec, static_cast<int>(1));
       
   239 }
       
   240 
       
   241 JSValue jsSVGTextPathElementTEXTPATH_METHODTYPE_STRETCH(ExecState* exec, JSValue, const Identifier&)
       
   242 {
       
   243     return jsNumber(exec, static_cast<int>(2));
       
   244 }
       
   245 
       
   246 JSValue jsSVGTextPathElementTEXTPATH_SPACINGTYPE_UNKNOWN(ExecState* exec, JSValue, const Identifier&)
       
   247 {
       
   248     return jsNumber(exec, static_cast<int>(0));
       
   249 }
       
   250 
       
   251 JSValue jsSVGTextPathElementTEXTPATH_SPACINGTYPE_AUTO(ExecState* exec, JSValue, const Identifier&)
       
   252 {
       
   253     return jsNumber(exec, static_cast<int>(1));
       
   254 }
       
   255 
       
   256 JSValue jsSVGTextPathElementTEXTPATH_SPACINGTYPE_EXACT(ExecState* exec, JSValue, const Identifier&)
       
   257 {
       
   258     return jsNumber(exec, static_cast<int>(2));
       
   259 }
       
   260 
       
   261 
       
   262 }
       
   263 
       
   264 #endif // ENABLE(SVG)