Inconsistent rounding in table layout causes background color to bleed through
authoreae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Jul 2012 22:10:46 +0000 (22:10 +0000)
committereae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Jul 2012 22:10:46 +0000 (22:10 +0000)
commitc66e194b04e5c998e87d496517082a83ddaadad7
tree069f7d7938233e2b18488b365122fc1f5cb89944
parent173f8c75ab59e7f1ea3e6f1935ab7f94f893d030
Inconsistent rounding in table layout causes background color to bleed through
https://bugs.webkit.org/show_bug.cgi?id=91410

Reviewed by Eric Seidel.

Source/WebCore:

At certain zoom levels a rounding error in the table layout code cases
the table background color to bleed through between cells. Tables layout
happens on pixel bounds however the paint offset wasn't correctly rounded.

Test: fast/sub-pixel/table-rows-no-gaps.html

* rendering/RenderTable.cpp:
(WebCore::RenderTable::paintObject):
Round paintOffset before passing it to the paint method of the children.

LayoutTests:

Add test to ensure that the table background color doesn't bleed through
when the table and a cell are positioned on a subpixel bound.

* fast/sub-pixel/table-rows-no-gaps-expected.html: Added.
* fast/sub-pixel/table-rows-no-gaps.html: Added.
* platform/chromium-linux/css1/basic/inheritance-expected.png:
* platform/chromium-linux/plugins/embed-attributes-style-expected.png:
* platform/chromium-linux/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png:
* platform/chromium-linux/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png:
* platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png:
* 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-percentage-size-expected.png:
* platform/chromium-linux/tables/mozilla/bugs/bug73321-expected.png:
Updated expectations to match new rounding logic. The new results better
match the rendering prior to turning on subpixel layout.

* platform/efl/Skipped:
* platform/mac-lion/Skipped:
* platform/mac-snowleopard/Skipped:
* platform/mac-wk2/Skipped:
* platform/mac/Skipped:
* platform/qt-4.8/Skipped:
* platform/qt/Skipped:
* platform/win-wk2/Skipped:
* platform/win-xp/Skipped:
* platform/win/Skipped:
* platform/wincairo/Skipped:
* platform/wk2/Skipped:
Mark new test as skipped on platforms that have not enabled subpixel
layout.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@122769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
25 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/sub-pixel/table-rows-no-gaps-expected.html [new file with mode: 0644]
LayoutTests/fast/sub-pixel/table-rows-no-gaps.html [new file with mode: 0644]
LayoutTests/platform/chromium-linux/css1/basic/inheritance-expected.png
LayoutTests/platform/chromium-linux/plugins/embed-attributes-style-expected.png
LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png
LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png
LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png
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-percentage-size-expected.png
LayoutTests/platform/chromium-linux/tables/mozilla/bugs/bug73321-expected.png
LayoutTests/platform/efl/Skipped
LayoutTests/platform/mac-lion/Skipped
LayoutTests/platform/mac-snowleopard/Skipped
LayoutTests/platform/mac-wk2/Skipped
LayoutTests/platform/mac/Skipped
LayoutTests/platform/qt-4.8/Skipped
LayoutTests/platform/qt/Skipped
LayoutTests/platform/win-wk2/Skipped
LayoutTests/platform/win-xp/Skipped
LayoutTests/platform/win/Skipped
LayoutTests/platform/wincairo/Skipped
LayoutTests/platform/wk2/Skipped
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderTable.cpp