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/HTMLPreElement.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/HTMLPreElement.cpp')
-rw-r--r-- | Source/WebCore/html/HTMLPreElement.cpp | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/Source/WebCore/html/HTMLPreElement.cpp b/Source/WebCore/html/HTMLPreElement.cpp index fc67aca7f..7ed85fccd 100644 --- a/Source/WebCore/html/HTMLPreElement.cpp +++ b/Source/WebCore/html/HTMLPreElement.cpp @@ -42,16 +42,7 @@ PassRefPtr<HTMLPreElement> HTMLPreElement::create(const QualifiedName& tagName, return adoptRef(new HTMLPreElement(tagName, document)); } -bool HTMLPreElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const -{ - if (attrName == widthAttr || attrName == wrapAttr) { - result = ePre; - return false; - } - return HTMLElement::mapToEntry(attrName, result); -} - -void HTMLPreElement::parseMappedAttribute(Attribute* attr) +void HTMLPreElement::parseAttribute(Attribute* attr) { if (attr->name() == widthAttr) { // FIXME: Implement this some day. Width on a <pre> is the # of characters that @@ -59,10 +50,12 @@ void HTMLPreElement::parseMappedAttribute(Attribute* attr) // multiply by the value of the attribute and then set that as the width CSS // property. } else if (attr->name() == wrapAttr) { - if (!attr->value().isNull()) - addCSSProperty(attr, CSSPropertyWhiteSpace, CSSValuePreWrap); + if (attr->value().isNull()) + removeCSSProperty(CSSPropertyWhiteSpace); + else + addCSSProperty(CSSPropertyWhiteSpace, CSSValuePreWrap); } else - return HTMLElement::parseMappedAttribute(attr); + return HTMLElement::parseAttribute(attr); } } |