WebCore:
Reviewed by Darin.
- fix http://bugs.webkit.org/show_bug.cgi?id=15359
JPEG image not shown when height is specified as percentage inside a table
The problem occurs when a replaced element (image, canvas, etc.) with
a percent-height attribute is contained by a table cell with an auto-
or percent-height attribute. If there are no other conditions to cause
the table cell's height to expand, an available height of zero will
always be returned. In these cases, the intrinsic height of the
replaced element should be used if it is greater than the available
height of the table cell.
Tests: fast/replaced/table-percent-height.html
tables/mozilla/bugs/bug137388-1.html
tables/mozilla/bugs/bug137388-2.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::calcReplacedHeightUsing):
LayoutTests:
Reviewed by Darin.
- test for http://bugs.webkit.org/show_bug.cgi?id=15359
JPEG image not shown when height is specified as percentage inside a table
This test was added specifically for this bug. It tests the height of
replaced elements (canvas, embed, img, object, button, input, isindex,
select, textarea ) within table cells.
* fast/replaced/table-percent-height-expected.txt: Added.
* fast/replaced/table-percent-height.html: Added.
These test results were updated because they are more correct.
* platform/mac/fast/replaced/width100percent-image-expected.checksum: Updated.
* platform/mac/fast/replaced/width100percent-image-expected.png: Updated.
* platform/mac/fast/replaced/width100percent-image-expected.txt: Updated.
Moved tests and results for these two tests from tables/mozilla_expected_failures/bugs
to tables/mozilla/bugs since these results have been fixed.
* platform/mac/tables/mozilla/bugs/bug137388-1-expected.checksum: Copied from LayoutTests/platform/mac/tables/mozilla_expected_failures/bugs/bug137388-1-expected.checksum.
* platform/mac/tables/mozilla/bugs/bug137388-1-expected.png: Copied from LayoutTests/platform/mac/tables/mozilla_expected_failures/bugs/bug137388-1-expected.png.
* platform/mac/tables/mozilla/bugs/bug137388-1-expected.txt: Copied from LayoutTests/platform/mac/tables/mozilla_expected_failures/bugs/bug137388-1-expected.txt.
* platform/mac/tables/mozilla/bugs/bug137388-2-expected.checksum: Copied from LayoutTests/platform/mac/tables/mozilla_expected_failures/bugs/bug137388-2-expected.checksum.
* platform/mac/tables/mozilla/bugs/bug137388-2-expected.png: Copied from LayoutTests/platform/mac/tables/mozilla_expected_failures/bugs/bug137388-2-expected.png.
* platform/mac/tables/mozilla/bugs/bug137388-2-expected.txt: Copied from LayoutTests/platform/mac/tables/mozilla_expected_failures/bugs/bug137388-2-expected.txt.
* platform/mac/tables/mozilla_expected_failures/bugs/bug137388-1-expected.checksum: Removed.
* platform/mac/tables/mozilla_expected_failures/bugs/bug137388-1-expected.png: Removed.
* platform/mac/tables/mozilla_expected_failures/bugs/bug137388-1-expected.txt: Removed.
* platform/mac/tables/mozilla_expected_failures/bugs/bug137388-2-expected.checksum: Removed.
* platform/mac/tables/mozilla_expected_failures/bugs/bug137388-2-expected.png: Removed.
* platform/mac/tables/mozilla_expected_failures/bugs/bug137388-2-expected.txt: Removed.
* tables/mozilla/bugs/bug137388-1.html: Copied from LayoutTests/tables/mozilla_expected_failures/bugs/bug137388-1.html.
* tables/mozilla/bugs/bug137388-2.html: Copied from LayoutTests/tables/mozilla_expected_failures/bugs/bug137388-2.html.
* tables/mozilla_expected_failures/bugs/bug137388-1.html: Removed.
* tables/mozilla_expected_failures/bugs/bug137388-2.html: Removed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29039
268f45cc-cd09-0410-ab3c-
d52691b4dbfc