WebCore/generated/JSSVGStyleElement.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 "JSSVGStyleElement.h"
       
    26 
       
    27 #include "KURL.h"
       
    28 #include "SVGStyleElement.h"
       
    29 #include <runtime/JSString.h>
       
    30 #include <wtf/GetPtr.h>
       
    31 
       
    32 using namespace JSC;
       
    33 
       
    34 namespace WebCore {
       
    35 
       
    36 ASSERT_CLASS_FITS_IN_CELL(JSSVGStyleElement);
       
    37 
       
    38 /* Hash table */
       
    39 #if ENABLE(JIT)
       
    40 #define THUNK_GENERATOR(generator) , generator
       
    41 #else
       
    42 #define THUNK_GENERATOR(generator)
       
    43 #endif
       
    44 
       
    45 static const HashTableValue JSSVGStyleElementTableValues[7] =
       
    46 {
       
    47     { "type", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGStyleElementType), (intptr_t)setJSSVGStyleElementType THUNK_GENERATOR(0) },
       
    48     { "media", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGStyleElementMedia), (intptr_t)setJSSVGStyleElementMedia THUNK_GENERATOR(0) },
       
    49     { "title", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGStyleElementTitle), (intptr_t)setJSSVGStyleElementTitle THUNK_GENERATOR(0) },
       
    50     { "xmllang", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGStyleElementXmllang), (intptr_t)setJSSVGStyleElementXmllang THUNK_GENERATOR(0) },
       
    51     { "xmlspace", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGStyleElementXmlspace), (intptr_t)setJSSVGStyleElementXmlspace THUNK_GENERATOR(0) },
       
    52     { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGStyleElementConstructor), (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 JSSVGStyleElementTable = { 17, 15, JSSVGStyleElementTableValues, 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 JSSVGStyleElementConstructorTableValues[1] =
       
    66 {
       
    67     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    68 };
       
    69 
       
    70 #undef THUNK_GENERATOR
       
    71 static JSC_CONST_HASHTABLE HashTable JSSVGStyleElementConstructorTable = { 1, 0, JSSVGStyleElementConstructorTableValues, 0 };
       
    72 class JSSVGStyleElementConstructor : public DOMConstructorObject {
       
    73 public:
       
    74     JSSVGStyleElementConstructor(JSC::ExecState*, JSDOMGlobalObject*);
       
    75 
       
    76     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
       
    77     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
       
    78     virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
       
    79     static const JSC::ClassInfo s_info;
       
    80     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
       
    81     {
       
    82         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
       
    83     }
       
    84 protected:
       
    85     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
       
    86 };
       
    87 
       
    88 const ClassInfo JSSVGStyleElementConstructor::s_info = { "SVGStyleElementConstructor", 0, &JSSVGStyleElementConstructorTable, 0 };
       
    89 
       
    90 JSSVGStyleElementConstructor::JSSVGStyleElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
       
    91     : DOMConstructorObject(JSSVGStyleElementConstructor::createStructure(globalObject->objectPrototype()), globalObject)
       
    92 {
       
    93     putDirect(exec->propertyNames().prototype, JSSVGStyleElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
       
    94 }
       
    95 
       
    96 bool JSSVGStyleElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
    97 {
       
    98     return getStaticValueSlot<JSSVGStyleElementConstructor, DOMObject>(exec, &JSSVGStyleElementConstructorTable, this, propertyName, slot);
       
    99 }
       
   100 
       
   101 bool JSSVGStyleElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   102 {
       
   103     return getStaticValueDescriptor<JSSVGStyleElementConstructor, DOMObject>(exec, &JSSVGStyleElementConstructorTable, this, propertyName, descriptor);
       
   104 }
       
   105 
       
   106 /* Hash table for prototype */
       
   107 #if ENABLE(JIT)
       
   108 #define THUNK_GENERATOR(generator) , generator
       
   109 #else
       
   110 #define THUNK_GENERATOR(generator)
       
   111 #endif
       
   112 
       
   113 static const HashTableValue JSSVGStyleElementPrototypeTableValues[1] =
       
   114 {
       
   115     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
   116 };
       
   117 
       
   118 #undef THUNK_GENERATOR
       
   119 static JSC_CONST_HASHTABLE HashTable JSSVGStyleElementPrototypeTable = { 1, 0, JSSVGStyleElementPrototypeTableValues, 0 };
       
   120 const ClassInfo JSSVGStyleElementPrototype::s_info = { "SVGStyleElementPrototype", 0, &JSSVGStyleElementPrototypeTable, 0 };
       
   121 
       
   122 JSObject* JSSVGStyleElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
       
   123 {
       
   124     return getDOMPrototype<JSSVGStyleElement>(exec, globalObject);
       
   125 }
       
   126 
       
   127 const ClassInfo JSSVGStyleElement::s_info = { "SVGStyleElement", &JSSVGElement::s_info, &JSSVGStyleElementTable, 0 };
       
   128 
       
   129 JSSVGStyleElement::JSSVGStyleElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGStyleElement> impl)
       
   130     : JSSVGElement(structure, globalObject, impl)
       
   131 {
       
   132 }
       
   133 
       
   134 JSObject* JSSVGStyleElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
       
   135 {
       
   136     return new (exec) JSSVGStyleElementPrototype(globalObject, JSSVGStyleElementPrototype::createStructure(JSSVGElementPrototype::self(exec, globalObject)));
       
   137 }
       
   138 
       
   139 bool JSSVGStyleElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   140 {
       
   141     return getStaticValueSlot<JSSVGStyleElement, Base>(exec, &JSSVGStyleElementTable, this, propertyName, slot);
       
   142 }
       
   143 
       
   144 bool JSSVGStyleElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   145 {
       
   146     return getStaticValueDescriptor<JSSVGStyleElement, Base>(exec, &JSSVGStyleElementTable, this, propertyName, descriptor);
       
   147 }
       
   148 
       
   149 JSValue jsSVGStyleElementType(ExecState* exec, JSValue slotBase, const Identifier&)
       
   150 {
       
   151     JSSVGStyleElement* castedThis = static_cast<JSSVGStyleElement*>(asObject(slotBase));
       
   152     UNUSED_PARAM(exec);
       
   153     SVGStyleElement* imp = static_cast<SVGStyleElement*>(castedThis->impl());
       
   154     JSValue result = jsString(exec, imp->type());
       
   155     return result;
       
   156 }
       
   157 
       
   158 JSValue jsSVGStyleElementMedia(ExecState* exec, JSValue slotBase, const Identifier&)
       
   159 {
       
   160     JSSVGStyleElement* castedThis = static_cast<JSSVGStyleElement*>(asObject(slotBase));
       
   161     UNUSED_PARAM(exec);
       
   162     SVGStyleElement* imp = static_cast<SVGStyleElement*>(castedThis->impl());
       
   163     JSValue result = jsString(exec, imp->media());
       
   164     return result;
       
   165 }
       
   166 
       
   167 JSValue jsSVGStyleElementTitle(ExecState* exec, JSValue slotBase, const Identifier&)
       
   168 {
       
   169     JSSVGStyleElement* castedThis = static_cast<JSSVGStyleElement*>(asObject(slotBase));
       
   170     UNUSED_PARAM(exec);
       
   171     SVGStyleElement* imp = static_cast<SVGStyleElement*>(castedThis->impl());
       
   172     JSValue result = jsString(exec, imp->title());
       
   173     return result;
       
   174 }
       
   175 
       
   176 JSValue jsSVGStyleElementXmllang(ExecState* exec, JSValue slotBase, const Identifier&)
       
   177 {
       
   178     JSSVGStyleElement* castedThis = static_cast<JSSVGStyleElement*>(asObject(slotBase));
       
   179     UNUSED_PARAM(exec);
       
   180     SVGStyleElement* imp = static_cast<SVGStyleElement*>(castedThis->impl());
       
   181     JSValue result = jsString(exec, imp->xmllang());
       
   182     return result;
       
   183 }
       
   184 
       
   185 JSValue jsSVGStyleElementXmlspace(ExecState* exec, JSValue slotBase, const Identifier&)
       
   186 {
       
   187     JSSVGStyleElement* castedThis = static_cast<JSSVGStyleElement*>(asObject(slotBase));
       
   188     UNUSED_PARAM(exec);
       
   189     SVGStyleElement* imp = static_cast<SVGStyleElement*>(castedThis->impl());
       
   190     JSValue result = jsString(exec, imp->xmlspace());
       
   191     return result;
       
   192 }
       
   193 
       
   194 JSValue jsSVGStyleElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
       
   195 {
       
   196     JSSVGStyleElement* domObject = static_cast<JSSVGStyleElement*>(asObject(slotBase));
       
   197     return JSSVGStyleElement::getConstructor(exec, domObject->globalObject());
       
   198 }
       
   199 void JSSVGStyleElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
       
   200 {
       
   201     lookupPut<JSSVGStyleElement, Base>(exec, propertyName, value, &JSSVGStyleElementTable, this, slot);
       
   202 }
       
   203 
       
   204 void setJSSVGStyleElementType(ExecState* exec, JSObject* thisObject, JSValue value)
       
   205 {
       
   206     JSSVGStyleElement* castedThis = static_cast<JSSVGStyleElement*>(thisObject);
       
   207     SVGStyleElement* imp = static_cast<SVGStyleElement*>(castedThis->impl());
       
   208     ExceptionCode ec = 0;
       
   209     imp->setType(ustringToString(value.toString(exec)), ec);
       
   210     setDOMException(exec, ec);
       
   211 }
       
   212 
       
   213 void setJSSVGStyleElementMedia(ExecState* exec, JSObject* thisObject, JSValue value)
       
   214 {
       
   215     JSSVGStyleElement* castedThis = static_cast<JSSVGStyleElement*>(thisObject);
       
   216     SVGStyleElement* imp = static_cast<SVGStyleElement*>(castedThis->impl());
       
   217     ExceptionCode ec = 0;
       
   218     imp->setMedia(ustringToString(value.toString(exec)), ec);
       
   219     setDOMException(exec, ec);
       
   220 }
       
   221 
       
   222 void setJSSVGStyleElementTitle(ExecState* exec, JSObject* thisObject, JSValue value)
       
   223 {
       
   224     JSSVGStyleElement* castedThis = static_cast<JSSVGStyleElement*>(thisObject);
       
   225     SVGStyleElement* imp = static_cast<SVGStyleElement*>(castedThis->impl());
       
   226     ExceptionCode ec = 0;
       
   227     imp->setTitle(ustringToString(value.toString(exec)), ec);
       
   228     setDOMException(exec, ec);
       
   229 }
       
   230 
       
   231 void setJSSVGStyleElementXmllang(ExecState* exec, JSObject* thisObject, JSValue value)
       
   232 {
       
   233     JSSVGStyleElement* castedThis = static_cast<JSSVGStyleElement*>(thisObject);
       
   234     SVGStyleElement* imp = static_cast<SVGStyleElement*>(castedThis->impl());
       
   235     imp->setXmllang(ustringToString(value.toString(exec)));
       
   236 }
       
   237 
       
   238 void setJSSVGStyleElementXmlspace(ExecState* exec, JSObject* thisObject, JSValue value)
       
   239 {
       
   240     JSSVGStyleElement* castedThis = static_cast<JSSVGStyleElement*>(thisObject);
       
   241     SVGStyleElement* imp = static_cast<SVGStyleElement*>(castedThis->impl());
       
   242     imp->setXmlspace(ustringToString(value.toString(exec)));
       
   243 }
       
   244 
       
   245 JSValue JSSVGStyleElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
       
   246 {
       
   247     return getDOMConstructor<JSSVGStyleElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
       
   248 }
       
   249 
       
   250 
       
   251 }
       
   252 
       
   253 #endif // ENABLE(SVG)