diff options
Diffstat (limited to 'Source/WebCore/html/HTMLBRElement.cpp')
-rw-r--r-- | Source/WebCore/html/HTMLBRElement.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/Source/WebCore/html/HTMLBRElement.cpp b/Source/WebCore/html/HTMLBRElement.cpp index 5efe6379a..33f0c533c 100644 --- a/Source/WebCore/html/HTMLBRElement.cpp +++ b/Source/WebCore/html/HTMLBRElement.cpp @@ -48,21 +48,26 @@ PassRefPtr<HTMLBRElement> HTMLBRElement::create(const QualifiedName& tagName, Do return adoptRef(new HTMLBRElement(tagName, document)); } -void HTMLBRElement::parseAttribute(Attribute* attr) +bool HTMLBRElement::isPresentationAttribute(Attribute* attr) const +{ + if (attr->name() == clearAttr) + return true; + return HTMLElement::isPresentationAttribute(attr); +} + +void HTMLBRElement::collectStyleForAttribute(Attribute* attr, StylePropertySet* style) { if (attr->name() == clearAttr) { - // If the string is empty, then don't add the clear property. + // If the string is empty, then don't add the clear property. // <br clear> and <br clear=""> are just treated like <br> by Gecko, Mac IE, etc. -dwh - if (attr->value().isNull()) - removeCSSProperty(CSSPropertyClear); - else if (!attr->value().isEmpty()) { + if (!attr->isEmpty()) { if (equalIgnoringCase(attr->value(), "all")) - addCSSProperty(CSSPropertyClear, "both"); + addPropertyToAttributeStyle(style, CSSPropertyClear, "both"); else - addCSSProperty(CSSPropertyClear, attr->value()); + addPropertyToAttributeStyle(style, CSSPropertyClear, attr->value()); } } else - HTMLElement::parseAttribute(attr); + HTMLElement::collectStyleForAttribute(attr, style); } RenderObject* HTMLBRElement::createRenderer(RenderArena* arena, RenderStyle* style) |