[Webkit-unassigned] [Bug 19681] borderColor on table elements should be ignored

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 10 00:10:29 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=19681


Andreas Kling <kling at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #121789|review?                     |review-
               Flag|                            |




--- Comment #4 from Andreas Kling <kling at webkit.org>  2012-01-10 00:10:29 PST ---
(From update of attachment 121789)
View in context: https://bugs.webkit.org/attachment.cgi?id=121789&action=review

Does this new behavior match what other browsers are doing? The bug description seems to say that we should ignore bordercolorAttr altogether.

> Source/WebCore/html/HTMLTableElement.cpp:340
> -        m_borderColorAttr = attr->decl();
> -        if (!attr->decl() && !attr->isEmpty()) {
> -            addCSSColor(attr, CSSPropertyBorderColor, attr->value());
> -            m_borderColorAttr = true;
> -        }
> +       if (m_borderAttr) {        
> +            m_borderColorAttr = attr->decl();
> +            if (!attr->decl() && !attr->isEmpty()) {
> +                addCSSColor(attr, CSSPropertyBorderColor, attr->value());
> +                m_borderColorAttr = true;
> +            }
> +       }

parseMappedAttribute() shouldn't depend on the presence/absensce of attributes other than the one being parsed. This will break if borderAttr is parsed before bordercolorAttr.
HTMLTableElement::additionalAttributeStyleDecls() exists for this purpose; to apply additional style that depends on multiple attributes.

> LayoutTests/fast/table/border-table-ignore.html:12
> +<table class="brdrcls" cellpadding="10">

This table doesn't have a bordercolor attribute, which means that this test will not hit the code path you're changing.
Furthermore, it should be possible to do this as a dumpAsText() test.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list