Esempio n. 1
0
String OptionElement::collectOptionLabelOrText(const OptionElementData& data, const Element* element)
{
    Document& document = element->document();
    String text;
    // WinIE does not use the label attribute, so as a quirk, we ignore it.
    if (document.inQuirksMode())
        text = data.label();
    if (text.isEmpty())
        text = collectOptionInnerText(element);
    return text.stripWhiteSpace().simplifyWhiteSpace();
}
Esempio n. 2
0
String OptionElement::collectOptionLabelOrText(const OptionElementData& data, const Element* element)
{
    Document* document = element->document();
    String text;

    // WinIE does not use the label attribute, so as a quirk, we ignore it.
    if (!document->inQuirksMode())
        text = data.label();
    if (text.isEmpty())
        text = collectOptionInnerText(element);
    return normalizeText(document, text);
}