Two CSS rendering bugs [ From W3C CSS conformance suit ]

Lars Knoll lars at trolltech.com
Fri Jan 17 15:22:19 GMT 2003


Hi,

this bug is in there since ages, and has nothing to do with the parser 
rewrite. In fact the bug is not related to the CSS parser at all, but to some 
missing feature in the rendering engine.

It currently has a rather low priority for me as it's a huge amount of work to 
fix it and there are much more urgent problems.

Thanks for the report anyways,
Lars


> While trying CSS conformance tests at w3.org. I found two bugs in css
> parser. And able to create two simple test-case for the issues.
>
> According to http://www.w3.org/Style/CSS/Test/CSS1/current/test543.htm
> if an element's parent has a style you should ignore the children's style
> attribute and apply parent's style to it too. Here is a simple test case
> ripped from CSS-1 test suite :
>
> *************************************************************************
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
> "http://www.w3.org/TR/REC-html40/loose.dtd">
> <HTML>
> <HEAD>
> <TITLE>CSS1 Test Suite: 5.4.3 text-decoration</TITLE>
> <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> <META http-equiv="Content-Style-Type" content="text/css">
> <STYLE type="text/css">
> .one {text-decoration: underline;}
> B.five {text-decoration: none;}
> </STYLE>
> </HEAD>
> <BODY>
> <P class="one">
> The text in this element should be underlined.  The boldfaced text in this
> element <B class="five">should also be underlined</B>.  This is because the
> parent's underline will 'span' the boldfaced text, even if the inline
> element has no underline of its own.
> </P>
> </BODY>
> </HTML>
>
> ***************************************************************************
>********** Here bold text should be underlined too because its parent has
> "one" style says underline so you must ignore class attribute for <b> tag .
>
> And the second bug a similar behavior. You have to ignore color attribute
> for children if parent already has a color attribute. Here is the test case
> again ripped from css conformance suit.
>
>
> ***************************************************************************
>********
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
> "http://www.w3.org/TR/REC-html40/loose.dtd">
> <HTML>
> <HEAD>
> <TITLE>CSS1 Test Suite: 5.4.3 text-decoration</TITLE>
> <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> </HEAD>
> <BODY>
> <P style="color: green;" class="one">
> The underlining <SPAN style="color: blue;">in this sentence</SPAN> should
> be green, no matter what the <SPAN style="color: black;">text color may
> be</SPAN>.
> </P>
> </BODY>
> </HTML>
>
> ***************************************************************************
>*************
>
> Regards ,
> /ismail





More information about the kfm-devel mailing list