void WMLInputElement::parseMappedAttribute(Attribute* attr)
{
    if (attr->name() == HTMLNames::nameAttr)
        m_data.setName(parseValueForbiddingVariableReferences(attr->value()));
    else if (attr->name() == HTMLNames::typeAttr) {
        String type = parseValueForbiddingVariableReferences(attr->value());
        m_isPasswordField = (type == "password");
    } else if (attr->name() == HTMLNames::valueAttr) {
        // We only need to setChanged if the form is looking at the default value right now.
        if (m_data.value().isNull())
            setNeedsStyleRecalc();
        setFormControlValueMatchesRenderer(false);
    } else if (attr->name() == HTMLNames::maxlengthAttr)
        InputElement::parseMaxLengthAttribute(m_data, this, this, attr);
    else if (attr->name() == HTMLNames::sizeAttr)
        InputElement::parseSizeAttribute(m_data, this, attr);
    else if (attr->name() == WMLNames::formatAttr)
        m_formatMask = validateInputMask(parseValueForbiddingVariableReferences(attr->value()));
    else if (attr->name() == WMLNames::emptyokAttr)
        m_isEmptyOk = (attr->value() == "true");
    else
        WMLElement::parseMappedAttribute(attr);

    // FIXME: Handle 'accesskey' attribute
    // FIXME: Handle 'tabindex' attribute
    // FIXME: Handle 'title' attribute
}
Пример #2
0
void WMLSelectElement::parseMappedAttribute(MappedAttribute* attr)
{
    // SAMSUNG_WML_FIXES+
    // wml/struct/control/select/element/iname/10
    // wml/struct/control/select/element/iname/11
    if (attr->name() == HTMLNames::multipleAttr && attr->value()=="true")
        SelectElement::parseMultipleAttribute(m_data, this, attr);
    else if (attr->name() == HTMLNames::nameAttr)
        m_name = parseValueForbiddingVariableReferences(attr->value());
    // SAMSUNG_WML_FIXES-
    else
        WMLFormControlElement::parseMappedAttribute(attr);
}
Пример #3
0
String WMLSelectElement::iname() const
{
    return parseValueForbiddingVariableReferences(getAttribute(inameAttr));
}