Bug 3297 - height property is not honored on table rows
Summary: height property is not honored on table rows
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tables (show other bugs)
Version: 412
Hardware: PC OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords: HasReduction
Depends on:
Blocks: 3242 7242
  Show dependency treegraph
 
Reported: 2005-06-07 06:33 PDT by Omar Kilani
Modified: 2006-05-25 15:06 PDT (History)
6 users (show)

See Also:


Attachments
Another testcase (1005 bytes, text/html)
2005-06-08 05:24 PDT, Matias Larsson
no flags Details
Patch (1.93 KB, patch)
2006-05-20 08:45 PDT, mitz
no flags Details | Formatted Diff | Diff
Patch, including change log and updated layout test results (127.42 KB, patch)
2006-05-24 11:25 PDT, mitz
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Omar Kilani 2005-06-07 06:33:22 PDT
The CSS height property is ignored on table rows.

Test cases:

1. height applied to tr elements.

http://aurore.net/safari/tr.html

2. height applied to td elements.

http://aurore.net/safari/td.html

Results:

Safari misrenders the table if height is applied to tr elements. It generally
ignores the height property. Sometimes the first row gets the correct height,
and all other rows get auto height.

Works fine if height is applied to td elements.
Comment 1 Matias Larsson 2005-06-08 05:24:53 PDT
Created attachment 2147 [details]
Another testcase
Comment 2 Matias Larsson 2005-06-08 05:26:09 PDT
Same behaviour on Mac OS X 10.3.9 / Safari 1.3 (v312)
Comment 3 Alexey Proskuryakov 2005-10-30 00:53:30 PDT
Uploaded yet another test case to <http://nypop.com/~ap/webkit/rowheight.html>. Safari, Firefox and 
WinIE all render it differently:
- Firefox always honors the height (Opera 8.50 does the same);
- WinIE sets the height to 1 if the row is empty, honors it otherwise.

The test case includes a rather weird usage from www.fenzin.ru - <tr height=9><td><img src="images/
spacer.gif" border=0 hspace=0 vspace=0 width=1 height=6 align=left></td></tr> (why specify a 
different height for the spacer image itself?).
Comment 4 Eric Seidel (no email) 2005-12-27 14:14:07 PST
Still a bug in TOT.
Comment 5 Nicholas Shanks 2006-03-16 05:23:47 PST
(In reply to comment #3)
> why specify a different height for the spacer image itself?

Perhaps the other three pixels are intercell spacing?
Perhaps the web developer can't tell the difference between 6 and 9?
Comment 6 mitz 2006-04-19 08:21:01 PDT
The main culprit here is in RenderTableSection::calcRowHeight() at RenderTableSection.cpp:293:

        int pos = rowPos[r + 1] + ch + spacing;

should really be

        int pos = rowPos[r] + ch + spacing;

That change alone fixes a few of the table layout tests, but breaks a few others, so there's further tweaking that needs to be done beyond that.
Comment 7 mitz 2006-05-20 08:45:53 PDT
Created attachment 8437 [details]
Patch
Comment 8 mitz 2006-05-24 11:25:32 PDT
Created attachment 8516 [details]
Patch, including change log and updated layout test results

Note that the patch doesn't include updated pixel results (or checksums).
Comment 9 Dave Hyatt 2006-05-24 12:11:33 PDT
Comment on attachment 8516 [details]
Patch, including change log and updated layout test results

r=me... did you go over the tests to make sure the new renderings are all correct?
Comment 10 mitz 2006-05-24 12:23:32 PDT
(In reply to comment #9)
> (From update of attachment 8516 [details] [edit])
> r=me... did you go over the tests to make sure the new renderings are all
> correct?
> 

Yes :-)
There is one test that the patch will break if applied before the patch for bug 9012. (I didn't include the broken results in the patch).