Don't do async overflow scrolling for visibility:hidden scrollers
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 13 Jul 2019 22:29:32 +0000 (22:29 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 13 Jul 2019 22:29:32 +0000 (22:29 +0000)
commit29f0a0a9368c900d84c917b8dbdf10ef3b35c3e3
tree2ae9af0af23473dbcacfc8ea978e1b7f10b16261
parent14c192c81e3a2c91b84337f5e36f2e36e2cee96e
Don't do async overflow scrolling for visibility:hidden scrollers
https://bugs.webkit.org/show_bug.cgi?id=199779

Reviewed by Dean Jackson.
Source/WebCore:

An overflow:scroll with visibility:hidden is not scrollable on macOS, even if it has visible
content. So disable async overflow:scroll when the scroller has non-visible visibility (this also
takes visibility on ancestors into account).

visibility:hidden overflow:scroll can be common because some JS libraries use it
(https://github.com/wnr/element-resize-detector).

Test: compositing/scrolling/async-overflow-scrolling/visibility-hidden-scrollers.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::canUseCompositedScrolling const): Don't use hasVisibleContent() because
that's affected by  visible children.

LayoutTests:

* compositing/scrolling/async-overflow-scrolling/visibility-hidden-scrollers-expected.txt: Added.
* compositing/scrolling/async-overflow-scrolling/visibility-hidden-scrollers.html: Added.
* platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/visibility-hidden-scrollers-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247420 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/compositing/scrolling/async-overflow-scrolling/visibility-hidden-scrollers-expected.txt [new file with mode: 0644]
LayoutTests/compositing/scrolling/async-overflow-scrolling/visibility-hidden-scrollers.html [new file with mode: 0644]
LayoutTests/platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/visibility-hidden-scrollers-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayer.cpp