WebCore/generated/JSHTMLImageElement.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 "JSHTMLImageElement.h"
       
    23 
       
    24 #include "HTMLImageElement.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(JSHTMLImageElement);
       
    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 JSHTMLImageElementTableValues[20] =
       
    45 {
       
    46     { "name", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLImageElementName), (intptr_t)setJSHTMLImageElementName THUNK_GENERATOR(0) },
       
    47     { "align", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLImageElementAlign), (intptr_t)setJSHTMLImageElementAlign THUNK_GENERATOR(0) },
       
    48     { "alt", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLImageElementAlt), (intptr_t)setJSHTMLImageElementAlt THUNK_GENERATOR(0) },
       
    49     { "border", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLImageElementBorder), (intptr_t)setJSHTMLImageElementBorder THUNK_GENERATOR(0) },
       
    50     { "height", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLImageElementHeight), (intptr_t)setJSHTMLImageElementHeight THUNK_GENERATOR(0) },
       
    51     { "hspace", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLImageElementHspace), (intptr_t)setJSHTMLImageElementHspace THUNK_GENERATOR(0) },
       
    52     { "isMap", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLImageElementIsMap), (intptr_t)setJSHTMLImageElementIsMap THUNK_GENERATOR(0) },
       
    53     { "longDesc", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLImageElementLongDesc), (intptr_t)setJSHTMLImageElementLongDesc THUNK_GENERATOR(0) },
       
    54     { "src", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLImageElementSrc), (intptr_t)setJSHTMLImageElementSrc THUNK_GENERATOR(0) },
       
    55     { "useMap", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLImageElementUseMap), (intptr_t)setJSHTMLImageElementUseMap THUNK_GENERATOR(0) },
       
    56     { "vspace", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLImageElementVspace), (intptr_t)setJSHTMLImageElementVspace THUNK_GENERATOR(0) },
       
    57     { "width", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLImageElementWidth), (intptr_t)setJSHTMLImageElementWidth THUNK_GENERATOR(0) },
       
    58     { "complete", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLImageElementComplete), (intptr_t)0 THUNK_GENERATOR(0) },
       
    59     { "lowsrc", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLImageElementLowsrc), (intptr_t)setJSHTMLImageElementLowsrc THUNK_GENERATOR(0) },
       
    60     { "naturalHeight", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLImageElementNaturalHeight), (intptr_t)0 THUNK_GENERATOR(0) },
       
    61     { "naturalWidth", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLImageElementNaturalWidth), (intptr_t)0 THUNK_GENERATOR(0) },
       
    62     { "x", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLImageElementX), (intptr_t)0 THUNK_GENERATOR(0) },
       
    63     { "y", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLImageElementY), (intptr_t)0 THUNK_GENERATOR(0) },
       
    64     { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLImageElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) },
       
    65     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    66 };
       
    67 
       
    68 #undef THUNK_GENERATOR
       
    69 static JSC_CONST_HASHTABLE HashTable JSHTMLImageElementTable = { 67, 63, JSHTMLImageElementTableValues, 0 };
       
    70 /* Hash table for constructor */
       
    71 #if ENABLE(JIT)
       
    72 #define THUNK_GENERATOR(generator) , generator
       
    73 #else
       
    74 #define THUNK_GENERATOR(generator)
       
    75 #endif
       
    76 
       
    77 static const HashTableValue JSHTMLImageElementConstructorTableValues[1] =
       
    78 {
       
    79     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    80 };
       
    81 
       
    82 #undef THUNK_GENERATOR
       
    83 static JSC_CONST_HASHTABLE HashTable JSHTMLImageElementConstructorTable = { 1, 0, JSHTMLImageElementConstructorTableValues, 0 };
       
    84 class JSHTMLImageElementConstructor : public DOMConstructorObject {
       
    85 public:
       
    86     JSHTMLImageElementConstructor(JSC::ExecState*, JSDOMGlobalObject*);
       
    87 
       
    88     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
       
    89     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
       
    90     virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
       
    91     static const JSC::ClassInfo s_info;
       
    92     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
       
    93     {
       
    94         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
       
    95     }
       
    96 protected:
       
    97     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
       
    98 };
       
    99 
       
   100 const ClassInfo JSHTMLImageElementConstructor::s_info = { "HTMLImageElementConstructor", 0, &JSHTMLImageElementConstructorTable, 0 };
       
   101 
       
   102 JSHTMLImageElementConstructor::JSHTMLImageElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
       
   103     : DOMConstructorObject(JSHTMLImageElementConstructor::createStructure(globalObject->objectPrototype()), globalObject)
       
   104 {
       
   105     putDirect(exec->propertyNames().prototype, JSHTMLImageElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
       
   106 }
       
   107 
       
   108 bool JSHTMLImageElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   109 {
       
   110     return getStaticValueSlot<JSHTMLImageElementConstructor, DOMObject>(exec, &JSHTMLImageElementConstructorTable, this, propertyName, slot);
       
   111 }
       
   112 
       
   113 bool JSHTMLImageElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   114 {
       
   115     return getStaticValueDescriptor<JSHTMLImageElementConstructor, DOMObject>(exec, &JSHTMLImageElementConstructorTable, this, propertyName, descriptor);
       
   116 }
       
   117 
       
   118 /* Hash table for prototype */
       
   119 #if ENABLE(JIT)
       
   120 #define THUNK_GENERATOR(generator) , generator
       
   121 #else
       
   122 #define THUNK_GENERATOR(generator)
       
   123 #endif
       
   124 
       
   125 static const HashTableValue JSHTMLImageElementPrototypeTableValues[1] =
       
   126 {
       
   127     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
   128 };
       
   129 
       
   130 #undef THUNK_GENERATOR
       
   131 static JSC_CONST_HASHTABLE HashTable JSHTMLImageElementPrototypeTable = { 1, 0, JSHTMLImageElementPrototypeTableValues, 0 };
       
   132 const ClassInfo JSHTMLImageElementPrototype::s_info = { "HTMLImageElementPrototype", 0, &JSHTMLImageElementPrototypeTable, 0 };
       
   133 
       
   134 JSObject* JSHTMLImageElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
       
   135 {
       
   136     return getDOMPrototype<JSHTMLImageElement>(exec, globalObject);
       
   137 }
       
   138 
       
   139 const ClassInfo JSHTMLImageElement::s_info = { "HTMLImageElement", &JSHTMLElement::s_info, &JSHTMLImageElementTable, 0 };
       
   140 
       
   141 JSHTMLImageElement::JSHTMLImageElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLImageElement> impl)
       
   142     : JSHTMLElement(structure, globalObject, impl)
       
   143 {
       
   144 }
       
   145 
       
   146 JSObject* JSHTMLImageElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
       
   147 {
       
   148     return new (exec) JSHTMLImageElementPrototype(globalObject, JSHTMLImageElementPrototype::createStructure(JSHTMLElementPrototype::self(exec, globalObject)));
       
   149 }
       
   150 
       
   151 bool JSHTMLImageElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   152 {
       
   153     return getStaticValueSlot<JSHTMLImageElement, Base>(exec, &JSHTMLImageElementTable, this, propertyName, slot);
       
   154 }
       
   155 
       
   156 bool JSHTMLImageElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   157 {
       
   158     return getStaticValueDescriptor<JSHTMLImageElement, Base>(exec, &JSHTMLImageElementTable, this, propertyName, descriptor);
       
   159 }
       
   160 
       
   161 JSValue jsHTMLImageElementName(ExecState* exec, JSValue slotBase, const Identifier&)
       
   162 {
       
   163     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slotBase));
       
   164     UNUSED_PARAM(exec);
       
   165     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   166     JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::nameAttr));
       
   167     return result;
       
   168 }
       
   169 
       
   170 JSValue jsHTMLImageElementAlign(ExecState* exec, JSValue slotBase, const Identifier&)
       
   171 {
       
   172     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slotBase));
       
   173     UNUSED_PARAM(exec);
       
   174     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   175     JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::alignAttr));
       
   176     return result;
       
   177 }
       
   178 
       
   179 JSValue jsHTMLImageElementAlt(ExecState* exec, JSValue slotBase, const Identifier&)
       
   180 {
       
   181     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slotBase));
       
   182     UNUSED_PARAM(exec);
       
   183     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   184     JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::altAttr));
       
   185     return result;
       
   186 }
       
   187 
       
   188 JSValue jsHTMLImageElementBorder(ExecState* exec, JSValue slotBase, const Identifier&)
       
   189 {
       
   190     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slotBase));
       
   191     UNUSED_PARAM(exec);
       
   192     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   193     JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::borderAttr));
       
   194     return result;
       
   195 }
       
   196 
       
   197 JSValue jsHTMLImageElementHeight(ExecState* exec, JSValue slotBase, const Identifier&)
       
   198 {
       
   199     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slotBase));
       
   200     UNUSED_PARAM(exec);
       
   201     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   202     JSValue result = jsNumber(exec, imp->height());
       
   203     return result;
       
   204 }
       
   205 
       
   206 JSValue jsHTMLImageElementHspace(ExecState* exec, JSValue slotBase, const Identifier&)
       
   207 {
       
   208     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slotBase));
       
   209     UNUSED_PARAM(exec);
       
   210     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   211     JSValue result = jsNumber(exec, imp->getIntegralAttribute(WebCore::HTMLNames::hspaceAttr));
       
   212     return result;
       
   213 }
       
   214 
       
   215 JSValue jsHTMLImageElementIsMap(ExecState* exec, JSValue slotBase, const Identifier&)
       
   216 {
       
   217     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slotBase));
       
   218     UNUSED_PARAM(exec);
       
   219     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   220     JSValue result = jsBoolean(imp->hasAttribute(WebCore::HTMLNames::ismapAttr));
       
   221     return result;
       
   222 }
       
   223 
       
   224 JSValue jsHTMLImageElementLongDesc(ExecState* exec, JSValue slotBase, const Identifier&)
       
   225 {
       
   226     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slotBase));
       
   227     UNUSED_PARAM(exec);
       
   228     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   229     JSValue result = jsString(exec, imp->getURLAttribute(WebCore::HTMLNames::longdescAttr));
       
   230     return result;
       
   231 }
       
   232 
       
   233 JSValue jsHTMLImageElementSrc(ExecState* exec, JSValue slotBase, const Identifier&)
       
   234 {
       
   235     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slotBase));
       
   236     UNUSED_PARAM(exec);
       
   237     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   238     JSValue result = jsString(exec, imp->getURLAttribute(WebCore::HTMLNames::srcAttr));
       
   239     return result;
       
   240 }
       
   241 
       
   242 JSValue jsHTMLImageElementUseMap(ExecState* exec, JSValue slotBase, const Identifier&)
       
   243 {
       
   244     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slotBase));
       
   245     UNUSED_PARAM(exec);
       
   246     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   247     JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::usemapAttr));
       
   248     return result;
       
   249 }
       
   250 
       
   251 JSValue jsHTMLImageElementVspace(ExecState* exec, JSValue slotBase, const Identifier&)
       
   252 {
       
   253     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slotBase));
       
   254     UNUSED_PARAM(exec);
       
   255     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   256     JSValue result = jsNumber(exec, imp->getIntegralAttribute(WebCore::HTMLNames::vspaceAttr));
       
   257     return result;
       
   258 }
       
   259 
       
   260 JSValue jsHTMLImageElementWidth(ExecState* exec, JSValue slotBase, const Identifier&)
       
   261 {
       
   262     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slotBase));
       
   263     UNUSED_PARAM(exec);
       
   264     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   265     JSValue result = jsNumber(exec, imp->width());
       
   266     return result;
       
   267 }
       
   268 
       
   269 JSValue jsHTMLImageElementComplete(ExecState* exec, JSValue slotBase, const Identifier&)
       
   270 {
       
   271     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slotBase));
       
   272     UNUSED_PARAM(exec);
       
   273     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   274     JSValue result = jsBoolean(imp->complete());
       
   275     return result;
       
   276 }
       
   277 
       
   278 JSValue jsHTMLImageElementLowsrc(ExecState* exec, JSValue slotBase, const Identifier&)
       
   279 {
       
   280     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slotBase));
       
   281     UNUSED_PARAM(exec);
       
   282     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   283     JSValue result = jsString(exec, imp->getURLAttribute(WebCore::HTMLNames::lowsrcAttr));
       
   284     return result;
       
   285 }
       
   286 
       
   287 JSValue jsHTMLImageElementNaturalHeight(ExecState* exec, JSValue slotBase, const Identifier&)
       
   288 {
       
   289     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slotBase));
       
   290     UNUSED_PARAM(exec);
       
   291     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   292     JSValue result = jsNumber(exec, imp->naturalHeight());
       
   293     return result;
       
   294 }
       
   295 
       
   296 JSValue jsHTMLImageElementNaturalWidth(ExecState* exec, JSValue slotBase, const Identifier&)
       
   297 {
       
   298     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slotBase));
       
   299     UNUSED_PARAM(exec);
       
   300     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   301     JSValue result = jsNumber(exec, imp->naturalWidth());
       
   302     return result;
       
   303 }
       
   304 
       
   305 JSValue jsHTMLImageElementX(ExecState* exec, JSValue slotBase, const Identifier&)
       
   306 {
       
   307     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slotBase));
       
   308     UNUSED_PARAM(exec);
       
   309     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   310     JSValue result = jsNumber(exec, imp->x());
       
   311     return result;
       
   312 }
       
   313 
       
   314 JSValue jsHTMLImageElementY(ExecState* exec, JSValue slotBase, const Identifier&)
       
   315 {
       
   316     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slotBase));
       
   317     UNUSED_PARAM(exec);
       
   318     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   319     JSValue result = jsNumber(exec, imp->y());
       
   320     return result;
       
   321 }
       
   322 
       
   323 JSValue jsHTMLImageElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
       
   324 {
       
   325     JSHTMLImageElement* domObject = static_cast<JSHTMLImageElement*>(asObject(slotBase));
       
   326     return JSHTMLImageElement::getConstructor(exec, domObject->globalObject());
       
   327 }
       
   328 void JSHTMLImageElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
       
   329 {
       
   330     lookupPut<JSHTMLImageElement, Base>(exec, propertyName, value, &JSHTMLImageElementTable, this, slot);
       
   331 }
       
   332 
       
   333 void setJSHTMLImageElementName(ExecState* exec, JSObject* thisObject, JSValue value)
       
   334 {
       
   335     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(thisObject);
       
   336     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   337     imp->setAttribute(WebCore::HTMLNames::nameAttr, valueToStringWithNullCheck(exec, value));
       
   338 }
       
   339 
       
   340 void setJSHTMLImageElementAlign(ExecState* exec, JSObject* thisObject, JSValue value)
       
   341 {
       
   342     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(thisObject);
       
   343     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   344     imp->setAttribute(WebCore::HTMLNames::alignAttr, valueToStringWithNullCheck(exec, value));
       
   345 }
       
   346 
       
   347 void setJSHTMLImageElementAlt(ExecState* exec, JSObject* thisObject, JSValue value)
       
   348 {
       
   349     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(thisObject);
       
   350     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   351     imp->setAttribute(WebCore::HTMLNames::altAttr, valueToStringWithNullCheck(exec, value));
       
   352 }
       
   353 
       
   354 void setJSHTMLImageElementBorder(ExecState* exec, JSObject* thisObject, JSValue value)
       
   355 {
       
   356     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(thisObject);
       
   357     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   358     imp->setAttribute(WebCore::HTMLNames::borderAttr, valueToStringWithNullCheck(exec, value));
       
   359 }
       
   360 
       
   361 void setJSHTMLImageElementHeight(ExecState* exec, JSObject* thisObject, JSValue value)
       
   362 {
       
   363     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(thisObject);
       
   364     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   365     imp->setHeight(value.toInt32(exec));
       
   366 }
       
   367 
       
   368 void setJSHTMLImageElementHspace(ExecState* exec, JSObject* thisObject, JSValue value)
       
   369 {
       
   370     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(thisObject);
       
   371     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   372     imp->setIntegralAttribute(WebCore::HTMLNames::hspaceAttr, value.toInt32(exec));
       
   373 }
       
   374 
       
   375 void setJSHTMLImageElementIsMap(ExecState* exec, JSObject* thisObject, JSValue value)
       
   376 {
       
   377     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(thisObject);
       
   378     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   379     imp->setBooleanAttribute(WebCore::HTMLNames::ismapAttr, value.toBoolean(exec));
       
   380 }
       
   381 
       
   382 void setJSHTMLImageElementLongDesc(ExecState* exec, JSObject* thisObject, JSValue value)
       
   383 {
       
   384     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(thisObject);
       
   385     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   386     imp->setAttribute(WebCore::HTMLNames::longdescAttr, valueToStringWithNullCheck(exec, value));
       
   387 }
       
   388 
       
   389 void setJSHTMLImageElementSrc(ExecState* exec, JSObject* thisObject, JSValue value)
       
   390 {
       
   391     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(thisObject);
       
   392     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   393     imp->setAttribute(WebCore::HTMLNames::srcAttr, valueToStringWithNullCheck(exec, value));
       
   394 }
       
   395 
       
   396 void setJSHTMLImageElementUseMap(ExecState* exec, JSObject* thisObject, JSValue value)
       
   397 {
       
   398     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(thisObject);
       
   399     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   400     imp->setAttribute(WebCore::HTMLNames::usemapAttr, valueToStringWithNullCheck(exec, value));
       
   401 }
       
   402 
       
   403 void setJSHTMLImageElementVspace(ExecState* exec, JSObject* thisObject, JSValue value)
       
   404 {
       
   405     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(thisObject);
       
   406     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   407     imp->setIntegralAttribute(WebCore::HTMLNames::vspaceAttr, value.toInt32(exec));
       
   408 }
       
   409 
       
   410 void setJSHTMLImageElementWidth(ExecState* exec, JSObject* thisObject, JSValue value)
       
   411 {
       
   412     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(thisObject);
       
   413     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   414     imp->setWidth(value.toInt32(exec));
       
   415 }
       
   416 
       
   417 void setJSHTMLImageElementLowsrc(ExecState* exec, JSObject* thisObject, JSValue value)
       
   418 {
       
   419     JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(thisObject);
       
   420     HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl());
       
   421     imp->setAttribute(WebCore::HTMLNames::lowsrcAttr, valueToStringWithNullCheck(exec, value));
       
   422 }
       
   423 
       
   424 JSValue JSHTMLImageElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
       
   425 {
       
   426     return getDOMConstructor<JSHTMLImageElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
       
   427 }
       
   428 
       
   429 HTMLImageElement* toHTMLImageElement(JSC::JSValue value)
       
   430 {
       
   431     return value.inherits(&JSHTMLImageElement::s_info) ? static_cast<JSHTMLImageElement*>(asObject(value))->impl() : 0;
       
   432 }
       
   433 
       
   434 }