static void heightAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
    INC_STATS("DOM.HTMLImageElement.height._set");
    HTMLImageElement* imp = V8HTMLImageElement::toNative(info.Holder());
    int v = toInt32(value);
    imp->setHeight(v);
    return;
}
Exemplo n.º 2
0
void JSHTMLImageElement::putValueProperty(ExecState* exec, int token, JSValue* value)
{
    switch (token) {
    case NameAttrNum: {
        HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl());
        imp->setName(valueToStringWithNullCheck(exec, value));
        break;
    }
    case AlignAttrNum: {
        HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl());
        imp->setAlign(valueToStringWithNullCheck(exec, value));
        break;
    }
    case AltAttrNum: {
        HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl());
        imp->setAlt(valueToStringWithNullCheck(exec, value));
        break;
    }
    case BorderAttrNum: {
        HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl());
        imp->setBorder(valueToStringWithNullCheck(exec, value));
        break;
    }
    case HeightAttrNum: {
        HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl());
        imp->setHeight(value->toInt32(exec));
        break;
    }
    case HspaceAttrNum: {
        HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl());
        imp->setHspace(value->toInt32(exec));
        break;
    }
    case IsMapAttrNum: {
        HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl());
        imp->setIsMap(value->toBoolean(exec));
        break;
    }
    case LongDescAttrNum: {
        HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl());
        imp->setLongDesc(valueToStringWithNullCheck(exec, value));
        break;
    }
    case SrcAttrNum: {
        HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl());
        imp->setSrc(valueToStringWithNullCheck(exec, value));
        break;
    }
    case UseMapAttrNum: {
        HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl());
        imp->setUseMap(valueToStringWithNullCheck(exec, value));
        break;
    }
    case VspaceAttrNum: {
        HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl());
        imp->setVspace(value->toInt32(exec));
        break;
    }
    case WidthAttrNum: {
        HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl());
        imp->setWidth(value->toInt32(exec));
        break;
    }
    case LowsrcAttrNum: {
        HTMLImageElement* imp = static_cast<HTMLImageElement*>(impl());
        imp->setLowsrc(valueToStringWithNullCheck(exec, value));
        break;
    }
    }
}