cells with no text content don't calculate their height correctly

RESOLVED DUPLICATE of bug 271955

Status

()

Core
Layout: Tables
RESOLVED DUPLICATE of bug 271955
15 years ago
13 years ago

People

(Reporter: Hixie (not reading bugmail), Unassigned)

Tracking

({qawanted, testcase})

Trunk
x86
Windows 2000
qawanted, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
STEPS TO REPRODUCE
   http://www.hixie.ch/tests/adhoc/css/box/table/014.html

ACTUAL RESULTS
   Cell top and bottom borders end up overlapping with the content on top of 
   them.

EXPECTED RESULTS
   Same as when there is text, as in: 
      http://www.hixie.ch/tests/adhoc/css/box/table/015.html

Better test case(s) would be nice.

Comment 1

15 years ago
this is caused by
http://lxr.mozilla.org/seamonkey/source/layout/html/table/src/nsTableCellFrame.cpp#934

932   // 0 dimensioned cells need to be treated specially in Standard/NavQuirks
mode 
933   // see testcase "emptyCells.html"
934   if ((0 == kidSize.width) || (0 == kidSize.height)) { // XXX why was this &&
935     SetContentEmpty(PR_TRUE);
936     if (NS_UNCONSTRAINEDSIZE == kidReflowState.availableWidth) {
937       // need to reduce the insets by border if the cell is empty
938       leftInset   -= border.left;
939       rightInset  -= border.right;
940       topInset    -= border.top;
941       bottomInset -= border.bottom;
942     }
943   }

The empty cell blues ......

Comment 2

15 years ago
and changing the || back to && would fix this but would require to test for all
those quirks.

Comment 3

15 years ago
this bug is probably related to bug 76331

Comment 4

15 years ago
Created attachment 128452 [details]
testcase

Testcase looks slightly different than url's mentioned above due to removal of
some css, problem is still visible though.
What I don't understand, but someone else might, is that everything renders
fine when, in the css part, the "width: 10em" is moved from td{} to div{}.

Updated

15 years ago
Attachment #128452 - Attachment mime type: text/plain → text/html

Updated

15 years ago
Keywords: testcase

Comment 5

13 years ago
WFM, 2005-03-06-05 trunk Windows XP
WFM, 2005-03-04-05 trunk Linux

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