[chromium] REGRESSION: Incorrect preferred width calculation for table cells
authoreae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Sep 2012 18:19:45 +0000 (18:19 +0000)
committereae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Sep 2012 18:19:45 +0000 (18:19 +0000)
commit819e5feb614c2dd3d459f997d73e3399553d075e
tree3a6c97ff4c306450758fd5c0df1dbfa44fc1d508
parentb8f4717057c66981e0cc15f4525a858ebee0cfea
[chromium] REGRESSION: Incorrect preferred width calculation for table cells
https://bugs.webkit.org/show_bug.cgi?id=97497

Reviewed by Levi Weintraub.

Source/WebCore:

In fixing bug 93911 r125694 caused a problem with the preferred
width calculations for table cells with a fractional padding
where the logic to ensure that the cell is wide enough for the
content returns different results for cells with a fixed width
and cells with an automatic width.

Test: fast/sub-pixel/table-cells-have-stable-width.html

* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computePreferredLogicalWidths):
Move the logic that ensures that a cell is wide enough from AutoTableLayout::recalcColumn to RenderBlock::computePreferredLogicalWidths to. This way it also applies to FixedTableLayout which had the same problem.

LayoutTests:

Added test for cell width calculation and reverted three svg tests to the results prior to r125694.

* fast/sub-pixel/table-cells-have-stable-width-expected.txt: Added.
* fast/sub-pixel/table-cells-have-stable-width.html: Added.
* platform/chromium-linux/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png:
* platform/chromium-linux/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.txt:
* platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png:
* platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt:
* platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png:
* platform/chromium-win/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@129529 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/sub-pixel/table-cells-have-stable-width-expected.txt [new file with mode: 0644]
LayoutTests/fast/sub-pixel/table-cells-have-stable-width.html [new file with mode: 0644]
LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png
LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.txt
LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png
LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt
LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png
LayoutTests/platform/chromium-win/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/rendering/AutoTableLayout.cpp
Source/WebCore/rendering/RenderBlock.cpp