[iOS WK2] Scroll indicators disappear sometimes
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Aug 2019 15:27:39 +0000 (15:27 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Aug 2019 15:27:39 +0000 (15:27 +0000)
commit128be9f67974ae36b6ec5da352566425bbc946be
tree9dcb0cbf2c2b9a6b6e6374e9c532fcbd0a58687d
parent0b66972b3a98f808853f2cd89c6527fbbb245c19
[iOS WK2] Scroll indicators disappear sometimes
https://bugs.webkit.org/show_bug.cgi?id=200791

Reviewed by Tim Horton.
Source/WebKit:

_web_setSubviews: replaces all of the views subviews with the supplied array, but this blows
away views not managed by WebKit, including UIScrollViews scroll indicators. Fix by having
WebKit-managed views implement the WKWebKitControlled protocol, and only removing views
implementing that protocol.

* Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
(-[UIView _web_setSubviews:]):
* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.h:

Tools:

Tests that test that scroll indicators survive subview replacement, and that
a custom view also survives subview replacement.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/ios/OverflowScrollViewTests.mm: Added.
(TestWebKitAPI::TEST):
* TestWebKitAPI/cocoa/TestWKWebView.h:
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebView performAfterLoading:]):
(-[UIView wkFirstSubviewWithClass:]):
(-[UIView wkFirstSubviewWithBoundsSize:]):
* TestWebKitAPI/ios/composited.html: Added.
* TestWebKitAPI/ios/overflow-scroll.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248820 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.h
Tools/ChangeLog
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/ios/OverflowScrollViewTests.mm [new file with mode: 0644]
Tools/TestWebKitAPI/cocoa/TestWKWebView.h
Tools/TestWebKitAPI/cocoa/TestWKWebView.mm
Tools/TestWebKitAPI/ios/composited.html [new file with mode: 0644]
Tools/TestWebKitAPI/ios/overflow-scroll.html [new file with mode: 0644]