Example #1
0
void JSHTMLTableElement::putValueProperty(ExecState* exec, int token, JSValue* value)
{
    switch (token) {
    case CaptionAttrNum: {
        HTMLTableElement* imp = static_cast<HTMLTableElement*>(impl());
        ExceptionCode ec = 0;
        imp->setCaption(toHTMLTableCaptionElement(value), ec);
        setDOMException(exec, ec);
        break;
    }
    case THeadAttrNum: {
        HTMLTableElement* imp = static_cast<HTMLTableElement*>(impl());
        ExceptionCode ec = 0;
        imp->setTHead(toHTMLTableSectionElement(value), ec);
        setDOMException(exec, ec);
        break;
    }
    case TFootAttrNum: {
        HTMLTableElement* imp = static_cast<HTMLTableElement*>(impl());
        ExceptionCode ec = 0;
        imp->setTFoot(toHTMLTableSectionElement(value), ec);
        setDOMException(exec, ec);
        break;
    }
    case AlignAttrNum: {
        HTMLTableElement* imp = static_cast<HTMLTableElement*>(impl());
        imp->setAlign(valueToStringWithNullCheck(exec, value));
        break;
    }
    case BgColorAttrNum: {
        HTMLTableElement* imp = static_cast<HTMLTableElement*>(impl());
        imp->setBgColor(valueToStringWithNullCheck(exec, value));
        break;
    }
    case BorderAttrNum: {
        HTMLTableElement* imp = static_cast<HTMLTableElement*>(impl());
        imp->setBorder(valueToStringWithNullCheck(exec, value));
        break;
    }
    case CellPaddingAttrNum: {
        HTMLTableElement* imp = static_cast<HTMLTableElement*>(impl());
        imp->setCellPadding(valueToStringWithNullCheck(exec, value));
        break;
    }
    case CellSpacingAttrNum: {
        HTMLTableElement* imp = static_cast<HTMLTableElement*>(impl());
        imp->setCellSpacing(valueToStringWithNullCheck(exec, value));
        break;
    }
    case FrameAttrNum: {
        HTMLTableElement* imp = static_cast<HTMLTableElement*>(impl());
        imp->setFrame(valueToStringWithNullCheck(exec, value));
        break;
    }
    case RulesAttrNum: {
        HTMLTableElement* imp = static_cast<HTMLTableElement*>(impl());
        imp->setRules(valueToStringWithNullCheck(exec, value));
        break;
    }
    case SummaryAttrNum: {
        HTMLTableElement* imp = static_cast<HTMLTableElement*>(impl());
        imp->setSummary(valueToStringWithNullCheck(exec, value));
        break;
    }
    case WidthAttrNum: {
        HTMLTableElement* imp = static_cast<HTMLTableElement*>(impl());
        imp->setWidth(valueToStringWithNullCheck(exec, value));
        break;
    }
    }
}