Closed Bug 477106 Opened 15 years ago Closed 15 years ago

initially hidden td is not shown correctly when the display css property becomes block using javascript

Categories

(Core :: Layout: Tables, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: tasoss, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6 (.NET CLR 3.5.30729)

As i have written i believe that this is wrong.I have tested it with nightly safari,chrome and it's shown correctly.Even IE displays it right.
BTW nightly mozilla build(5/2/2009) doesn't correct it.

Reproducible: Always

Steps to Reproduce:
<html>
  <head>
    <meta name="generator"
          content="HTML Tidy for Windows (vers 12 April 2005), see www.w3.org" />
    <title></title>
  </head>
  <body>
  	
  	<table border='1' style='border:1px solid #ff0000;width:100%;'>
		<tr>
			<td style='display:none;' id='foo'>1</td>
			<td id='bar' style='display:none'>2</td>
			<td>3a</td>
	</table>
	<script>
		document.getElementById("foo").style.display='block';
		document.getElementById("bar").style.display='block';
		</script>
  </body>
</html>



Expected Results:  
The second td is not shown correctly.
Component: General → Layout: Tables
Product: Firefox → Core
QA Contact: general → layout.tables
Version: unspecified → Trunk
Confirming this on Intel Mac platform with Camino nightly trunk build version 2.0b2pre (1.9.0.7pre 2009020512).  

Testcase seems to display correctly with current version of Safari for Mac OS 10.4.11 (to reiterate, on the Intel Mac platform).  I have no way to test this on Leopard.
opera 9.63 displays it wrongly,as firefox does.
This is invalid. The default display value for TD is 'table-cell', not 'block'. Gecko is doing the correct thing.

See (particularly point 7)
http://www.w3.org/TR/CSS21/tables.html#anonymous-boxes

Replacing 'block' with 'table-cell' (or '') in the script makes it display as expected.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
thanks philippe and sorry for the upset.
btw i suppose that acid tests are not the perfect way to test for standards, as safari nightly scores 100% but it doesn't displays it correctly...
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: