Unnecessary scroll bar after changing the dimensions of a DIV
https://bugs.webkit.org/show_bug.cgi?id=71541
Patch by SravanKumar Sandela <ssandela@innominds.com> on 2012-04-09
Reviewed by Julien Chaffraix.
Source/WebCore:
overflow: auto was being determined based on clientWidth and clientHeight, which during style change
scenarii will blindly exclude previous scrollbars while computing overflow. This is valid only for
overflow: scroll, but for other cases it wrongly reduces available area. Now it is taken care by
determining the overflow based on pixelSnappedPaddingBoxWidth/Height() which are newly added in RenderBox.
Tests: fast/overflow/overflow-auto-destroy-scroll-after-resizing-expected.html
fast/overflow/overflow-auto-destroy-scroll-after-resizing.html
* rendering/RenderBox.h:
(WebCore::RenderBox::paddingBoxWidth):
(WebCore::RenderBox::paddingBoxHeight):
(WebCore::RenderBox::pixelSnappedPaddingBoxWidth):
(WebCore::RenderBox::pixelSnappedPaddingBoxHeight):
(RenderBox):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::hasHorizontalOverflow):
(WebCore::RenderLayer::hasVerticalOverflow):
LayoutTests:
Ref tests to check scrollbar behaviour in overflow: auto, on resizing.
* fast/overflow/overflow-auto-destroy-scroll-after-resizing-expected.html: Added.
* fast/overflow/overflow-auto-destroy-scroll-after-resizing.html: Added.
scrollbars-on-positioned-content.html and hidden-scrollbar-resize.html needs to be rebaselined
as their expected values were buggy because of redundant scrollbars.
* platform/chromium/test_expectations.txt:
* platform/efl/Skipped:
* platform/mac/Skipped:
* platform/qt/Skipped:
* platform/win/Skipped:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113611
268f45cc-cd09-0410-ab3c-
d52691b4dbfc