Bug 16788
Summary: | setting the height on a td has no effect | ||
---|---|---|---|
Product: | WebKit | Reporter: | wesleyZeng <weihong.zeng> |
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | CC: | webkit |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
wesleyZeng
the height of the "td1" is 156px in QtLauncher, 60px in firefox and opera;
<table height="320px" width="600px">
<tr>
<td id="td1" align="center" height="120px" bgcolor="red">
<div id="demo" style="height:50%; background-color:blue"></div>
</td>
</tr>
</table>
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Robert Blaut
You set table height to 320px so the only cell in the table should have also 320px minus border-spacing, padding etc. As the result computed height of td is 312px. And it's true in all tested engines: Webkit, Gecko and Presto. Red background of cell indicates real height of td. You set height of descendant div as 50% so it's calculated based on the definition: "The percentage is calculated with respect to the height of the generated box's containing block." [http://www.w3.org/TR/CSS21/visudet.html#propdef-height]. Containing block for the div is td. So a computed height value for the div element should be 156px as it is in Webkit. Other browsers fail this case. The bug report is INVALID.