Open Bug 221855 Opened 21 years ago Updated 2 years ago

empty list items are rendered incorrectly

Categories

(Core :: Layout: Block and Inline, defect, P3)

defect

Tracking

()

People

(Reporter: th.v.d.gronde, Unassigned)

References

(Depends on 1 open bug)

Details

(Keywords: testcase, Whiteboard: DUPEME)

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4.1) Gecko/20031008
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4.1) Gecko/20031008

A list with an empty list item, as in the following list:
<ul>
<li>
<li>something
</ul>
Is rendered as a single line with the two bullets on top of each other (this is
especially visible when using ordered lists) in Quirks mode, in Standards mode
it seems to be rendered more or less correct.
A list with an empty list item as in:
<ul>
<li>something
<li>
</ul>
Is rendered as one and a half line in Standards mode and more or less correctly
in Quirks mode (although the spacing after the list is messed up).
I tested this by creating very simply html documents that contain only a couple
of lists (like the ones above) with some text in between. I created them both
with and without doctype to switch between Quirks and Standards mode (Standards
or Almost standards did not seem to make a difference).
Adding a </li> helped in all cases.

Reproducible: Always

Steps to Reproduce:
1. Create an html document containing an ordered or unordered list with one or
more empty <li>'s without </li>'s (and zero or more non-empty <li>'s).
2. View the html document.


Actual Results:  
The list items are partly on top of each other (in what way exactly depends on
the layout mode). 

Expected Results:  
Not show them on top of each other (as it does when you add </li>'s).
This also shows what happens when you add </li>'s (with </li>'s there is no
difference between Quirks mode and Standards mode).
I also see this in the 1.5RC2 build on Win98
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5) Gecko/20030925)
Present in Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6b) Gecko/20031208
Keywords: testcase
I get the bug with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b)
Gecko/20040102 Firebird/0.7+
Quirks mode looks good, Standards mode looks screwey

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7a) Gecko/20040113 Firebird/0.8.0+

*** This bug has been marked as a duplicate of 226880 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
This bug is older and has better testcases.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
*** Bug 226880 has been marked as a duplicate of this bug. ***
Status: UNCONFIRMED → NEW
Depends on: 194831
Ever confirmed: true
*** Bug 232853 has been marked as a duplicate of this bug. ***
Blocks: 232853
*** Bug 262051 has been marked as a duplicate of this bug. ***
*** Bug 269745 has been marked as a duplicate of this bug. ***
Present in Firefox 1.0.4.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511
Firefox/1.0.4
*** Bug 305189 has been marked as a duplicate of this bug. ***
Note that adding </LI> doesn't always fix the issue:
  http://neil.fraser.name/li-bug2.html
Adding any empty tag (e.g. <B></B>) within the <LI></LI> will respawn this bug.
*** Bug 323917 has been marked as a duplicate of this bug. ***
*** Bug 332354 has been marked as a duplicate of this bug. ***
Seeing this also. Additional test cases where it happens and not happens are here:

http://enrogue.com/libug/1.html (bug present)
http://enrogue.com/libug/2.html (bug not present)

The two docs are identical apart from the LI being, in 1.html:
  <li>
  </li>
and in 2.html:
  <li></li>
*** Bug 363167 has been marked as a duplicate of this bug. ***
dupe to bug 63741 or bug 179596?
which are older than Felix's bug 194831 could also be duped to one of these?
Just found this bug too with the following case:
<li> </li> (space between opening and closing LI)
Assignee: layout.block-and-inline → nobody
OS: Windows XP → All
Hardware: x86 → All
QA Contact: ian → layout.block-and-inline
David, this seems to be fixed on tip, right?
Flags: needinfo?(dbaron)
Er, I guess it's still a problem in standards mode in at least some cases (e.g. the bug 1406210 testcases, but not the ones in this bug?).
Flags: needinfo?(dbaron)
We had the following style [1] that causes the test in comment 28 renders differently in quirks mode.

li > ul:-moz-first-node,
li > ol:-moz-first-node {
  padding-block-start: 1em;
}

https://searchfox.org/mozilla-central/rev/72b1e834f384a2ffec6eb4ce405fbd4b5e881109/layout/style/res/quirk.css#29-39
Priority: P1 → P3
Severity: normal → S3

The severity field for this bug is relatively low, S3. However, the bug has 12 duplicates.
:jfkthame, could you consider increasing the bug severity?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jfkthame)

The last needinfo from me was triggered in error by recent activity on the bug. I'm clearing the needinfo since this is a very old bug and I don't know if it's still relevant.

Flags: needinfo?(jfkthame)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: