Closed Bug 351489 Opened 18 years ago Closed 18 years ago

Table cell heights are incorrectly calculated for cells with borders

Categories

(Core :: Layout: Tables, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 248239

People

(Reporter: something-bz, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20060905 Minefield/3.0a1
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20060905 Minefield/3.0a1

In a table with a single cell, setting the cell height actually sets the column height (i.e. the height including top/bottom borders/padding), whereas setting the cell width actually sets the width of the content box (i.e. without borders or padding). This extends to tables with multiple cells.

While CSS does not clearly specify what the row height or cell height is, from the diagram (http://www.w3.org/TR/CSS21/images/tbl-width.png in http://www.w3.org/TR/CSS21/tables.html) it's obvious that the cell height is meant to not include padding - it's the height of the same dash-dot-dot box whose width is the 'cell width'.

Furthermore, setting the width and height of cells does not set the width and height of the content box. This goes against the rest of the box model.

The fix is to calculate all the cell heights, and add padding/borders to calculate row heights.

Reproducible: Always

Steps to Reproduce:
1. Open the attachment.
2.
3.

Actual Results:  
First example shows a 1-by-1px box with 10px border.

Expected Results:  
First example shows a 1-by-21px box with 10px border

Same results in Camino 1.0.2, Firefox 1.5.0.6, Minefield 3.0a1
Component: General → Layout: Tables
Product: Firefox → Core
QA Contact: general → layout.tables
Version: unspecified → Trunk

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

Attachment

General

Creator:
Created:
Updated:
Size: