REGRESSION (iOS 8): Scrollbar can't be hidden when webkit-overflow-scrolling is set...
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Mar 2019 22:00:44 +0000 (22:00 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Mar 2019 22:00:44 +0000 (22:00 +0000)
commitdb52bcf161508d0925d7de48c7c0778aa00d2c68
tree664b93236efd8428c89656d3a453542b832b4cd5
parentc8f6bbc718bc62da2f8965c57e18e1ba25684927
REGRESSION (iOS 8): Scrollbar can't be hidden when webkit-overflow-scrolling is set to touch
https://bugs.webkit.org/show_bug.cgi?id=137043
rdar://problem/16595330

Reviewed by Zalan Bujtas.

Source/WebCore:

Plumb horizontalScrollbarHiddenByStyle/verticalScrollbarHiddenByStyle through ScrollableAreaParameters
to the UI process, and use it to set UIScrollView indicators visible or not.

Tests: fast/scrolling/ios/scrollbar-hiding.html:

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::setScrollingNodeScrollableAreaGeometry):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::operator<<):
* page/scrolling/ScrollingCoordinatorTypes.h:
* page/scrolling/ScrollingTreeNode.h:
* page/scrolling/ScrollingTreeOverflowScrollingNode.cpp:
(WebCore::ScrollingTreeOverflowScrollingNode::dumpProperties const):
* page/scrolling/ScrollingTreeScrollingNode.h:
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::horizontalScrollbarHiddenByStyle const):
(WebCore::ScrollableArea::verticalScrollbarHiddenByStyle const):
* rendering/RenderLayer.cpp:
(WebCore::scrollbarHiddenByStyle):
(WebCore::RenderLayer::horizontalScrollbarHiddenByStyle const):
(WebCore::RenderLayer::verticalScrollbarHiddenByStyle const):
* rendering/RenderLayer.h:

Source/WebKit:

Plumb horizontalScrollbarHiddenByStyle/verticalScrollbarHiddenByStyle through ScrollableAreaParameters
to the UI process, and use it to set UIScrollView indicators visible or not.

The scroll snap changes in ScrollingTreeScrollingNodeDelegateIOS::commitStateAfterChildren() fix a bug
where hasChangedProperty(HorizontalSnapOffsets) was nested inside another set of hasChangedProperty()
tests, so would never get called.

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ScrollableAreaParameters>::encode):
(IPC::ArgumentCoder<ScrollableAreaParameters>::decode):
* UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
(WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateAfterChildren):

LayoutTests:

Test that dumps the UI-side scrolling tree, showing e.g. "horizontal scrollbar hidden by style"
in the dump.

This test was previously a render tree dump, which did not test whether scrollbars were visible.

* fast/scrolling/ios/scrollbar-hiding-expected.txt:
* fast/scrolling/ios/scrollbar-hiding.html:
* platform/ios/fast/scrolling/ios/scrollbar-hiding-expected.txt: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243416 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/scrolling/ios/scrollbar-hiding-expected.txt
LayoutTests/fast/scrolling/ios/scrollbar-hiding.html
LayoutTests/platform/ios/fast/scrolling/ios/scrollbar-hiding-expected.txt [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
Source/WebCore/page/scrolling/ScrollingCoordinatorTypes.h
Source/WebCore/page/scrolling/ScrollingTreeNode.h
Source/WebCore/page/scrolling/ScrollingTreeOverflowScrollingNode.cpp
Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h
Source/WebCore/platform/ScrollableArea.h
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayer.h
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebCoreArgumentCoders.cpp
Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm