Bug 17139 - Add support for height property on <tbody> element
Summary: Add support for height property on <tbody> element
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P3 Normal
Assignee: Nobody
Keywords: HasReduction
: 13017 (view as bug list)
Depends on: 3239
  Show dependency treegraph
Reported: 2008-02-01 09:46 PST by Mike Walters
Modified: 2010-06-10 19:22 PDT (History)
10 users (show)

See Also:

Test case (290 bytes, text/html)
2008-02-04 23:38 PST, Chasen Le Hara
no flags Details
Test case (739 bytes, text/html)
2008-02-05 22:34 PST, Chasen Le Hara
no flags Details
Patch (2.81 KB, patch)
2008-05-11 14:32 PDT, Vincent Ricard
darin: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Walters 2008-02-01 09:46:46 PST
tbody works as it should in firefox... IE works but now how expected

  height: 100px;

This should result in the tbody (including all subsequent rows together) to be 100px.

IE does not impliment this correctly and results in every subsequent row height = 100px. Very bad.

Correct result exampel:
tbody = 100px
row1 = 25px
row2 = 50px
row3 = 75px
Comment 1 Chasen Le Hara 2008-02-04 23:38:30 PST
Created attachment 18932 [details]
Test case

Firefox respects the height given to tbody while nightly r29955 does not (confirmed).
Comment 2 Chasen Le Hara 2008-02-05 22:34:51 PST
Created attachment 18954 [details]
Test case

Improved test case.
Comment 3 Mike Walters 2008-02-06 07:50:27 PST
Correct result exampel:
tbody = 100px
row1 = 25px
row2 = 50px
row3 = 75px <-- I meant for this to be 25px
Comment 4 Robert Blaut 2008-02-19 06:10:27 PST
*** Bug 13017 has been marked as a duplicate of this bug. ***
Comment 5 Vincent Ricard 2008-05-11 14:32:05 PDT
Created attachment 21071 [details]

This patch fix the attached test case (but contrary to the previous comments, the test case has 4 rows, doesn't it?)
Comment 6 mitz 2008-05-13 11:27:31 PDT
Comment on attachment 21071 [details]

+        int ch = max(m_grid[r].height.calcMinValue(0), style()->height().calcMinValue(0) / m_gridRows);

Looks like the row heights may not add up to the section height due to rounding.
Comment 7 Darin Adler 2008-05-24 23:06:52 PDT
Comment on attachment 21071 [details]

This seems wrong. It assumes that the height of the <tbody> can be evenly divided by the number of rows. That's clearly not correct when some rows have explicit heights themselves. For example, consider a <tbody> with a height of 100px, containing five rows where the first four rows all are 10px tall. It doesn't make sense to have the fifth row by 20px tall. It should be 60px tall.

We'll need more than one test case for this, too. The test patch needs to include the expected results for the test case. Does this change affect the results of any other test cases? I'd be amazed if it didn't affect any of the hundreds of table test cases we imported from the Mozilla project.

I want to hear Hyatt's take on this too. What is the correct behavior for table sections?