Bug 73086 - [test case] CSS rules ignored after bad declaration block
Summary: [test case] CSS rules ignored after bad declaration block
Status: RESOLVED WORKSFORME
Alias: None
Product: konqueror
Classification: Applications
Component: khtml parsing (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 63500 64961 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-01-21 00:22 UTC by Ralph Weichert
Modified: 2004-05-11 16:04 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Weichert 2004-01-21 00:22:48 UTC
Version:           3.2.0 (using KDE 3.2.0 RC1, SuSE)
Compiler:          gcc version 3.3.1 (SuSE Linux)
OS:          Linux (i686) release 2.4.21-166-smp4G

Looks like konqueror stops parsing of style sheets when the last declaration in a block is incorrect. I found this in KDE 3.1.94 and 3.1.95, it was not present in 3.1.4.

In the following example the background of the table cell is still the page background (class "footer" is not used in the document, but the syntax error obviously prevents definition of "groupCell"):

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
 <title> TWiki.HRZ.WebHome </title>
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <style type="text/css">
body {font-family: arial, helvetica, sans-serif;
 background: #003366; color: black;}
.footer{font-size:small; color="#FFFFFF"}
.groupCell {background: #d0d0d0;}
 </style>
</head>
<body>
<table border=0 cellspacing=0 cellpadding=2 align=center><tr>
<td class=groupCell>Main</td>
</tr></table>
</body>
</html>

While ignoring the incorrect rule is probably OK, the following rules should be used for rendering.

Without the rule for ".footer", it is rendered correctly:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
 <title> TWiki.HRZ.WebHome </title>
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <style type="text/css">
body {font-family: arial, helvetica, sans-serif;
 background: #003366; color: black;}
.groupCell {background: #d0d0d0;}
 </style>
</head>
<body>
<table border=0 cellspacing=0 cellpadding=2 align=center><tr>
<td class=groupCell>Main</td>
</tr></table>
</body>
</html>

It also works when the bad declaration is not the last one:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
 <title> TWiki.HRZ.WebHome </title>
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <style type="text/css">
body {font-family: arial, helvetica, sans-serif;
 background: #003366; color: black;}
.footer{font-size=small; color:"#FFFFFF"}
.groupCell {background: #d0d0d0;}
 </style>
</head>
<body>
<table border=0 cellspacing=0 cellpadding=2 align=center><tr>
<td class=groupCell>Main</td>
</tr></table>
</body>
</html>

The examples are also available online:
http://homepages.tu-darmstadt.de/~weichert/wiki/wiki_test1.html
http://homepages.tu-darmstadt.de/~weichert/wiki/wiki_test2.html
http://homepages.tu-darmstadt.de/~weichert/wiki/wiki_test3.html

regards,
Ralph
Comment 1 Ralph Weichert 2004-01-21 00:26:51 UTC
Oops, looks like some version information got lost on the way. 3.1.94 and 3.1.95 were SuSE 9.0 binaries (ix86) from kde.org, the 3.1.4 was the one shipped with this distribution.
Comment 2 Stephan Kulow 2004-01-26 14:56:24 UTC
*** Bug 64961 has been marked as a duplicate of this bug. ***
Comment 3 Stephan Kulow 2004-01-29 08:36:45 UTC
*** Bug 63500 has been marked as a duplicate of this bug. ***
Comment 4 Jason Ahrens 2004-02-08 17:20:28 UTC
Applied patch listed from bug 64961 to kdelibs 3.2.0, which reportedly fixed this in the rc's, however the issue persisted.
Comment 5 Stephan Kulow 2004-02-08 20:50:43 UTC
Who says? http://bugs.kde.org/show_bug.cgi?id=73086 is still open, noone said it's fixed for 3.2.0
Comment 6 Ralph Weichert 2004-05-11 11:10:38 UTC
In KDE 3.2.2, all the test pages look the same, so I guess it's fixed now. Thanks!
Comment 7 Stephan Kulow 2004-05-11 16:04:32 UTC
I'm kind of suprised the bug was still open. we spent quite some time on the test cases - and they were added in january to our regression test suite :)