incorrect table rows rendering

RESOLVED DUPLICATE of bug 97506

Status

()

Core
Layout: Tables
RESOLVED DUPLICATE of bug 97506
13 years ago
13 years ago

People

(Reporter: Dmitriy Geels, Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1

The example below causes empty space to be displayed in place of row, which
style.dispay has been set to 'none'.
If 'table-row' is used instead of 'block', everything rendered as it should.

Reproducible: Always
Steps to Reproduce:
<HTML>
<HEAD>
<TITLE>title</TITLE>
</HEAD>
<script type="text/javascript">
function visibilityToggle(id){
	var el = document.getElementById(id);

	if(el.style.display == 'block')
		el.style.display = 'none';
	else
		el.style.display = 'block';
}
</script>
<BODY>
<a href="javascript: visibilityToggle('therow')">click here</a>
<table border=1>
	<tr><th>Header 1<th>Header 2<th>Header 3
	<tr><td>Row 1 Cell 1<td>Row 1 Cell 2<td>Row 1 Cell 3
	<tr style="display: none" id=therow><td>Row 2 Cell 1<td>Row 2 Cell 2<td>Row 2
Cell 3
	<tr><td>Row 3 Cell 1<td>Row 3 Cell 2<td>Row 3 Cell 3
</table>
</BODY>
</HTML>
(Reporter)

Comment 1

13 years ago
Created attachment 164706 [details]
test example

Comment 2

13 years ago
Maybe dupe of Bug 175190? But wouldn't you first need to set cellpadding=0
cellspacing=0 border=0 for your table to get a correct testcase (also when it
might be a dupe)?
(Reporter)

Comment 3

13 years ago
I think, this is not a dupe.

I didn't dig enough in CSS2 specs, but I think, that Gecko renders row with
display:block correctly.
Why IE does it different (the "right") way? Because of way it's support CSS2. It
doesn't support CSS2 specs for 'display' element (ie6 still doesn't).

The bug is that empty space left after changing TR style.display property to 'none'.

Comment 4

13 years ago
The testcase looks very similar to the one in bug 206516:
https://bugzilla.mozilla.org/attachment.cgi?id=147399&action=view

Comment 5

13 years ago
one should toggle between display:none and display:'' and bot block see my
comment in  bug 97506

*** This bug has been marked as a duplicate of 97506 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.