WebCore/generated/JSHTMLLabelElement.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 "JSHTMLLabelElement.h"
       
    23 
       
    24 #include "HTMLElement.h"
       
    25 #include "HTMLFormElement.h"
       
    26 #include "HTMLLabelElement.h"
       
    27 #include "HTMLNames.h"
       
    28 #include "JSHTMLElement.h"
       
    29 #include "JSHTMLFormElement.h"
       
    30 #include "KURL.h"
       
    31 #include <runtime/JSString.h>
       
    32 #include <wtf/GetPtr.h>
       
    33 
       
    34 using namespace JSC;
       
    35 
       
    36 namespace WebCore {
       
    37 
       
    38 ASSERT_CLASS_FITS_IN_CELL(JSHTMLLabelElement);
       
    39 
       
    40 /* Hash table */
       
    41 #if ENABLE(JIT)
       
    42 #define THUNK_GENERATOR(generator) , generator
       
    43 #else
       
    44 #define THUNK_GENERATOR(generator)
       
    45 #endif
       
    46 
       
    47 static const HashTableValue JSHTMLLabelElementTableValues[6] =
       
    48 {
       
    49     { "form", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLabelElementForm), (intptr_t)0 THUNK_GENERATOR(0) },
       
    50     { "accessKey", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLabelElementAccessKey), (intptr_t)setJSHTMLLabelElementAccessKey THUNK_GENERATOR(0) },
       
    51     { "htmlFor", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLabelElementHtmlFor), (intptr_t)setJSHTMLLabelElementHtmlFor THUNK_GENERATOR(0) },
       
    52     { "control", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLabelElementControl), (intptr_t)0 THUNK_GENERATOR(0) },
       
    53     { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLabelElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) },
       
    54     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    55 };
       
    56 
       
    57 #undef THUNK_GENERATOR
       
    58 static JSC_CONST_HASHTABLE HashTable JSHTMLLabelElementTable = { 18, 15, JSHTMLLabelElementTableValues, 0 };
       
    59 /* Hash table for constructor */
       
    60 #if ENABLE(JIT)
       
    61 #define THUNK_GENERATOR(generator) , generator
       
    62 #else
       
    63 #define THUNK_GENERATOR(generator)
       
    64 #endif
       
    65 
       
    66 static const HashTableValue JSHTMLLabelElementConstructorTableValues[1] =
       
    67 {
       
    68     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    69 };
       
    70 
       
    71 #undef THUNK_GENERATOR
       
    72 static JSC_CONST_HASHTABLE HashTable JSHTMLLabelElementConstructorTable = { 1, 0, JSHTMLLabelElementConstructorTableValues, 0 };
       
    73 class JSHTMLLabelElementConstructor : public DOMConstructorObject {
       
    74 public:
       
    75     JSHTMLLabelElementConstructor(JSC::ExecState*, JSDOMGlobalObject*);
       
    76 
       
    77     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
       
    78     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
       
    79     virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
       
    80     static const JSC::ClassInfo s_info;
       
    81     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
       
    82     {
       
    83         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
       
    84     }
       
    85 protected:
       
    86     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
       
    87 };
       
    88 
       
    89 const ClassInfo JSHTMLLabelElementConstructor::s_info = { "HTMLLabelElementConstructor", 0, &JSHTMLLabelElementConstructorTable, 0 };
       
    90 
       
    91 JSHTMLLabelElementConstructor::JSHTMLLabelElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
       
    92     : DOMConstructorObject(JSHTMLLabelElementConstructor::createStructure(globalObject->objectPrototype()), globalObject)
       
    93 {
       
    94     putDirect(exec->propertyNames().prototype, JSHTMLLabelElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
       
    95 }
       
    96 
       
    97 bool JSHTMLLabelElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
    98 {
       
    99     return getStaticValueSlot<JSHTMLLabelElementConstructor, DOMObject>(exec, &JSHTMLLabelElementConstructorTable, this, propertyName, slot);
       
   100 }
       
   101 
       
   102 bool JSHTMLLabelElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   103 {
       
   104     return getStaticValueDescriptor<JSHTMLLabelElementConstructor, DOMObject>(exec, &JSHTMLLabelElementConstructorTable, this, propertyName, descriptor);
       
   105 }
       
   106 
       
   107 /* Hash table for prototype */
       
   108 #if ENABLE(JIT)
       
   109 #define THUNK_GENERATOR(generator) , generator
       
   110 #else
       
   111 #define THUNK_GENERATOR(generator)
       
   112 #endif
       
   113 
       
   114 static const HashTableValue JSHTMLLabelElementPrototypeTableValues[1] =
       
   115 {
       
   116     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
   117 };
       
   118 
       
   119 #undef THUNK_GENERATOR
       
   120 static JSC_CONST_HASHTABLE HashTable JSHTMLLabelElementPrototypeTable = { 1, 0, JSHTMLLabelElementPrototypeTableValues, 0 };
       
   121 const ClassInfo JSHTMLLabelElementPrototype::s_info = { "HTMLLabelElementPrototype", 0, &JSHTMLLabelElementPrototypeTable, 0 };
       
   122 
       
   123 JSObject* JSHTMLLabelElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
       
   124 {
       
   125     return getDOMPrototype<JSHTMLLabelElement>(exec, globalObject);
       
   126 }
       
   127 
       
   128 const ClassInfo JSHTMLLabelElement::s_info = { "HTMLLabelElement", &JSHTMLElement::s_info, &JSHTMLLabelElementTable, 0 };
       
   129 
       
   130 JSHTMLLabelElement::JSHTMLLabelElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLLabelElement> impl)
       
   131     : JSHTMLElement(structure, globalObject, impl)
       
   132 {
       
   133 }
       
   134 
       
   135 JSObject* JSHTMLLabelElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
       
   136 {
       
   137     return new (exec) JSHTMLLabelElementPrototype(globalObject, JSHTMLLabelElementPrototype::createStructure(JSHTMLElementPrototype::self(exec, globalObject)));
       
   138 }
       
   139 
       
   140 bool JSHTMLLabelElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   141 {
       
   142     return getStaticValueSlot<JSHTMLLabelElement, Base>(exec, &JSHTMLLabelElementTable, this, propertyName, slot);
       
   143 }
       
   144 
       
   145 bool JSHTMLLabelElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   146 {
       
   147     return getStaticValueDescriptor<JSHTMLLabelElement, Base>(exec, &JSHTMLLabelElementTable, this, propertyName, descriptor);
       
   148 }
       
   149 
       
   150 JSValue jsHTMLLabelElementForm(ExecState* exec, JSValue slotBase, const Identifier&)
       
   151 {
       
   152     JSHTMLLabelElement* castedThis = static_cast<JSHTMLLabelElement*>(asObject(slotBase));
       
   153     UNUSED_PARAM(exec);
       
   154     HTMLLabelElement* imp = static_cast<HTMLLabelElement*>(castedThis->impl());
       
   155     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->form()));
       
   156     return result;
       
   157 }
       
   158 
       
   159 JSValue jsHTMLLabelElementAccessKey(ExecState* exec, JSValue slotBase, const Identifier&)
       
   160 {
       
   161     JSHTMLLabelElement* castedThis = static_cast<JSHTMLLabelElement*>(asObject(slotBase));
       
   162     UNUSED_PARAM(exec);
       
   163     HTMLLabelElement* imp = static_cast<HTMLLabelElement*>(castedThis->impl());
       
   164     JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::accesskeyAttr));
       
   165     return result;
       
   166 }
       
   167 
       
   168 JSValue jsHTMLLabelElementHtmlFor(ExecState* exec, JSValue slotBase, const Identifier&)
       
   169 {
       
   170     JSHTMLLabelElement* castedThis = static_cast<JSHTMLLabelElement*>(asObject(slotBase));
       
   171     UNUSED_PARAM(exec);
       
   172     HTMLLabelElement* imp = static_cast<HTMLLabelElement*>(castedThis->impl());
       
   173     JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::forAttr));
       
   174     return result;
       
   175 }
       
   176 
       
   177 JSValue jsHTMLLabelElementControl(ExecState* exec, JSValue slotBase, const Identifier&)
       
   178 {
       
   179     JSHTMLLabelElement* castedThis = static_cast<JSHTMLLabelElement*>(asObject(slotBase));
       
   180     UNUSED_PARAM(exec);
       
   181     HTMLLabelElement* imp = static_cast<HTMLLabelElement*>(castedThis->impl());
       
   182     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->control()));
       
   183     return result;
       
   184 }
       
   185 
       
   186 JSValue jsHTMLLabelElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
       
   187 {
       
   188     JSHTMLLabelElement* domObject = static_cast<JSHTMLLabelElement*>(asObject(slotBase));
       
   189     return JSHTMLLabelElement::getConstructor(exec, domObject->globalObject());
       
   190 }
       
   191 void JSHTMLLabelElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
       
   192 {
       
   193     lookupPut<JSHTMLLabelElement, Base>(exec, propertyName, value, &JSHTMLLabelElementTable, this, slot);
       
   194 }
       
   195 
       
   196 void setJSHTMLLabelElementAccessKey(ExecState* exec, JSObject* thisObject, JSValue value)
       
   197 {
       
   198     JSHTMLLabelElement* castedThis = static_cast<JSHTMLLabelElement*>(thisObject);
       
   199     HTMLLabelElement* imp = static_cast<HTMLLabelElement*>(castedThis->impl());
       
   200     imp->setAttribute(WebCore::HTMLNames::accesskeyAttr, valueToStringWithNullCheck(exec, value));
       
   201 }
       
   202 
       
   203 void setJSHTMLLabelElementHtmlFor(ExecState* exec, JSObject* thisObject, JSValue value)
       
   204 {
       
   205     JSHTMLLabelElement* castedThis = static_cast<JSHTMLLabelElement*>(thisObject);
       
   206     HTMLLabelElement* imp = static_cast<HTMLLabelElement*>(castedThis->impl());
       
   207     imp->setAttribute(WebCore::HTMLNames::forAttr, valueToStringWithNullCheck(exec, value));
       
   208 }
       
   209 
       
   210 JSValue JSHTMLLabelElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
       
   211 {
       
   212     return getDOMConstructor<JSHTMLLabelElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
       
   213 }
       
   214 
       
   215 
       
   216 }