From 03e12282df9aa1e1fb05a8b90f1cfc2e08764cec Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 9 Feb 2012 14:16:12 +0100 Subject: Imported WebKit commit e09a82039aa4273ab318b71122e92d8e5f233525 (http://svn.webkit.org/repository/webkit/trunk@107223) --- Source/WebCore/html/HTMLPreElement.cpp | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'Source/WebCore/html/HTMLPreElement.cpp') 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::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
 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);
 }
 
 }
-- 
cgit v1.2.1