Closed Bug 297562 Opened 20 years ago Closed 18 years ago

Nested table with percent width renders too wide randomly

Categories

(Firefox :: General, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bantonj, Unassigned)

Details

(Whiteboard: CLOSEME - 05/23 [needs-testcase])

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

With a table nested in another table that has its width set to a percent
randomly the table is rendered with the width too wide. It happens more often on
an initial load of the page, and is always corrected with a refresh.

Reproducible: Sometimes

Steps to Reproduce:
1.Initial load of page.
2.Or on random refreshes or links back to page.
3.

Actual Results:  
The table was rendered too wide.

Expected Results:  
Rendered the table to same way it renders it every other time.

Here is some example code.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Welcome to NFN Box</title>
<link href="nfn.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)
x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;
for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>

<body onLoad="MM_preloadImages('images/nfn_logo_o.gif')">


<table width="95%"  border="0">
  <tr>

    <td width="20%" valign="top" align="left"><img src="images/spacer.gif"
height="40" width="100"><br>
	<table width="100%" class="border" cellpadding="0" cellspacing="0"><td
width="100%">
	<img src="images/newest_additions.gif"><br />
	
<h2><a href="films.php?film_id=51">BOARDWALK: Greetings from Wildwood by the
Sea&nbsp;&nbsp;</a></h2><div style="color:#00FFFF" border-top>
<h2><a href="films.php?film_id=53">Killing Seeds: Gene Giants Mandate New Serf
Age&nbsp;&nbsp;</a></h2><div style="color:#00FFFF" border-top>
<h2><a href="films.php?film_id=47">Maybe We're Talking About a Different
God&nbsp;&nbsp;</a></h2><div style="color:#00FFFF" border-top>
<h2><a href="films.php?film_id=40">The Treasure Maker&nbsp;&nbsp;</a></h2><div
style="color:#00FFFF" border-top>
<h2><a href="films.php?film_id=41">Old Man River&nbsp;&nbsp;</a></h2><div
style="color:#00FFFF" border-top>

<h2><a href="films.php?film_id=42">Passages&nbsp;&nbsp;</a></h2><div
style="color:#00FFFF" border-top>
<h2><a href="films.php?film_id=43">Boys to Men? --
Al-Tran&nbsp;&nbsp;</a></h2><div style="color:#00FFFF" border-top>
<h2><a href="films.php?film_id=44">Going Out Of
Business&nbsp;&nbsp;</a></h2><div style="color:#00FFFF" border-top>
</td></table></td>
    <td width="70%" align="center" valign="top"><center>
  <a href="/" onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('nfn_logo','','images/nfn_logo_o.gif',1)">
  <img src="images/nfn_logo.gif" alt="nfn_logo" name="nfn_logo" width="104"
height="100" border="0"></a><br></center>
<h3 class="tiny"><form method="POST" action="search.php">
<input type="text" name="query" size="60"><br>
<center><input type="SUBMIT" value="Search!">
&nbsp;&nbsp;<a href="/asearch.php">Advanced Search</a></center></form></h3><br>

<h5><table width="100%" align="center" class="border" cellpadding="0"
cellspacing="0">
<tr>
<td width="25%" colspan="4" align="center"><img
src="images/categories.gif"></td></tr>
<tr>
<td width="25%" align="left">
      &nbsp;<a href="/search.php?query=">List All</a><br>
	  &nbsp;<a href="/genre.php?genre=addiction">Addiction</a><br>
	  &nbsp;<a href="/genre.php?genre=advocacy">Advocacy</a><br>
	  &nbsp;<a href="/genre.php?genre=african_american">African American</a><br>

	  &nbsp;<a href="/genre.php?genre=aids">AIDS</a><br>
	  &nbsp;<a href="/genre.php?genre=american_goverment">American
<br>&nbsp;Government</a><br>
	  &nbsp;<a href="/genre.php?genre=american_history">American History</a><br>
	  &nbsp;<a href="/genre.php?genre=animals">Animals</a><br>
	  &nbsp;<a href="/genre.php?genre=anthropology">Anthropology</a><br>
	  &nbsp;<a href="/genre.php?genre=art">Art</a><br>

	  &nbsp;<a href="/genre.php?genre=artifacts">Artifacts</a><br>
	  &nbsp;<a href="/genre.php?genre=asian_american">Asian American</a><br>
	  &nbsp;<a href="/genre.php?genre=biography">Biography</a><br>
	  
