Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Issue 10790105: Merge 122861 - Incorrect offset used for scrollWidth/Height calculation (Closed)

Created:
8 years, 5 months ago by eae
Modified:
8 years, 5 months ago
Reviewers:
eae
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Visibility:
Public.

Description

Merge 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+60 lines, -8 lines) Patch
M LayoutTests/ChangeLog View 1 chunk +19 lines, -0 lines 0 comments Download
A + LayoutTests/fast/sub-pixel/block-with-margin-overflow.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/sub-pixel/block-with-margin-overflow-expected.html View 0 chunks +-1 lines, --1 lines 0 comments Download
M LayoutTests/platform/chromium-win/fast/block/float/026-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/platform/chromium-win/fast/block/float/028-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/platform/chromium-win/fast/block/float/overhanging-tall-block-expected.txt View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/WebCore/ChangeLog View 1 chunk +33 lines, -0 lines 0 comments Download
M Source/WebCore/rendering/RenderBox.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/WebCore/rendering/RenderLayer.cpp View 3 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
eae
8 years, 5 months ago (2012-07-20 17:56:08 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698