Closed Bug 46815 Opened 24 years ago Closed 24 years ago

Table cell too wide

Categories

(Core :: Layout: Tables, defect, P3)

x86
Windows 98
defect

Tracking

()

VERIFIED DUPLICATE of bug 46693

People

(Reporter: jhaitas, Assigned: waterson)

References

()

Details

(Keywords: regression, testcase)

Attachments

(1 file)

the left column is not rendering properly with build 2000072708 (nightly build
from thursday, july 27)... this page was rendering fine yesterday with the
nightly build from wednesday, july 26...
I should have recommended the bug helper or 
http://www.mozilla.org/quality/bug-writing-guidelines.html .

"rendering properly" is not information enough. I would say that a table cell 
has gotten too wide creating a gap between the left graphic, middle graphic and 
right graphic. 

The only table changes yesterday was made by rbs@maths.uq.edu.au so I cc him and 
change component.

I see this on a current CVS (not branch) build. 

Haitas, is fou got the time, you could download the page and remove as much as 
possible of the html code while still seing the bug. That would help when 
searching for the fix.
Assignee: clayton → karnaze
Status: UNCONFIRMED → NEW
Component: Layout → HTMLTables
Ever confirmed: true
QA Contact: petersen → desale
Summary: page rendering problem → Table cell too wide
Not sure if my changes went into the nightlies. In principle, they shouldn't
affect width caculcalation. Also, there has been a bunch of other changes
throughout layout. Without much decomposition of this bug into a simplified 
testcase, it is hard to exactly pinpoint where the regression comes from. 
jhaitas, see also the summarized instructions on the BugAThon page:
http://www.mozilla.org/newlayout/bugathon.html
Cc:ing hyatt,waterson,attinasi and dbaron who also checked in code in layout. 
Maybe one of you know that it's your bug. It's probably easier to remember what 
you've done today than in a couple of months.
Keywords: regression
Based on the dates given in the original entry in this bug, was the wrong day's
(layout-related) hook cc:ed?
Possibly. I'm not sure when the nightly builds are done. But then again, noone 
else but the ones on this bug did anything in layout the day before.
Please, somebody decompose this. I have tried but it is pretty big and there are 
several HTML errors that seem benign, but may be problems in combination.

For example, when I clean up just HEAD and the 'Resources' section (double 
nested table) it renders fine... This is not critical enough for me to spend a 
long time decomposing right now, sorry.

Example: fixed up 'Resources' section works fine.

<html>
<head>
<title>x.themes.org</title>
<style type="text/css">
	
BODY,P,DIV,LI,UL,TD,EM,FONT,BLOCKQUOTE,FORM{font-family:Helvetica,Lucida,sans-se
rif;}   
	A{text-decoration:none;}   
	.NO-IN{margin-left:-25;}
</style>
</head>

<BODY TEXT="#222222" BGCOLOR="#B2B2B2" ALINK="#000000" LINK="#000000" 
VLINK="#000000">

<table width="100%" height="100%" cellpadding=0 cellspacing=0 border=0>  
<tr>    
	<td colspan=4 align=center valign="top">
	  <a href="http://resources.themes.org">
	    <img src="http://images.themes.org/templates/resources/logo.gif" 
border="0" width="337" height="100" alt="r.t.o" valign="top">
	  </a>
	  <p>
	</td>  
</tr>  
<tr>    
    <td width="160" align="right" valign="top">
	  <img src="http://images.themes.org/128.gif" width=160 alt="" 
height="1" valign="top">
	  <TABLE WIDTH=160 CELLPADDING=0 CELLSPACING=0 BORDER=0>     
	    <TR>    
		  <TD ALIGN=LEFT VALIGN=BOTTOM WIDTH=25 HEIGHT=25>
		    <img 
src="http://images.themes.org/templates/resources/menu.left.gif" width=25 
height=25 alt="">
		  </TD>    
		  <TD ALIGN=CENTER valign=middle 
BACKGROUND="http://images.themes.org/templates/resources/menu.middle.gif" 
HEIGHT="25" width="128">
		    <FONT color="#000000">Resources</FONT>
	      </TD>    
	      <TD ALIGN=RIGHT VALIGN=BOTTOM WIDTH=7 HEIGHT=25>
		    <img 
src="http://images.themes.org/templates/resources/menu.right.gif" width=7 
height=25 alt="">
		  </TD>  
		</TR>  
		<tr>    
		  <td colspan=3 bgcolor="#969696">
		    <a href="/viewresources.phtml?type=font">
		      <small>Fonts</small>
			</a>
			<br>
			<a href="/viewresources.phtml?type=tile">
			  <small>Tiles</small>
			</a>
			<br>
			<a href="/viewresources.phtml?type=background">
			  <small>Backgrounds</small>
			</a>
			<br>
			<a href="/viewresources.phtml?type=bar">
			  <small>Bars</small>
			</a>
			<br>
			<a href="/viewresources.phtml?type=epplet">
			  <small>Epplets</small>
			</a>
			<br>
			<a href="/viewresources.phtml?type=xdm">
			  <small>XDM Setups</small>
			</a>
			<br>
			<a href="/viewresources.phtml?type=xdefault">
			  <small>Xdefaults</small>
			</a>
			<br>
			<a href="/viewresources.phtml?type=bashish">
			  <small>Bashish Themes</small>
			</a>
			<br>
			<a href="/viewresources.phtml?type=chrome">
			  <small>Mozilla Chromes</small>
			</a>
			<br>
		  </TD>  
		</TR>
	</TABLE>
	</TR>
</TABLE>
</BODY>
</HTML>
My changes were the only changes in the table land. I tested the page with
another build that only has these changes, and didn't see the problem :-)
Attached file Minimal testcase
I've minimized the page and figured out what happens. The cell that is forced 
too wide is a cell with text seperated with <br>. Like:

text1<br>text2<br>text3 and text4<br>

When the table cell width is calculated, for some reason the <br> is skipped so 
the cell is made as wide as "text1text2text3" which is the widest text fragment. 

Waterson, didn't you touch code that could cause this? Could your code has 
missed that text is broken by <br>? 

I attached the testcase. Hopefully it will be easy to fix now.
Keywords: testcase
Ah, then this was my change that caused the regression. See also bug 46693. I 
think this is fixed, but I'll take the bug and make sure. Thanks for minimizing 
the test case!
Assignee: karnaze → waterson
Status: NEW → ASSIGNED
Target Milestone: --- → M18
Curled from n.p.m.layout:

> Subject: Wide table cell question
>    Date: 2 Aug 2000 00:57:54 GMT
>    From: decklin+usenet@red-bean.com (Decklin Foster)
> 
> Can someone tell me what (bad HTML, existing bug, bug that needs to be
> filed) is causing the left column in this page to be laid out
> incorrectly? I am using a CVS trunk build from 8/1.
> 
> http://sapphire.sourceforge.net/
> 
> The column should be rather narrow, but it stretches out to
> approximately the word `X11' in the header image.
The testcase WFM under WinNT 2000080714.
QA Contact: desale → chrisd
Works for me too (W2k build from 2000-08-19). Waterson, have you already fixed 
this bug?
Yes, I should have dup'd this long ago. Sorry about that.

*** This bug has been marked as a duplicate of 46693 ***
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
Verified dup of 46693 which is fixed.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: