Bug 52100 - Table <td> with 100% height not taking it's sibling <td>'s img content into consideration
Summary: Table <td> with 100% height not taking it's sibling <td>'s img content into c...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tables (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2011-01-07 18:47 PST by Darth
Modified: 2022-09-10 10:29 PDT (History)
10 users (show)

See Also:


Attachments
table td not taking image height into computation (985 bytes, text/html)
2011-01-07 18:48 PST, Darth
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Darth 2011-01-07 18:47:02 PST
Please use the html code from below and try it on webkit vs non-webkit browsers.
The right pane should be all white, thus signifying the table to take 100% of the available height of it's parent td.
However in webkit the height gets computed to 0 hence you see the black background color.

The right pane td is not taking the image in the left pane td into consideration when computing its height.


<html>
<head>

</head>
<body>
	<table width='100%'>
		<tbody>
			<tr>
				<td style='background-color: black; color: white;' width='10%'>
					<!-- This image has a height, that is used to calculate the computer height of the td otherwise this td has no height -->
					<img border="0" src="http://blogoscoped.com/files/google-new-year-logos-2007.png">
				</td>
				<td style='background-color: black; color: white;' height='100%'>
					<!-- This td has a 100% height, that it should use from its sibling td but the images height is not taken into consideration -->
					<table id='shouldTakeAllSpace' height="100%" width="100%" cellspacing="0" cellpadding="0" border="0">
						<!-- This ends up taking no height since its parent has none -->
						<tbody>
							<tr>
								<td width="100%" style="height: 100%; background-color: white; ">
								</td>
							</tr>
						</tbody>
					</table>
				</td>
			</tr>
		</tbody>
	</table>	
</body>
</html>

Downstream bug
http://code.google.com/p/chromium/issues/detail?id=64584
Comment 1 Darth 2011-01-07 18:48:18 PST
Created attachment 78297 [details]
table td not taking image height into computation
Comment 2 Julien Chaffraix 2011-06-13 11:35:46 PDT
Looking at this bug today, I couldn't reproduce the behavior. Darth, could you confirm that it is fixed or point what we are (still) doing wrong as I may be missing something?
Comment 3 Darth 2011-06-13 11:46:10 PDT
I still see the issue on Safari 5.1 and Chrome 14 (Canary).
I could not try a webkit nightly build as I am on Lion (unless you know how to get it to work).

But in Chrome and Safari 5.1, if you open the attachment and then compare it to how it looks in FF4/IE9, you will see the difference.
Comment 4 Ahmad Saleem 2022-09-10 07:28:53 PDT
I am able to reproduce this bug in Safari Technology Preview 153 using attached test case and it does show "right hand side" table in "Black" filled similar to Chrome Canary 107 while Firefox Nightly 107 does not show "Black" filled and show "White / Blank" expected similar to mentioned in Comment 0.

I am changing status to "New" and adding few other Webkit Engineers for their input. Thanks!
Comment 5 Radar WebKit Bug Importer 2022-09-10 10:29:17 PDT
<rdar://problem/99781068>