Cell heights are disproportional when a row-spanning cell contains a block element...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 May 2013 18:16:51 +0000 (18:16 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 May 2013 18:16:51 +0000 (18:16 +0000)
commit069293b58433112bad56302312c5547faf48850d
tree27e079ce77df2d0c25e985a52d54cac515c76d21
parentdc58b337f4ce83a27cacac6b71181848fbeaf529
Cell heights are disproportional when a row-spanning cell contains a block element that determines the height of the rows
https://bugs.webkit.org/show_bug.cgi?id=52185

Patch by Suchit Agrawal <a.suchit@samsung.com> on 2013-05-13
Reviewed by David Hyatt.

Source/WebCore:

Cells heights are not proper when rowspan cell have its own height and rowspan height
is more than the height of the rows present in rowspan.

After calculating logical height of the rows in the table, we are recalculating the height
of the rows present in rowspan. Based on the ratio of row's logical height, we are
distributing rowspan cell height in rows.

Test: fast/table/table-rowspan-height-distribution-in-rows.html

* rendering/RenderTableSection.cpp:
(WebCore):

Update the logical height of the rows based on rowspan cell height.
(WebCore::RenderTableSection::distributeRowSpanHeightToRows):

It calculates logical height of the rows in the table.
(WebCore::RenderTableSection::calcRowLogicalHeight):

Added new private API to distribute rowSpan cell height in rows.
* rendering/RenderTableSection.h:
(RenderTableSection):

LayoutTests:

Test case updated.
* fast/css/vertical-align-baseline-rowspan-007.htm:

Reference Test cases updated.
* fast/css/vertical-align-baseline-rowspan-007-expected.html:
* fast/css/vertical-align-baseline-rowspan-008-expected.html:

Added test cases based on changes in the code and different scenarios for rowspan height
distribution in rows.
* fast/table/table-rowspan-height-distribution-in-rows.html: Added.
* platform/qt/fast/table/table-rowspan-height-distribution-in-rows-expected.png: Added.
* platform/qt/fast/table/table-rowspan-height-distribution-in-rows-expected.txt: Added.

Test cases need to rebaseline in qt, efl, gtk and mac platforms.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:

Test case results are updated in qt platform.
* platform/qt/tables/mozilla/bugs/bug17548-expected.png:
* platform/qt/tables/mozilla/bugs/bug17548-expected.txt:
* platform/qt/tables/mozilla/bugs/bug220536-expected.png:
* platform/qt/tables/mozilla/bugs/bug220536-expected.txt:
* platform/qt/tables/mozilla/bugs/bug7714-expected.png:
* platform/qt/tables/mozilla/bugs/bug7714-expected.txt:
* platform/qt/tables/mozilla/core/bloomberg-expected.png:
* platform/qt/tables/mozilla/core/bloomberg-expected.txt:
* platform/qt/tables/mozilla/other/test6-expected.png:
* platform/qt/tables/mozilla/other/test6-expected.txt:
* platform/qt/tables/mozilla_expected_failures/bugs/bug1010-expected.png:
* platform/qt/tables/mozilla_expected_failures/bugs/bug1010-expected.txt:
* platform/qt/tables/mozilla_expected_failures/bugs/bug23847-expected.png:
* platform/qt/tables/mozilla_expected_failures/bugs/bug58402-2-expected.png:
* platform/qt/tables/mozilla_expected_failures/bugs/bug58402-2-expected.txt:
* platform/qt/tables/mozilla_expected_failures/bugs/bug6933-expected.png:
* platform/qt/tables/mozilla_expected_failures/bugs/bug6933-expected.txt:
* tables/mozilla/core/bloomberg-expected.txt:
* tables/mozilla_expected_failures/bugs/bug23847-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@150023 268f45cc-cd09-0410-ab3c-d52691b4dbfc
33 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/vertical-align-baseline-rowspan-007-expected.html
LayoutTests/fast/css/vertical-align-baseline-rowspan-007.htm
LayoutTests/fast/css/vertical-align-baseline-rowspan-008-expected.html
LayoutTests/fast/table/table-rowspan-height-distribution-in-rows.html [new file with mode: 0644]
LayoutTests/platform/efl/TestExpectations
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/mac/TestExpectations
LayoutTests/platform/qt/TestExpectations
LayoutTests/platform/qt/fast/table/table-rowspan-height-distribution-in-rows-expected.png [new file with mode: 0644]
LayoutTests/platform/qt/fast/table/table-rowspan-height-distribution-in-rows-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/tables/mozilla/bugs/bug17548-expected.png
LayoutTests/platform/qt/tables/mozilla/bugs/bug17548-expected.txt
LayoutTests/platform/qt/tables/mozilla/bugs/bug220536-expected.png
LayoutTests/platform/qt/tables/mozilla/bugs/bug220536-expected.txt
LayoutTests/platform/qt/tables/mozilla/bugs/bug7714-expected.png
LayoutTests/platform/qt/tables/mozilla/bugs/bug7714-expected.txt
LayoutTests/platform/qt/tables/mozilla/core/bloomberg-expected.png
LayoutTests/platform/qt/tables/mozilla/core/bloomberg-expected.txt
LayoutTests/platform/qt/tables/mozilla/other/test6-expected.png
LayoutTests/platform/qt/tables/mozilla/other/test6-expected.txt
LayoutTests/platform/qt/tables/mozilla_expected_failures/bugs/bug1010-expected.png
LayoutTests/platform/qt/tables/mozilla_expected_failures/bugs/bug1010-expected.txt
LayoutTests/platform/qt/tables/mozilla_expected_failures/bugs/bug23847-expected.png
LayoutTests/platform/qt/tables/mozilla_expected_failures/bugs/bug58402-2-expected.png
LayoutTests/platform/qt/tables/mozilla_expected_failures/bugs/bug58402-2-expected.txt
LayoutTests/platform/qt/tables/mozilla_expected_failures/bugs/bug6933-expected.png
LayoutTests/platform/qt/tables/mozilla_expected_failures/bugs/bug6933-expected.txt
LayoutTests/tables/mozilla/core/bloomberg-expected.txt
LayoutTests/tables/mozilla_expected_failures/bugs/bug23847-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderTableSection.cpp
Source/WebCore/rendering/RenderTableSection.h