diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-09 14:16:12 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-09 14:16:12 +0100 |
commit | 03e12282df9aa1e1fb05a8b90f1cfc2e08764cec (patch) | |
tree | 52599cd0ab782b1768e23ad176f7618f98333cb6 /Source/WebCore/html/HTMLLIElement.cpp | |
parent | cd44dc59cdfc39534aef4d417e9f3c412e3be139 (diff) | |
download | qtwebkit-03e12282df9aa1e1fb05a8b90f1cfc2e08764cec.tar.gz |
Imported WebKit commit e09a82039aa4273ab318b71122e92d8e5f233525 (http://svn.webkit.org/repository/webkit/trunk@107223)
Diffstat (limited to 'Source/WebCore/html/HTMLLIElement.cpp')
-rw-r--r-- | Source/WebCore/html/HTMLLIElement.cpp | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/Source/WebCore/html/HTMLLIElement.cpp b/Source/WebCore/html/HTMLLIElement.cpp index 32886cbe9..f789d32fe 100644 --- a/Source/WebCore/html/HTMLLIElement.cpp +++ b/Source/WebCore/html/HTMLLIElement.cpp @@ -49,36 +49,28 @@ PassRefPtr<HTMLLIElement> HTMLLIElement::create(const QualifiedName& tagName, Do return adoptRef(new HTMLLIElement(tagName, document)); } -bool HTMLLIElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const -{ - if (attrName == typeAttr) { - result = eListItem; // Share with <ol> since all the values are the same - return false; - } - - return HTMLElement::mapToEntry(attrName, result); -} - -void HTMLLIElement::parseMappedAttribute(Attribute* attr) +void HTMLLIElement::parseAttribute(Attribute* attr) { if (attr->name() == valueAttr) { if (renderer() && renderer()->isListItem()) parseValue(attr->value()); } else if (attr->name() == typeAttr) { - if (attr->value() == "a") - addCSSProperty(attr, CSSPropertyListStyleType, CSSValueLowerAlpha); + if (attr->value().isNull()) + removeCSSProperty(CSSPropertyListStyleType); + else if (attr->value() == "a") + addCSSProperty(CSSPropertyListStyleType, CSSValueLowerAlpha); else if (attr->value() == "A") - addCSSProperty(attr, CSSPropertyListStyleType, CSSValueUpperAlpha); + addCSSProperty(CSSPropertyListStyleType, CSSValueUpperAlpha); else if (attr->value() == "i") - addCSSProperty(attr, CSSPropertyListStyleType, CSSValueLowerRoman); + addCSSProperty(CSSPropertyListStyleType, CSSValueLowerRoman); else if (attr->value() == "I") - addCSSProperty(attr, CSSPropertyListStyleType, CSSValueUpperRoman); + addCSSProperty(CSSPropertyListStyleType, CSSValueUpperRoman); else if (attr->value() == "1") - addCSSProperty(attr, CSSPropertyListStyleType, CSSValueDecimal); + addCSSProperty(CSSPropertyListStyleType, CSSValueDecimal); else - addCSSProperty(attr, CSSPropertyListStyleType, attr->value()); + addCSSProperty(CSSPropertyListStyleType, attr->value()); } else - HTMLElement::parseMappedAttribute(attr); + HTMLElement::parseAttribute(attr); } void HTMLLIElement::attach() |