Bug 143534 - Incorrect <P> after <UL>, expected paragraph <P>, found line-break <BR>
Summary: Incorrect <P> after <UL>, expected paragraph <P>, found line-break <BR>
Status: CONFIRMED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml parsing (show other bugs)
Version: Git
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-28 07:32 UTC by Jose Da Silva
Modified: 2012-02-18 22:20 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jose Da Silva 2007-03-28 07:32:04 UTC
Version:           3.5.4 (using KDE 3.5.4, compiled sources)
Compiler:          Target: i586-mandriva-linux-gnu
OS:                Linux (i686) release 2.6.17-5mdv

Konqueror renders a paragraph break <P> as a line break instead <BR> if the <P> occurs inside a list <OL><LI>

The paragraph break works incorrectly on the 1st <P> but works okay on following paragraphs within the same list <LI>

This was discovered while I was creating my web page and this will take you directly to the problem (Please watch-out for wrap-around):
http://www.joescat.com/backup/disk_image.html#STEPS

If you look at:
1. Burn a Knoppix disk.
You will note that there is a line break instead of a paragraph break. You will also notice that the following paragraphs render okay as paragraphs.

If you look at the source for that page, it is at approximately line 40 and 41 and looks like this:
<OL><LI>Burn a <A HREF="http://www.knoppix.org/" TARGET="_blank">Knoppix</A> CDrom Disk.
<P>Why Knoppi.......

The same problem appears under other steps (#2...#7) which begin with <LI> and then the 1st <P> renders wrong.
#2 is line 47
#3 is line 51
#4 is line 58...etc in source code

Firefox and Internet Explorer were also tested but are working correctly by displaying a paragraph instead of a line break.
Comment 1 Rui G. 2008-08-22 17:15:10 UTC
Confirmed, it renders different than Firefox and Internet Explorer like you say, in Opensuse 11.0 konqueror from 3.5.9 and 4.1 .
Comment 2 Allan Sandfeld 2011-04-01 13:41:00 UTC
The only difference I could spot between KHTML and Firefox is the lack of a margin at the top of the <P> block. This seems to be caused by <P> tags only have margin-bottom and not a margin-top, as a result you will see a vertical space after the P block but not before.

Not sure what correct behavoir is, I could imagine problems with margin-top on P elements for the case:
<h1> Header </h1>
<p>
 Text
Comment 3 Allan Sandfeld 2011-04-01 13:46:58 UTC
Okay, this seems to be somewhat intentional our default stylesheet html4.css has the lines:
li > p {
        margin-top: auto;
/*      margin-bottom: auto;*/
}

Which exactly cancels the margin-top on P elements in LI elements. Not sure why though.
Comment 4 Jose Da Silva 2011-04-03 02:45:19 UTC
Glad to know you found the root problem. It's a start.
Comment 5 Jose Da Silva 2012-02-18 22:20:20 UTC
...just letting you know it's still a problem in KDE Version 4.6.5