[sub-pixel] Rounding error in table cell height calculation causes unnecessary scrollbar
authoreae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Mar 2013 18:30:46 +0000 (18:30 +0000)
committereae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Mar 2013 18:30:46 +0000 (18:30 +0000)
commita75270bbcc52051e03b9b4630269b0be82b612e5
tree8ec8fbbc3f3f5c854632e89da5066d10550353a6
parent00f9699b5c3eb64f61790caf6fa31cbdb2fa7f76
[sub-pixel] Rounding error in table cell height calculation causes unnecessary scrollbar
https://bugs.webkit.org/show_bug.cgi?id=111794

Source/WebCore:

Reviewed by Levi Weintraub.

In RenderTableCell::logicalHeightForRowSizing the
adjustedLogicalHeight is calculated from the logicalHeight and
intrinsic padding and is then returned and floored. This can
cause cause the cell to be slightly smaller (0.5px) than the
element it contains.

Test: fast/sub-pixel/table-cell-height.html

* rendering/RenderTableCell.h:
(WebCore::RenderTableCell::logicalHeightForRowSizing):
Change to use pixelSnapped version of logicalHeight method and
change signature to return int as the only caller immediately
down-casts the result to an int.

LayoutTests:

Reviewed by Levi Weintraub.

Add test for zoomed-in table containing block child.

* fast/sub-pixel/table-cell-height-expected.html: Added.
* fast/sub-pixel/table-cell-height.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@145242 268f45cc-cd09-0410-ab3c-d52691b4dbfc
36 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/sub-pixel/table-cell-height-expected.html [new file with mode: 0644]
LayoutTests/fast/sub-pixel/table-cell-height.html [new file with mode: 0644]
LayoutTests/platform/chromium-linux/css1/box_properties/clear_float-expected.png
LayoutTests/platform/chromium-linux/css3/flexbox/flexbox-baseline-expected.png
LayoutTests/platform/chromium-linux/fast/css/h1-in-section-elements-expected.png
LayoutTests/platform/chromium-linux/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt
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-2-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-linux/tables/mozilla/bugs/bug126742-expected.png
LayoutTests/platform/chromium-linux/tables/mozilla/bugs/bug69187-expected.png
LayoutTests/platform/chromium-linux/tables/mozilla/bugs/bug73321-expected.png
LayoutTests/platform/chromium-win/css1/basic/inheritance-expected.txt
LayoutTests/platform/chromium-win/css1/box_properties/clear_float-expected.txt
LayoutTests/platform/chromium-win/css1/box_properties/margin-expected.txt
LayoutTests/platform/chromium-win/css1/box_properties/margin_bottom-expected.txt
LayoutTests/platform/chromium-win/css1/box_properties/margin_top-expected.txt
LayoutTests/platform/chromium-win/css1/box_properties/padding-expected.txt
LayoutTests/platform/chromium-win/css1/box_properties/padding_bottom-expected.txt
LayoutTests/platform/chromium-win/css1/box_properties/padding_top-expected.txt
LayoutTests/platform/chromium-win/css1/color_and_background/background_attachment-expected.txt
LayoutTests/platform/chromium-win/css1/font_properties/font_weight-expected.txt
LayoutTests/platform/chromium-win/css1/formatting_model/vertical_formatting-expected.txt
LayoutTests/platform/chromium-win/css2.1/t080301-c411-vt-mrgn-00-b-expected.txt
LayoutTests/platform/chromium-win/css3/flexbox/flexbox-baseline-expected.txt
LayoutTests/platform/chromium-win/fast/css-generated-content/015-expected.txt
LayoutTests/platform/chromium-win/fast/css/h1-in-section-elements-expected.txt
LayoutTests/platform/chromium-win/tables/mozilla/bugs/bug126742-expected.txt
LayoutTests/platform/chromium-win/tables/mozilla/bugs/bug69187-expected.txt
LayoutTests/platform/chromium-win/tables/mozilla/bugs/bug73321-expected.txt
LayoutTests/platform/chromium/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderTableCell.h