static v8::Handle<v8::Value> heightAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { INC_STATS("DOM.HTMLImageElement.height._get"); HTMLImageElement* imp = V8HTMLImageElement::toNative(info.Holder()); if (!R_check(imp)) return v8::Handle<v8::Value>(v8::Undefined()); return v8::Integer::New(imp->height()); }
JSValue* JSHTMLImageElement::getValueProperty(ExecState* exec, int token) const { switch (token) { case NameAttrNum: { HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl()); return jsString(exec, imp->name()); } case AlignAttrNum: { HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl()); return jsString(exec, imp->align()); } case AltAttrNum: { HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl()); return jsString(exec, imp->alt()); } case BorderAttrNum: { HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl()); return jsString(exec, imp->border()); } case HeightAttrNum: { HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl()); return jsNumber(exec, imp->height()); } case HspaceAttrNum: { HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl()); return jsNumber(exec, imp->hspace()); } case IsMapAttrNum: { HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl()); return jsBoolean(imp->isMap()); } case LongDescAttrNum: { HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl()); return jsString(exec, imp->longDesc()); } case SrcAttrNum: { HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl()); return jsString(exec, imp->src()); } case UseMapAttrNum: { HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl()); return jsString(exec, imp->useMap()); } case VspaceAttrNum: { HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl()); return jsNumber(exec, imp->vspace()); } case WidthAttrNum: { HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl()); return jsNumber(exec, imp->width()); } case CompleteAttrNum: { HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl()); return jsBoolean(imp->complete()); } case LowsrcAttrNum: { HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl()); return jsString(exec, imp->lowsrc()); } case NaturalHeightAttrNum: { HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl()); return jsNumber(exec, imp->naturalHeight()); } case NaturalWidthAttrNum: { HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl()); return jsNumber(exec, imp->naturalWidth()); } case XAttrNum: { HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl()); return jsNumber(exec, imp->x()); } case YAttrNum: { HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl()); return jsNumber(exec, imp->y()); } case ConstructorAttrNum: return getConstructor(exec); } return 0; }