</td>
<td width="25%" align="left">
    <a href="/genre.php?genre=boys">Boys</a><br>
	<a href="/genre.php?genre=business">Business</a><br>

	<a href="/genre.php?genre=central_america">Central America</a><br>
	<a href="/genre.php?genre=communications">Communications</a><br>
	<a href="/genre.php?genre=community">Community</a><br>
	<a href="genre.php?genre=criminal_justice">Criminal Justice</a><br>
	<a href="/genre.php?genre=culture">Culture</a><br>
	<a href="/genre.php?genre=discrimination">Discrimination</a><br>

	<a href="/genre.php?genre=econimic_justica">Economic Justice</a><br>
	<a href="/genre.php?genre=entertainment">Entertainment</a><br>
	<a href="/genre.php?genre=environment">Environment</a><br>
	<a href="/genre.php?genre=gardening">Gardening</a><br>
	<a href="/genre.php?genre=gay_lesbian">Gay/Lesbian</a><br>
	
</td>

<td width="25%" align="left">
    <a href="/genre.php?genre=gender_issues">Gender Issues</a><br>
	<a href="/genre.php?genre=geography">Geography</a><br>
	<a href="/genre.php?genre=health">Health</a><br>
	<a href="/genre.php?genre=history">History</a><br>
	<a href="/genre.php?genre=human_rights">Human Rights</a><br>
	<a href="/genre.php?genre=immigration">Immigration</a><br>

	<a href="/genre.php?genre=international">International</a><br>
	<a href="/genre.php?genre=law_society">Law & Society</a><br>
	<a href="/genre.php?genre=media">Media</a><br>
	<a href="/genre.php?genre=medicine">Medicine</a><br>
	<a href="/genre.php?genre=music">Music</a><br>
	<a href="/genre.php?genre=nature">Nature</a><br>

	<a href="/genre.php?genre=performing_arts">Performing Arts</a><br>
</td>
<td width="25%" align="left">
    
	<a href="/genre.php?genre=political_science">Political Science</a><br>
	<a href="/genre.php?genre=popular_culture">Popular Culture</a>
	<a href="/genre.php?genre=psychology">Psychology</a><br>
	<a href="/genre.php?genre=racial_justice">Racial Justice</a><br>

	<a href="/genre.php?genre=religion">Religion</a><br>
	<a href="/genre.php?genre=self_help">Self Help</a><br>
	<a href="/genre.php?genre=social_studies">Social Studies</a><br>
	<a href="/genre.php?genre=south_america">South America</a><br>
	<a href="/genre.php?genre=sports">Sports</a><br>
	<a href="/genre.php?genre=transportation">Transportation</a><br>

	<a href="/genre.php?genre=travel">Travel</a><br>
	<a href="/genre.php?genre=war">War</a><br>
	<a href="/genre.php?genre=women">Women</a><br>
	<a href="/genre.php?genre=youth">Youth</a><br>
</td></h5></tr></table></td>

  </tr>
  <tr>

    <td>&nbsp;</td>
    <td><center>©2005 National Film Network</center></td>
    <td>&nbsp;</td>
  </tr>
</table>

</body>
</html>
Do you have an url? Or a testcase that shows the bug?
Can you still reproduce this in the latest nightly trunk build?
http://ftp.scarlet.be/pub/mozilla.org/firefox/nightly/latest-trunk/
(In reply to comment #1)
> Do you have an url? Or a testcase that shows the bug?
> Can you still reproduce this in the latest nightly trunk build?
> http://ftp.scarlet.be/pub/mozilla.org/firefox/nightly/latest-trunk/

I am experiencing the exact same problem and have been for quite some time.
Though not always on initial load of page, width of nested table will randomly
increase to 100% on random refresh or link back to page. I have reproduced this
on 4 different machines, both Linux and Windows on versions 0.9.1 through to
current 1.0.4. I have not tried the latest trunk build yet. Here is an example
page http://www.firehall.com/patch.php. 

Steps to reproduce:
1. sometimes on initial page load
2. resort list by date/description a few times and behaviour described above
will occur a number of times. 
BACKGROUND:

This is occuring on Windows XP version 2002 SP2, FireFox 1.0.4

URL: http://www1.shepherdcentre.com.au/index.php?option=com_frontpage&Itemid=1

The behaviour is as follows:

*- Open the URL directly : approx 50% of renders are wider (by approx 20 pixels)
*- Click on LINK : using the menu item "The Shepherd Centre" to access the same
URL : approx 50% renders are wide 

BUT 

*- Refreshing the URL supplied above will always render correctly
*- Opening a local html file with the same html code (and support files from the
server) is ALWAYS rendered correctly

ADDITIONAL NOTES:

The table id="main" has its TBODY Rendered too wide (according to the DOM
Inspector).

Thanks

Paul Neumeyer

Random Sea Pty Ltd

 
WFM with current trunk build.
Can you reproduce this with a nightly trunk build?
http://ftp.scarlet.be/pub/mozilla.org/firefox/nightly/latest-trunk/
Is this bug still reproducible with a recent trunk nightly? If so, can you please attach a reduced testcase?

http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/
Whiteboard: CLOSEME - 05/23 [needs-testcase]
Closing as WORKSFORME per comment 4.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.