WebCore:
authorbdakin <bdakin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Apr 2007 19:58:20 +0000 (19:58 +0000)
committerbdakin <bdakin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Apr 2007 19:58:20 +0000 (19:58 +0000)
commit81b7bda043e8483d6f14b0d33e6e9a61b27df540
treeb7163d2fb268019b17a68533e9a080f77fa7f45d
parentffb834ac79388e223f459f232c6b4838a29fa1a2
WebCore:
       Reviewed by Hyatt.

        Fix for <rdar://problem/5120889> Sized table cells w/borders not
        drawn to correct size

        When table cells have children with %-height, the cells were
        incorrectly shrinking down to be the size of the child. This
        exposed another problem with replaced children and sizing.

        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::calcReplacedHeightUsing): The exposed problem.
        Subtract our borders and padding in the auto or percent table cell
        containing block case.
        * rendering/RenderTableSection.cpp:
        (WebCore::RenderTableSection::layoutRows): When our children can
        flex, do not always set the cellTopExtra and cellBottomExtra to 0!
        That is bad! We should do the same as the non-flex case.

Layout Tests:
        Reviewed by Hyatt.

        Series of new/rearranged results after fix for <rdar://problem/
        5120889> Sized table cells w/borders not drawn to correct size

        These tests are different by tiny, barely noticeable amounts. The
        new results are more correct. We didn't catch the problem before
        because it was so subtle here:
        * fast/replaced/width100percent-expected.txt:
        * fast/table/003-expected.checksum:
        * fast/table/003-expected.png:
        * fast/table/003-expected.txt:

        This is the test that exposed the other problem with replaced
        children. Now we fit snugly inside the border on the bottom, which
        is different than Firefox, but seems right.
        * tables/mozilla/bugs/bug131020-expected.checksum:
        * tables/mozilla/bugs/bug131020-expected.png:
        * tables/mozilla/bugs/bug131020-expected.txt:

        This test actually always failed and was incorrectly filed as a
        success. Moving to failures.
        * tables/mozilla/bugs/bug137388-2-expected.checksum: Removed.
        * tables/mozilla/bugs/bug137388-2-expected.png: Removed.
        * tables/mozilla/bugs/bug137388-2-expected.txt: Removed.
        * tables/mozilla/bugs/bug137388-2.html: Removed.
        * tables/mozilla_expected_failures/bugs/bug137388-2-expected.checksum: Added.
        * tables/mozilla_expected_failures/bugs/bug137388-2-expected.png: Added.
        * tables/mozilla_expected_failures/bugs/bug137388-2-expected.txt: Added.

        This test was actually wrong before, and now it is right!
        * tables/mozilla/bugs/bug149275-2-expected.checksum:
        * tables/mozilla/bugs/bug149275-2-expected.png:
        * tables/mozilla/bugs/bug149275-2-expected.txt:

        This was a failing test that now passes. YAY!
        * tables/mozilla/bugs/bug18440-expected.checksum: Added.
        * tables/mozilla/bugs/bug18440-expected.png: Added.
        * tables/mozilla/bugs/bug18440-expected.txt: Added.
* tables/mozilla_expected_failures/bugs/bug18440-expected.checksum: Removed.
        * tables/mozilla_expected_failures/bugs/bug18440-expected.png: Removed.
        * tables/mozilla_expected_failures/bugs/bug18440-expected.txt: Removed.
        * tables/mozilla_expected_failures/bugs/bug18440.html: Removed.

        This was slightly wrong before and is now correct.
        * tables/mozilla/bugs/bug30692-expected.checksum:
        * tables/mozilla/bugs/bug30692-expected.png:
        * tables/mozilla/bugs/bug30692-expected.txt:

        Still wrong, but slightly more correct.
        * tables/mozilla_expected_failures/bugs/bug137388-1-expected.checksum:
        * tables/mozilla_expected_failures/bugs/bug137388-1-expected.png:
        * tables/mozilla_expected_failures/bugs/bug137388-1-expected.txt:

        So much closer to being correct!! But still slightly wrong.
        * tables/mozilla_expected_failures/bugs/bug19526-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@20957 268f45cc-cd09-0410-ab3c-d52691b4dbfc
30 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/replaced/width100percent-expected.txt
LayoutTests/fast/table/003-expected.checksum
LayoutTests/fast/table/003-expected.png
LayoutTests/fast/table/003-expected.txt
LayoutTests/tables/mozilla/bugs/bug131020-expected.checksum
LayoutTests/tables/mozilla/bugs/bug131020-expected.png
LayoutTests/tables/mozilla/bugs/bug131020-expected.txt
LayoutTests/tables/mozilla/bugs/bug149275-2-expected.checksum
LayoutTests/tables/mozilla/bugs/bug149275-2-expected.png
LayoutTests/tables/mozilla/bugs/bug149275-2-expected.txt
LayoutTests/tables/mozilla/bugs/bug18440-expected.checksum [new file with mode: 0644]
LayoutTests/tables/mozilla/bugs/bug18440-expected.png [moved from LayoutTests/tables/mozilla_expected_failures/bugs/bug18440-expected.png with 52% similarity]
LayoutTests/tables/mozilla/bugs/bug18440-expected.txt [moved from LayoutTests/tables/mozilla_expected_failures/bugs/bug18440-expected.txt with 88% similarity]
LayoutTests/tables/mozilla/bugs/bug18440.html [moved from LayoutTests/tables/mozilla_expected_failures/bugs/bug18440.html with 100% similarity]
LayoutTests/tables/mozilla/bugs/bug30692-expected.checksum
LayoutTests/tables/mozilla/bugs/bug30692-expected.png
LayoutTests/tables/mozilla/bugs/bug30692-expected.txt
LayoutTests/tables/mozilla_expected_failures/bugs/bug137388-1-expected.checksum
LayoutTests/tables/mozilla_expected_failures/bugs/bug137388-1-expected.png
LayoutTests/tables/mozilla_expected_failures/bugs/bug137388-1-expected.txt
LayoutTests/tables/mozilla_expected_failures/bugs/bug137388-2-expected.checksum [moved from LayoutTests/tables/mozilla/bugs/bug137388-2-expected.checksum with 100% similarity]
LayoutTests/tables/mozilla_expected_failures/bugs/bug137388-2-expected.png [moved from LayoutTests/tables/mozilla/bugs/bug137388-2-expected.png with 100% similarity]
LayoutTests/tables/mozilla_expected_failures/bugs/bug137388-2-expected.txt [moved from LayoutTests/tables/mozilla/bugs/bug137388-2-expected.txt with 91% similarity]
LayoutTests/tables/mozilla_expected_failures/bugs/bug137388-2.html [moved from LayoutTests/tables/mozilla/bugs/bug137388-2.html with 100% similarity]
LayoutTests/tables/mozilla_expected_failures/bugs/bug18440-expected.checksum [deleted file]
LayoutTests/tables/mozilla_expected_failures/bugs/bug19526-expected.txt
WebCore/ChangeLog
WebCore/rendering/RenderBox.cpp
WebCore/rendering/RenderTableSection.cpp