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