WebCore/generated/JSHTMLPreElement.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 "JSHTMLPreElement.h"
       
    23 
       
    24 #include "HTMLNames.h"
       
    25 #include "HTMLPreElement.h"
       
    26 #include <runtime/JSNumberCell.h>
       
    27 #include <wtf/GetPtr.h>
       
    28 
       
    29 using namespace JSC;
       
    30 
       
    31 namespace WebCore {
       
    32 
       
    33 ASSERT_CLASS_FITS_IN_CELL(JSHTMLPreElement);
       
    34 
       
    35 /* Hash table */
       
    36 #if ENABLE(JIT)
       
    37 #define THUNK_GENERATOR(generator) , generator
       
    38 #else
       
    39 #define THUNK_GENERATOR(generator)
       
    40 #endif
       
    41 
       
    42 static const HashTableValue JSHTMLPreElementTableValues[4] =
       
    43 {
       
    44     { "width", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLPreElementWidth), (intptr_t)setJSHTMLPreElementWidth THUNK_GENERATOR(0) },
       
    45     { "wrap", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLPreElementWrap), (intptr_t)setJSHTMLPreElementWrap THUNK_GENERATOR(0) },
       
    46     { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLPreElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) },
       
    47     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    48 };
       
    49 
       
    50 #undef THUNK_GENERATOR
       
    51 static JSC_CONST_HASHTABLE HashTable JSHTMLPreElementTable = { 9, 7, JSHTMLPreElementTableValues, 0 };
       
    52 /* Hash table for constructor */
       
    53 #if ENABLE(JIT)
       
    54 #define THUNK_GENERATOR(generator) , generator
       
    55 #else
       
    56 #define THUNK_GENERATOR(generator)
       
    57 #endif
       
    58 
       
    59 static const HashTableValue JSHTMLPreElementConstructorTableValues[1] =
       
    60 {
       
    61     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    62 };
       
    63 
       
    64 #undef THUNK_GENERATOR
       
    65 static JSC_CONST_HASHTABLE HashTable JSHTMLPreElementConstructorTable = { 1, 0, JSHTMLPreElementConstructorTableValues, 0 };
       
    66 class JSHTMLPreElementConstructor : public DOMConstructorObject {
       
    67 public:
       
    68     JSHTMLPreElementConstructor(JSC::ExecState*, JSDOMGlobalObject*);
       
    69 
       
    70     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
       
    71     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
       
    72     virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
       
    73     static const JSC::ClassInfo s_info;
       
    74     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
       
    75     {
       
    76         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
       
    77     }
       
    78 protected:
       
    79     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
       
    80 };
       
    81 
       
    82 const ClassInfo JSHTMLPreElementConstructor::s_info = { "HTMLPreElementConstructor", 0, &JSHTMLPreElementConstructorTable, 0 };
       
    83 
       
    84 JSHTMLPreElementConstructor::JSHTMLPreElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
       
    85     : DOMConstructorObject(JSHTMLPreElementConstructor::createStructure(globalObject->objectPrototype()), globalObject)
       
    86 {
       
    87     putDirect(exec->propertyNames().prototype, JSHTMLPreElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
       
    88 }
       
    89 
       
    90 bool JSHTMLPreElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
    91 {
       
    92     return getStaticValueSlot<JSHTMLPreElementConstructor, DOMObject>(exec, &JSHTMLPreElementConstructorTable, this, propertyName, slot);
       
    93 }
       
    94 
       
    95 bool JSHTMLPreElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
    96 {
       
    97     return getStaticValueDescriptor<JSHTMLPreElementConstructor, DOMObject>(exec, &JSHTMLPreElementConstructorTable, this, propertyName, descriptor);
       
    98 }
       
    99 
       
   100 /* Hash table for prototype */
       
   101 #if ENABLE(JIT)
       
   102 #define THUNK_GENERATOR(generator) , generator
       
   103 #else
       
   104 #define THUNK_GENERATOR(generator)
       
   105 #endif
       
   106 
       
   107 static const HashTableValue JSHTMLPreElementPrototypeTableValues[1] =
       
   108 {
       
   109     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
   110 };
       
   111 
       
   112 #undef THUNK_GENERATOR
       
   113 static JSC_CONST_HASHTABLE HashTable JSHTMLPreElementPrototypeTable = { 1, 0, JSHTMLPreElementPrototypeTableValues, 0 };
       
   114 const ClassInfo JSHTMLPreElementPrototype::s_info = { "HTMLPreElementPrototype", 0, &JSHTMLPreElementPrototypeTable, 0 };
       
   115 
       
   116 JSObject* JSHTMLPreElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
       
   117 {
       
   118     return getDOMPrototype<JSHTMLPreElement>(exec, globalObject);
       
   119 }
       
   120 
       
   121 const ClassInfo JSHTMLPreElement::s_info = { "HTMLPreElement", &JSHTMLElement::s_info, &JSHTMLPreElementTable, 0 };
       
   122 
       
   123 JSHTMLPreElement::JSHTMLPreElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLPreElement> impl)
       
   124     : JSHTMLElement(structure, globalObject, impl)
       
   125 {
       
   126 }
       
   127 
       
   128 JSObject* JSHTMLPreElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
       
   129 {
       
   130     return new (exec) JSHTMLPreElementPrototype(globalObject, JSHTMLPreElementPrototype::createStructure(JSHTMLElementPrototype::self(exec, globalObject)));
       
   131 }
       
   132 
       
   133 bool JSHTMLPreElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   134 {
       
   135     return getStaticValueSlot<JSHTMLPreElement, Base>(exec, &JSHTMLPreElementTable, this, propertyName, slot);
       
   136 }
       
   137 
       
   138 bool JSHTMLPreElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   139 {
       
   140     return getStaticValueDescriptor<JSHTMLPreElement, Base>(exec, &JSHTMLPreElementTable, this, propertyName, descriptor);
       
   141 }
       
   142 
       
   143 JSValue jsHTMLPreElementWidth(ExecState* exec, JSValue slotBase, const Identifier&)
       
   144 {
       
   145     JSHTMLPreElement* castedThis = static_cast<JSHTMLPreElement*>(asObject(slotBase));
       
   146     UNUSED_PARAM(exec);
       
   147     HTMLPreElement* imp = static_cast<HTMLPreElement*>(castedThis->impl());
       
   148     JSValue result = jsNumber(exec, imp->getIntegralAttribute(WebCore::HTMLNames::widthAttr));
       
   149     return result;
       
   150 }
       
   151 
       
   152 JSValue jsHTMLPreElementWrap(ExecState* exec, JSValue slotBase, const Identifier&)
       
   153 {
       
   154     JSHTMLPreElement* castedThis = static_cast<JSHTMLPreElement*>(asObject(slotBase));
       
   155     UNUSED_PARAM(exec);
       
   156     HTMLPreElement* imp = static_cast<HTMLPreElement*>(castedThis->impl());
       
   157     JSValue result = jsBoolean(imp->hasAttribute(WebCore::HTMLNames::wrapAttr));
       
   158     return result;
       
   159 }
       
   160 
       
   161 JSValue jsHTMLPreElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
       
   162 {
       
   163     JSHTMLPreElement* domObject = static_cast<JSHTMLPreElement*>(asObject(slotBase));
       
   164     return JSHTMLPreElement::getConstructor(exec, domObject->globalObject());
       
   165 }
       
   166 void JSHTMLPreElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
       
   167 {
       
   168     lookupPut<JSHTMLPreElement, Base>(exec, propertyName, value, &JSHTMLPreElementTable, this, slot);
       
   169 }
       
   170 
       
   171 void setJSHTMLPreElementWidth(ExecState* exec, JSObject* thisObject, JSValue value)
       
   172 {
       
   173     JSHTMLPreElement* castedThis = static_cast<JSHTMLPreElement*>(thisObject);
       
   174     HTMLPreElement* imp = static_cast<HTMLPreElement*>(castedThis->impl());
       
   175     imp->setIntegralAttribute(WebCore::HTMLNames::widthAttr, value.toInt32(exec));
       
   176 }
       
   177 
       
   178 void setJSHTMLPreElementWrap(ExecState* exec, JSObject* thisObject, JSValue value)
       
   179 {
       
   180     JSHTMLPreElement* castedThis = static_cast<JSHTMLPreElement*>(thisObject);
       
   181     HTMLPreElement* imp = static_cast<HTMLPreElement*>(castedThis->impl());
       
   182     imp->setBooleanAttribute(WebCore::HTMLNames::wrapAttr, value.toBoolean(exec));
       
   183 }
       
   184 
       
   185 JSValue JSHTMLPreElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
       
   186 {
       
   187     return getDOMConstructor<JSHTMLPreElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
       
   188 }
       
   189 
       
   190 
       
   191 }