[iOS] Handle hit testing for subframes
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Jan 2019 06:50:49 +0000 (06:50 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Jan 2019 06:50:49 +0000 (06:50 +0000)
commit03e7f953554986b8e56bcde386dd504dca3c0fde
tree5afd4121da64cc00eb2f40aaafe298497acc3681
parent4665a1ab943bd4db48988b3546ae765763754170
[iOS] Handle hit testing for subframes
https://bugs.webkit.org/show_bug.cgi?id=192303

Reviewed by Frédéric Wang.

Source/WebCore:

Don't set delegatesScrolling bit for subframes on iOS. It is meant for top level application
controlled scrolling. This fixes coordinate conversions for subframes and makes events work.

Test by Frederic Wang.

Test: fast/scrolling/ios/hit-testing-iframe.html

* platform/ScrollView.cpp:
(WebCore::ScrollView::managesScrollbars const):

Add a function that tells if the scrollview should deal with scrollbars at all
This is always false on iOS and not connected to delegatesScrolling bit.

(WebCore::ScrollView::updateScrollbars):
* platform/ScrollView.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::shouldCompositeOverflowControls const):

Source/WebKit:

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):

Only set delegatesScrolling for the main frame.

LayoutTests:

Test by Frederic Wang.

* fast/scrolling/ios/hit-testing-iframe-expected.html: Added.
* fast/scrolling/ios/hit-testing-iframe.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240249 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/scrolling/ios/hit-testing-iframe-expected.html [new file with mode: 0644]
LayoutTests/fast/scrolling/ios/hit-testing-iframe.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/ScrollView.cpp
Source/WebCore/platform/ScrollView.h
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp