RESOLVED DUPLICATE of bug 15359 5789
iframe with height in % within table is not rendered.
https://bugs.webkit.org/show_bug.cgi?id=5789
Summary iframe with height in % within table is not rendered.
Roberto Avanzi
Reported Monday, November 21, 2005 10:03:43 AM UTC
The webpage http://www.akafoe.de (anyway horribly built) is not rendered. In particular, I cannot see some "frames" that appear with Opera (9.0pr1), but "cut off" in the lower part, and that render fine with Firefox (1.5) or Camino (1.0b1). Most likely the cause is a duplicate bug, but cannot track it down.
Attachments
file needed for testcase (114 bytes, text/html)
2005-11-22 13:58 PST, Joost de Valk (AlthA)
no flags
Testcase (315 bytes, text/html)
2005-11-22 13:59 PST, Joost de Valk (AlthA)
no flags
image testcase (297 bytes, text/html)
2006-03-21 15:06 PST, Sam Weinig
no flags
patch (2.59 KB, patch)
2006-03-27 15:15 PST, Sam Weinig
hyatt: review-
Joost de Valk (AlthA)
Comment 1 Tuesday, November 22, 2005 9:57:23 PM UTC
Confirmed, reduced and renamed, uploading testcase in a sec.
Joost de Valk (AlthA)
Comment 2 Tuesday, November 22, 2005 9:58:28 PM UTC
Created attachment 4770 [details] file needed for testcase This file is needed for the testcase i'll upload in a sec.
Joost de Valk (AlthA)
Comment 3 Tuesday, November 22, 2005 9:59:53 PM UTC
Created attachment 4771 [details] Testcase this is a minimal testcase for the bug, using the previously uploaded file.
Eric Seidel (no email)
Comment 4 Wednesday, December 28, 2005 12:22:19 AM UTC
I swear I saw a bug just like this earlier going through bugs, but I can't find it now.
Joost de Valk (AlthA)
Comment 5 Wednesday, December 28, 2005 7:57:32 AM UTC
*** Bug 5592 has been marked as a duplicate of this bug. ***
Joost de Valk (AlthA)
Comment 6 Wednesday, December 28, 2005 7:59:34 AM UTC
Upping the priority on this one, since even 100% height iframe don't get rendered and this bug has been reported on more pages, will enhance the testcase a bit in a second.
Alice Liu
Comment 7 Tuesday, January 10, 2006 10:03:49 PM UTC
Sam Weinig
Comment 8 Tuesday, March 21, 2006 11:02:44 PM UTC
This is actually a bug for all replaced elements (subclasses of RenderReplaced in the the code) in webcore, including images. It seems to stem from the fact that we do not correctly honor the scenerio when a percentage height of an object depends on its containing blocks height, which in turn can only be calculated using the content height of the inner object. My reading of the correct behavior is to have the percentage height compute to the value of 'auto' and then perceed as normal (in the case of an image where there is an intrinsic width and height, by using the specified width in conjuction with the intrinsic ratio (h/w) to calculate the height, or with an iframe, by setting the height to 150px), as can be seen in the section 10.5 of the CSS 2.1 spec. (http://www.w3.org/TR/CSS21/visudet.html#the-height-property). Sidenote: Firefoxes behavior here does not conform with what I am interpreting the spec says, but instead uses the percentage value given to height to give a computed value that is that percent of the size that it should be. I don't know what to make of that.
Sam Weinig
Comment 9 Tuesday, March 21, 2006 11:06:02 PM UTC
Created attachment 7222 [details] image testcase test case with image instread of iframe
Sam Weinig
Comment 10 Tuesday, March 21, 2006 11:11:33 PM UTC
Another thing I should mention is that since this only occurs when the height of the containing block is base on the height of its contents, setting a height for the <td> cell in which the image or iframe resides, causes the problem to disappear.
Dave Hyatt
Comment 11 Wednesday, March 22, 2006 11:54:05 PM UTC
This should not be p1. Putting in p2.
Dave Hyatt
Comment 12 Wednesday, March 22, 2006 11:54:43 PM UTC
P1 = crashers/regressions. :)
Sam Weinig
Comment 13 Monday, March 27, 2006 11:15:14 PM UTC
Created attachment 7342 [details] patch This patch matches the horizontal behavior and in addition to the new test case in the patch, changes the following test cases: fast/replaced/width100percent.html tables/mozilla/bugs/bug137388-2.html tables/mozilla_expected_failures/bugs/bug137388-1.html The last two, however, still do not display correctly as they are missing the requisite files.
Dave Hyatt
Comment 14 Tuesday, April 18, 2006 1:47:53 AM UTC
Comment on attachment 7342 [details] patch Seems like this will do the wrong thing when a height of 0px is explicitly specified. <div style="height:0px"><img style="height:50%"></div>
Sam Weinig
Comment 15 Friday, April 21, 2006 9:45:49 PM UTC
(In reply to comment #14) Hyatt, Your absolutly correct that a container height of 0px would result in the incorrect behavior. This was done to match the horizontal behavior which is also wrong. Just test the horizontal corollary to your example, <div style="width: 0px"><img style="height:50%"></div> and notice that the image is not 0 width. A better/correct behavior would be to check if the containing block has a non-auto height instead of a positive height. Do you think that width should be changed as well?
Alexey Proskuryakov
Comment 16 Thursday, November 2, 2006 6:58:15 PM UTC
*** Bug 10643 has been marked as a duplicate of this bug. ***
David Kilzer (:ddkilzer)
Comment 17 Saturday, February 23, 2008 12:47:05 AM UTC
Most test cases in this bug were fixed by Bug 15359. Sam's test case in Comment #15 doesn't render zero-width, but it does render the same in WebKit r30458 as in Opera 9.2x, Firefox 2 and Firefox 3. I suggest closing this as RESOLVED/FIXED (or marking a duplicate of Bug 15359).
Alexey Proskuryakov
Comment 18 Saturday, June 12, 2010 1:22:05 AM UTC
As David said. Please file separate bugs for any remaining issues, if any. *** This bug has been marked as a duplicate of bug 15359 ***
Note You need to log in before you can comment on or make changes to this bug.