WebCore/generated/JSHTMLBaseFontElement.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 "JSHTMLBaseFontElement.h"
       
    23 
       
    24 #include "HTMLBaseFontElement.h"
       
    25 #include "HTMLNames.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(JSHTMLBaseFontElement);
       
    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 JSHTMLBaseFontElementTableValues[5] =
       
    45 {
       
    46     { "color", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBaseFontElementColor), (intptr_t)setJSHTMLBaseFontElementColor THUNK_GENERATOR(0) },
       
    47     { "face", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBaseFontElementFace), (intptr_t)setJSHTMLBaseFontElementFace THUNK_GENERATOR(0) },
       
    48     { "size", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBaseFontElementSize), (intptr_t)setJSHTMLBaseFontElementSize THUNK_GENERATOR(0) },
       
    49     { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBaseFontElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) },
       
    50     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    51 };
       
    52 
       
    53 #undef THUNK_GENERATOR
       
    54 static JSC_CONST_HASHTABLE HashTable JSHTMLBaseFontElementTable = { 9, 7, JSHTMLBaseFontElementTableValues, 0 };
       
    55 /* Hash table for constructor */
       
    56 #if ENABLE(JIT)
       
    57 #define THUNK_GENERATOR(generator) , generator
       
    58 #else
       
    59 #define THUNK_GENERATOR(generator)
       
    60 #endif
       
    61 
       
    62 static const HashTableValue JSHTMLBaseFontElementConstructorTableValues[1] =
       
    63 {
       
    64     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    65 };
       
    66 
       
    67 #undef THUNK_GENERATOR
       
    68 static JSC_CONST_HASHTABLE HashTable JSHTMLBaseFontElementConstructorTable = { 1, 0, JSHTMLBaseFontElementConstructorTableValues, 0 };
       
    69 class JSHTMLBaseFontElementConstructor : public DOMConstructorObject {
       
    70 public:
       
    71     JSHTMLBaseFontElementConstructor(JSC::ExecState*, JSDOMGlobalObject*);
       
    72 
       
    73     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
       
    74     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
       
    75     virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
       
    76     static const JSC::ClassInfo s_info;
       
    77     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
       
    78     {
       
    79         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
       
    80     }
       
    81 protected:
       
    82     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
       
    83 };
       
    84 
       
    85 const ClassInfo JSHTMLBaseFontElementConstructor::s_info = { "HTMLBaseFontElementConstructor", 0, &JSHTMLBaseFontElementConstructorTable, 0 };
       
    86 
       
    87 JSHTMLBaseFontElementConstructor::JSHTMLBaseFontElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
       
    88     : DOMConstructorObject(JSHTMLBaseFontElementConstructor::createStructure(globalObject->objectPrototype()), globalObject)
       
    89 {
       
    90     putDirect(exec->propertyNames().prototype, JSHTMLBaseFontElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
       
    91 }
       
    92 
       
    93 bool JSHTMLBaseFontElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
    94 {
       
    95     return getStaticValueSlot<JSHTMLBaseFontElementConstructor, DOMObject>(exec, &JSHTMLBaseFontElementConstructorTable, this, propertyName, slot);
       
    96 }
       
    97 
       
    98 bool JSHTMLBaseFontElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
    99 {
       
   100     return getStaticValueDescriptor<JSHTMLBaseFontElementConstructor, DOMObject>(exec, &JSHTMLBaseFontElementConstructorTable, this, propertyName, descriptor);
       
   101 }
       
   102 
       
   103 /* Hash table for prototype */
       
   104 #if ENABLE(JIT)
       
   105 #define THUNK_GENERATOR(generator) , generator
       
   106 #else
       
   107 #define THUNK_GENERATOR(generator)
       
   108 #endif
       
   109 
       
   110 static const HashTableValue JSHTMLBaseFontElementPrototypeTableValues[1] =
       
   111 {
       
   112     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
   113 };
       
   114 
       
   115 #undef THUNK_GENERATOR
       
   116 static JSC_CONST_HASHTABLE HashTable JSHTMLBaseFontElementPrototypeTable = { 1, 0, JSHTMLBaseFontElementPrototypeTableValues, 0 };
       
   117 const ClassInfo JSHTMLBaseFontElementPrototype::s_info = { "HTMLBaseFontElementPrototype", 0, &JSHTMLBaseFontElementPrototypeTable, 0 };
       
   118 
       
   119 JSObject* JSHTMLBaseFontElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
       
   120 {
       
   121     return getDOMPrototype<JSHTMLBaseFontElement>(exec, globalObject);
       
   122 }
       
   123 
       
   124 const ClassInfo JSHTMLBaseFontElement::s_info = { "HTMLBaseFontElement", &JSHTMLElement::s_info, &JSHTMLBaseFontElementTable, 0 };
       
   125 
       
   126 JSHTMLBaseFontElement::JSHTMLBaseFontElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLBaseFontElement> impl)
       
   127     : JSHTMLElement(structure, globalObject, impl)
       
   128 {
       
   129 }
       
   130 
       
   131 JSObject* JSHTMLBaseFontElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
       
   132 {
       
   133     return new (exec) JSHTMLBaseFontElementPrototype(globalObject, JSHTMLBaseFontElementPrototype::createStructure(JSHTMLElementPrototype::self(exec, globalObject)));
       
   134 }
       
   135 
       
   136 bool JSHTMLBaseFontElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   137 {
       
   138     return getStaticValueSlot<JSHTMLBaseFontElement, Base>(exec, &JSHTMLBaseFontElementTable, this, propertyName, slot);
       
   139 }
       
   140 
       
   141 bool JSHTMLBaseFontElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   142 {
       
   143     return getStaticValueDescriptor<JSHTMLBaseFontElement, Base>(exec, &JSHTMLBaseFontElementTable, this, propertyName, descriptor);
       
   144 }
       
   145 
       
   146 JSValue jsHTMLBaseFontElementColor(ExecState* exec, JSValue slotBase, const Identifier&)
       
   147 {
       
   148     JSHTMLBaseFontElement* castedThis = static_cast<JSHTMLBaseFontElement*>(asObject(slotBase));
       
   149     UNUSED_PARAM(exec);
       
   150     HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(castedThis->impl());
       
   151     JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::colorAttr));
       
   152     return result;
       
   153 }
       
   154 
       
   155 JSValue jsHTMLBaseFontElementFace(ExecState* exec, JSValue slotBase, const Identifier&)
       
   156 {
       
   157     JSHTMLBaseFontElement* castedThis = static_cast<JSHTMLBaseFontElement*>(asObject(slotBase));
       
   158     UNUSED_PARAM(exec);
       
   159     HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(castedThis->impl());
       
   160     JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::faceAttr));
       
   161     return result;
       
   162 }
       
   163 
       
   164 JSValue jsHTMLBaseFontElementSize(ExecState* exec, JSValue slotBase, const Identifier&)
       
   165 {
       
   166     JSHTMLBaseFontElement* castedThis = static_cast<JSHTMLBaseFontElement*>(asObject(slotBase));
       
   167     UNUSED_PARAM(exec);
       
   168     HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(castedThis->impl());
       
   169     JSValue result = jsNumber(exec, imp->getIntegralAttribute(WebCore::HTMLNames::sizeAttr));
       
   170     return result;
       
   171 }
       
   172 
       
   173 JSValue jsHTMLBaseFontElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
       
   174 {
       
   175     JSHTMLBaseFontElement* domObject = static_cast<JSHTMLBaseFontElement*>(asObject(slotBase));
       
   176     return JSHTMLBaseFontElement::getConstructor(exec, domObject->globalObject());
       
   177 }
       
   178 void JSHTMLBaseFontElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
       
   179 {
       
   180     lookupPut<JSHTMLBaseFontElement, Base>(exec, propertyName, value, &JSHTMLBaseFontElementTable, this, slot);
       
   181 }
       
   182 
       
   183 void setJSHTMLBaseFontElementColor(ExecState* exec, JSObject* thisObject, JSValue value)
       
   184 {
       
   185     JSHTMLBaseFontElement* castedThis = static_cast<JSHTMLBaseFontElement*>(thisObject);
       
   186     HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(castedThis->impl());
       
   187     imp->setAttribute(WebCore::HTMLNames::colorAttr, valueToStringWithNullCheck(exec, value));
       
   188 }
       
   189 
       
   190 void setJSHTMLBaseFontElementFace(ExecState* exec, JSObject* thisObject, JSValue value)
       
   191 {
       
   192     JSHTMLBaseFontElement* castedThis = static_cast<JSHTMLBaseFontElement*>(thisObject);
       
   193     HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(castedThis->impl());
       
   194     imp->setAttribute(WebCore::HTMLNames::faceAttr, valueToStringWithNullCheck(exec, value));
       
   195 }
       
   196 
       
   197 void setJSHTMLBaseFontElementSize(ExecState* exec, JSObject* thisObject, JSValue value)
       
   198 {
       
   199     JSHTMLBaseFontElement* castedThis = static_cast<JSHTMLBaseFontElement*>(thisObject);
       
   200     HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(castedThis->impl());
       
   201     imp->setIntegralAttribute(WebCore::HTMLNames::sizeAttr, value.toInt32(exec));
       
   202 }
       
   203 
       
   204 JSValue JSHTMLBaseFontElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
       
   205 {
       
   206     return getDOMConstructor<JSHTMLBaseFontElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
       
   207 }
       
   208 
       
   209 
       
   210 }