WebCore/generated/JSHTMLTableColElement.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 #include "JSHTMLTableColElement.h"
       
    23 
       
    24 #include "HTMLNames.h"
       
    25 #include "HTMLTableColElement.h"
       
    26 #include "KURL.h"
       
    27 #include <runtime/JSNumberCell.h>
       
    28 #include <runtime/JSString.h>
       
    29 #include <wtf/GetPtr.h>
       
    30 
       
    31 using namespace JSC;
       
    32 
       
    33 namespace WebCore {
       
    34 
       
    35 ASSERT_CLASS_FITS_IN_CELL(JSHTMLTableColElement);
       
    36 
       
    37 /* Hash table */
       
    38 #if ENABLE(JIT)
       
    39 #define THUNK_GENERATOR(generator) , generator
       
    40 #else
       
    41 #define THUNK_GENERATOR(generator)
       
    42 #endif
       
    43 
       
    44 static const HashTableValue JSHTMLTableColElementTableValues[8] =
       
    45 {
       
    46     { "align", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableColElementAlign), (intptr_t)setJSHTMLTableColElementAlign THUNK_GENERATOR(0) },
       
    47     { "ch", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableColElementCh), (intptr_t)setJSHTMLTableColElementCh THUNK_GENERATOR(0) },
       
    48     { "chOff", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableColElementChOff), (intptr_t)setJSHTMLTableColElementChOff THUNK_GENERATOR(0) },
       
    49     { "span", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableColElementSpan), (intptr_t)setJSHTMLTableColElementSpan THUNK_GENERATOR(0) },
       
    50     { "vAlign", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableColElementVAlign), (intptr_t)setJSHTMLTableColElementVAlign THUNK_GENERATOR(0) },
       
    51     { "width", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableColElementWidth), (intptr_t)setJSHTMLTableColElementWidth THUNK_GENERATOR(0) },
       
    52     { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableColElementConstructor), (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 JSHTMLTableColElementTable = { 17, 15, JSHTMLTableColElementTableValues, 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 JSHTMLTableColElementConstructorTableValues[1] =
       
    66 {
       
    67     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    68 };
       
    69 
       
    70 #undef THUNK_GENERATOR
       
    71 static JSC_CONST_HASHTABLE HashTable JSHTMLTableColElementConstructorTable = { 1, 0, JSHTMLTableColElementConstructorTableValues, 0 };
       
    72 class JSHTMLTableColElementConstructor : public DOMConstructorObject {
       
    73 public:
       
    74     JSHTMLTableColElementConstructor(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 JSHTMLTableColElementConstructor::s_info = { "HTMLTableColElementConstructor", 0, &JSHTMLTableColElementConstructorTable, 0 };
       
    89 
       
    90 JSHTMLTableColElementConstructor::JSHTMLTableColElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
       
    91     : DOMConstructorObject(JSHTMLTableColElementConstructor::createStructure(globalObject->objectPrototype()), globalObject)
       
    92 {
       
    93     putDirect(exec->propertyNames().prototype, JSHTMLTableColElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
       
    94 }
       
    95 
       
    96 bool JSHTMLTableColElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
    97 {
       
    98     return getStaticValueSlot<JSHTMLTableColElementConstructor, DOMObject>(exec, &JSHTMLTableColElementConstructorTable, this, propertyName, slot);
       
    99 }
       
   100 
       
   101 bool JSHTMLTableColElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   102 {
       
   103     return getStaticValueDescriptor<JSHTMLTableColElementConstructor, DOMObject>(exec, &JSHTMLTableColElementConstructorTable, 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 JSHTMLTableColElementPrototypeTableValues[1] =
       
   114 {
       
   115     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
   116 };
       
   117 
       
   118 #undef THUNK_GENERATOR
       
   119 static JSC_CONST_HASHTABLE HashTable JSHTMLTableColElementPrototypeTable = { 1, 0, JSHTMLTableColElementPrototypeTableValues, 0 };
       
   120 const ClassInfo JSHTMLTableColElementPrototype::s_info = { "HTMLTableColElementPrototype", 0, &JSHTMLTableColElementPrototypeTable, 0 };
       
   121 
       
   122 JSObject* JSHTMLTableColElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
       
   123 {
       
   124     return getDOMPrototype<JSHTMLTableColElement>(exec, globalObject);
       
   125 }
       
   126 
       
   127 const ClassInfo JSHTMLTableColElement::s_info = { "HTMLTableColElement", &JSHTMLElement::s_info, &JSHTMLTableColElementTable, 0 };
       
   128 
       
   129 JSHTMLTableColElement::JSHTMLTableColElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLTableColElement> impl)
       
   130     : JSHTMLElement(structure, globalObject, impl)
       
   131 {
       
   132 }
       
   133 
       
   134 JSObject* JSHTMLTableColElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
       
   135 {
       
   136     return new (exec) JSHTMLTableColElementPrototype(globalObject, JSHTMLTableColElementPrototype::createStructure(JSHTMLElementPrototype::self(exec, globalObject)));
       
   137 }
       
   138 
       
   139 bool JSHTMLTableColElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   140 {
       
   141     return getStaticValueSlot<JSHTMLTableColElement, Base>(exec, &JSHTMLTableColElementTable, this, propertyName, slot);
       
   142 }
       
   143 
       
   144 bool JSHTMLTableColElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   145 {
       
   146     return getStaticValueDescriptor<JSHTMLTableColElement, Base>(exec, &JSHTMLTableColElementTable, this, propertyName, descriptor);
       
   147 }
       
   148 
       
   149 JSValue jsHTMLTableColElementAlign(ExecState* exec, JSValue slotBase, const Identifier&)
       
   150 {
       
   151     JSHTMLTableColElement* castedThis = static_cast<JSHTMLTableColElement*>(asObject(slotBase));
       
   152     UNUSED_PARAM(exec);
       
   153     HTMLTableColElement* imp = static_cast<HTMLTableColElement*>(castedThis->impl());
       
   154     JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::alignAttr));
       
   155     return result;
       
   156 }
       
   157 
       
   158 JSValue jsHTMLTableColElementCh(ExecState* exec, JSValue slotBase, const Identifier&)
       
   159 {
       
   160     JSHTMLTableColElement* castedThis = static_cast<JSHTMLTableColElement*>(asObject(slotBase));
       
   161     UNUSED_PARAM(exec);
       
   162     HTMLTableColElement* imp = static_cast<HTMLTableColElement*>(castedThis->impl());
       
   163     JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::charAttr));
       
   164     return result;
       
   165 }
       
   166 
       
   167 JSValue jsHTMLTableColElementChOff(ExecState* exec, JSValue slotBase, const Identifier&)
       
   168 {
       
   169     JSHTMLTableColElement* castedThis = static_cast<JSHTMLTableColElement*>(asObject(slotBase));
       
   170     UNUSED_PARAM(exec);
       
   171     HTMLTableColElement* imp = static_cast<HTMLTableColElement*>(castedThis->impl());
       
   172     JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::charoffAttr));
       
   173     return result;
       
   174 }
       
   175 
       
   176 JSValue jsHTMLTableColElementSpan(ExecState* exec, JSValue slotBase, const Identifier&)
       
   177 {
       
   178     JSHTMLTableColElement* castedThis = static_cast<JSHTMLTableColElement*>(asObject(slotBase));
       
   179     UNUSED_PARAM(exec);
       
   180     HTMLTableColElement* imp = static_cast<HTMLTableColElement*>(castedThis->impl());
       
   181     JSValue result = jsNumber(exec, imp->span());
       
   182     return result;
       
   183 }
       
   184 
       
   185 JSValue jsHTMLTableColElementVAlign(ExecState* exec, JSValue slotBase, const Identifier&)
       
   186 {
       
   187     JSHTMLTableColElement* castedThis = static_cast<JSHTMLTableColElement*>(asObject(slotBase));
       
   188     UNUSED_PARAM(exec);
       
   189     HTMLTableColElement* imp = static_cast<HTMLTableColElement*>(castedThis->impl());
       
   190     JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::valignAttr));
       
   191     return result;
       
   192 }
       
   193 
       
   194 JSValue jsHTMLTableColElementWidth(ExecState* exec, JSValue slotBase, const Identifier&)
       
   195 {
       
   196     JSHTMLTableColElement* castedThis = static_cast<JSHTMLTableColElement*>(asObject(slotBase));
       
   197     UNUSED_PARAM(exec);
       
   198     HTMLTableColElement* imp = static_cast<HTMLTableColElement*>(castedThis->impl());
       
   199     JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::widthAttr));
       
   200     return result;
       
   201 }
       
   202 
       
   203 JSValue jsHTMLTableColElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
       
   204 {
       
   205     JSHTMLTableColElement* domObject = static_cast<JSHTMLTableColElement*>(asObject(slotBase));
       
   206     return JSHTMLTableColElement::getConstructor(exec, domObject->globalObject());
       
   207 }
       
   208 void JSHTMLTableColElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
       
   209 {
       
   210     lookupPut<JSHTMLTableColElement, Base>(exec, propertyName, value, &JSHTMLTableColElementTable, this, slot);
       
   211 }
       
   212 
       
   213 void setJSHTMLTableColElementAlign(ExecState* exec, JSObject* thisObject, JSValue value)
       
   214 {
       
   215     JSHTMLTableColElement* castedThis = static_cast<JSHTMLTableColElement*>(thisObject);
       
   216     HTMLTableColElement* imp = static_cast<HTMLTableColElement*>(castedThis->impl());
       
   217     imp->setAttribute(WebCore::HTMLNames::alignAttr, valueToStringWithNullCheck(exec, value));
       
   218 }
       
   219 
       
   220 void setJSHTMLTableColElementCh(ExecState* exec, JSObject* thisObject, JSValue value)
       
   221 {
       
   222     JSHTMLTableColElement* castedThis = static_cast<JSHTMLTableColElement*>(thisObject);
       
   223     HTMLTableColElement* imp = static_cast<HTMLTableColElement*>(castedThis->impl());
       
   224     imp->setAttribute(WebCore::HTMLNames::charAttr, valueToStringWithNullCheck(exec, value));
       
   225 }
       
   226 
       
   227 void setJSHTMLTableColElementChOff(ExecState* exec, JSObject* thisObject, JSValue value)
       
   228 {
       
   229     JSHTMLTableColElement* castedThis = static_cast<JSHTMLTableColElement*>(thisObject);
       
   230     HTMLTableColElement* imp = static_cast<HTMLTableColElement*>(castedThis->impl());
       
   231     imp->setAttribute(WebCore::HTMLNames::charoffAttr, valueToStringWithNullCheck(exec, value));
       
   232 }
       
   233 
       
   234 void setJSHTMLTableColElementSpan(ExecState* exec, JSObject* thisObject, JSValue value)
       
   235 {
       
   236     JSHTMLTableColElement* castedThis = static_cast<JSHTMLTableColElement*>(thisObject);
       
   237     HTMLTableColElement* imp = static_cast<HTMLTableColElement*>(castedThis->impl());
       
   238     imp->setSpan(value.toInt32(exec));
       
   239 }
       
   240 
       
   241 void setJSHTMLTableColElementVAlign(ExecState* exec, JSObject* thisObject, JSValue value)
       
   242 {
       
   243     JSHTMLTableColElement* castedThis = static_cast<JSHTMLTableColElement*>(thisObject);
       
   244     HTMLTableColElement* imp = static_cast<HTMLTableColElement*>(castedThis->impl());
       
   245     imp->setAttribute(WebCore::HTMLNames::valignAttr, valueToStringWithNullCheck(exec, value));
       
   246 }
       
   247 
       
   248 void setJSHTMLTableColElementWidth(ExecState* exec, JSObject* thisObject, JSValue value)
       
   249 {
       
   250     JSHTMLTableColElement* castedThis = static_cast<JSHTMLTableColElement*>(thisObject);
       
   251     HTMLTableColElement* imp = static_cast<HTMLTableColElement*>(castedThis->impl());
       
   252     imp->setAttribute(WebCore::HTMLNames::widthAttr, valueToStringWithNullCheck(exec, value));
       
   253 }
       
   254 
       
   255 JSValue JSHTMLTableColElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
       
   256 {
       
   257     return getDOMConstructor<JSHTMLTableColElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
       
   258 }
       
   259 
       
   260 
       
   261 }