DescriptionMerge 122861 - Incorrect offset used for scrollWidth/Height calculation
https://bugs.webkit.org/show_bug.cgi?id=91461
Reviewed by Eric Seidel.
Source/WebCore:
Due to a different offset being used to calculate the scrollWidth/Height
and pixelSnappedClientWidth/Height the scroll value can be off by one in
same cases. This can causes scrollbars to appear even when there is no
overflow.
Test: fast/sub-pixel/block-with-margin-overflow.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::scrollWidth):
Change location offset passed to snapSizeToPixel to include x() to match
offset used by pixelSnappedClientWidth.
(WebCore::RenderBox::scrollHeight):
Change location offset passed to snapSizeToPixel to include y() to match
offset used by pixelSnappedClientHeight.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::clampScrollOffset):
Change calculation to use pixelSnappedClientWidth/Height as it is
subtracted from the pixel snapped scrollWidth/Height values.
(WebCore::RenderLayer::scrollWidth):
(WebCore::RenderLayer::scrollHeight):
Change RenderLayer versions of scrollWidth/Height to include x()/y() as
per the RenderBox versions.
LayoutTests:
Add new test ensuring that a block that shouldn't have overflow doesn't
have scrollbars.
* fast/sub-pixel/block-with-margin-overflow-expected.html: Added.
* fast/sub-pixel/block-with-margin-overflow.html: Added.
* platform/chromium-win/fast/block/float/026-expected.txt:
* platform/chromium-win/fast/block/float/028-expected.txt:
* platform/chromium-win/fast/block/float/overhanging-tall-block-expected.txt:
* platform/mac/fast/multicol/shrink-to-column-height-for-pagination-expected.png:
* platform/mac/fast/multicol/shrink-to-column-height-for-pagination-expected.txt:
Update test expectations that incorrectly had overflow.
TBR=eae@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=123234
Patch Set 1 #Messages
Total messages: 1 (0 generated)
|