Table cell heights are incorrectly calculated for cells with borders

RESOLVED DUPLICATE of bug 248239

Status

()

Core
Layout: Tables
RESOLVED DUPLICATE of bug 248239
11 years ago
11 years ago

People

(Reporter: T. Chan, Unassigned)

Tracking

Trunk
PowerPC
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

11 years ago
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
(Reporter)

Comment 1

11 years ago
Created attachment 236887 [details]
Example page showing render bugs
Component: General → Layout: Tables
Product: Firefox → Core
QA Contact: general → layout.tables
Version: unspecified → Trunk

Comment 2

11 years ago

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