[iOS WK2] Some accerated overflow-scroll doesn't scroll correctly
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 May 2014 02:15:17 +0000 (02:15 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 May 2014 02:15:17 +0000 (02:15 +0000)
commitd0f38d5cbc43368b1f6441a15676ffac07afeb22
tree5c4cd8615eaa41bbe813065cb436f52a5fd3c8fe
parent6b676303924c54f31fb6ad30f70e1ca7facd51ea
[iOS WK2] Some accerated overflow-scroll doesn't scroll correctly
https://bugs.webkit.org/show_bug.cgi?id=132375

Reviewed by Tim Horton.

Source/WebCore:
We set the size of the scrolling layer (which becomes the bounds of
the UIScrollView) to a non-pixel-snapped padding box size, but the
size of the contents layer is an integral-snapped scroll size.
This would result in a fractional difference between the two, which
makes us thing that the element is scrollable when it really is not.

Fix by setting the size of the scroll layer to pixel snapped client size,
which is what we also use for scrollability computation.

Added some FIXMEs in code that requires pixel snapping.

Also use #if PLATFORM(IOS)/#else to bracket some code that never runs on iOS
but tries to do something similar to iOS-only code.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):

LayoutTests:
New test that dumps compositing layers on iOS so we can see the sizes of the
scroll layers that get created.

* compositing/overflow/subpixel-overflow-expected.txt: Added.
* compositing/overflow/subpixel-overflow.html: Added.
* platform/ios-sim/compositing/overflow/subpixel-overflow-expected.txt: Added.
* platform/mac/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt:
This is a progression; the old code failed to take the scrollbar width into
account, and the new code does.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/compositing/overflow/subpixel-overflow-expected.txt [new file with mode: 0644]
LayoutTests/compositing/overflow/subpixel-overflow.html [new file with mode: 0644]
LayoutTests/platform/ios-sim/compositing/overflow/subpixel-overflow-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayerBacking.cpp