If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

table width calculation doesn't account for border width

RESOLVED DUPLICATE of bug 71850

Status

()

Core
Layout
RESOLVED DUPLICATE of bug 71850
17 years ago
17 years ago

People

(Reporter: Kathleen Brade, Assigned: karnaze (gone))

Tracking

Trunk
mozilla1.0
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

17 years ago
It appears that when calculating the layout width of a table (that is 100%), 
somewhere we are only accounting for one half of the border (the left or right 
side but not both).  With a table at 100% width of window, I see a scrollbar 
appear.

I expect that the scrollbar shouldn't appear (and the entire border be visible) 
OR that the scrollbar appears and the width of the table (excluding all border) 
is 100% and the border * 2 is the extra distance to be scrolled.

Right now, the table seems to be following the CSS spec
(http://www.w3.org/TR/REC-CSS2/tables.html#)
Created attachment 27889 [details]
testcase where we're not following the CSS spec
Relevant quote from CSS2 is
http://www.w3.org/TR/REC-CSS2/tables.html#collapsing-borders in the paragraph
right after the figure:

  Note that in this model, the width of the tabel includes half the table border.

We seem to be *moving* the width so we can fit all of the border in the
containing block, and the total overflow width is also 2*border-width instead of
1*border-width. (see above testcase)

Comment 3

17 years ago
just an fyi, using the build from 2001031204 on win98, I did not see this 
behavior, I downloaded today's build (20010304) and I see the issue that Kathy 
has raised.
(Assignee)

Comment 4

17 years ago
brade, if you are commenting on tables in the separate border model, then I am 
not seeing the problem you describe in the following:

<table border width=100%> 
 <tr> 
  <td>foo</td> 
 </tr> 
</table>

If you have a better example, please mark this as m0.9, because it represents a 
serious regression.

If you are referring to the collapsing border model (as dbaron's example 
illustrates) then that has been turned off for quite a while. Assumming the 
later, I'm marking this m1.0 to coincide with the new collapsing border code. 
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.0
Oops, I forgot the CBM was turned off.

So maybe this is just a dup of bug 71850?
Yeah, it is.  The fix fixes my testcase and I'm it would also explain the
problem brade was seeing.

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