REGRESSION (r102040): Wrong column widths when row has colspan and unwrappable text
authorrobert@webkit.org <robert@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jan 2012 20:32:37 +0000 (20:32 +0000)
committerrobert@webkit.org <robert@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jan 2012 20:32:37 +0000 (20:32 +0000)
commit0347a356db6fe46612dba784427b49f9e27f5b36
tree83aaab499f2840b1f79374701ac293dd5f885866
parent3591c1d5e4a2ec98274c921555f3a048d008b407
REGRESSION (r102040): Wrong column widths when row has colspan and unwrappable text
https://bugs.webkit.org/show_bug.cgi?id=74874

Reviewed by Julien Chaffraix.

Source/WebCore:

Tests: fast/css/min-width-with-spanned-cell-fixed.html
       fast/css/min-width-with-spanned-cell.html

A cell with unwrappable text must be as wide as the text is long. If it is a colspan in a table whose
columns are all percent and the width of the span cell is wider than the cells it spans in any other
row then it will squeeze those cells beyond the width required to display their contents.

To fix this ensure that the squeezing of cells within a span respects the minimum width determined by
their contents. The squeezing remains for fixed layout tables as per FF and Opera.

* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::calcEffectiveLogicalWidth):

LayoutTests:

* fast/css/min-width-with-spanned-cell-expected.png: Added.
* fast/css/min-width-with-spanned-cell-expected.txt: Added.
* fast/css/min-width-with-spanned-cell-fixed-expected.png: Added.
* fast/css/min-width-with-spanned-cell-fixed-expected.txt: Added.
* fast/css/min-width-with-spanned-cell-fixed.html: Added.
* fast/css/min-width-with-spanned-cell.html: Added.
* platform/chromium-linux/fast/table/027-expected.png:
   1 px difference - benign
* platform/chromium-linux/fast/table/027-vertical-expected.png:
   This is a progression - previously the image in the last cell was
   extruding from the table in a 800x600 view.
* platform/chromium-win/fast/table/027-expected.txt:
* platform/chromium-win/fast/table/027-vertical-expected.txt:
* platform/mac/test_expectations.txt: Suppress 027* tests for rebaseline.
* platform/win/test_expectations.txt: ditto
   The 2 tests are skipped on gtk and qt.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105775 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/min-width-with-spanned-cell-expected.png [new file with mode: 0644]
LayoutTests/fast/css/min-width-with-spanned-cell-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/min-width-with-spanned-cell-fixed-expected.png [new file with mode: 0644]
LayoutTests/fast/css/min-width-with-spanned-cell-fixed-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/min-width-with-spanned-cell-fixed.html [new file with mode: 0644]
LayoutTests/fast/css/min-width-with-spanned-cell.html [new file with mode: 0644]
LayoutTests/platform/chromium-linux/fast/table/027-expected.png
LayoutTests/platform/chromium-linux/fast/table/027-vertical-expected.png
LayoutTests/platform/chromium-win/fast/table/027-expected.txt
LayoutTests/platform/chromium-win/fast/table/027-vertical-expected.txt
LayoutTests/platform/mac/test_expectations.txt
LayoutTests/platform/win/test_expectations.txt
Source/WebCore/ChangeLog
Source/WebCore/rendering/AutoTableLayout.cpp