REGRESSION (r229828): web view doesn’t update or respond to resizing until client...
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 Apr 2018 01:55:35 +0000 (01:55 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 Apr 2018 01:55:35 +0000 (01:55 +0000)
commitf69a9ee2bde922995c67d807aaba9e7c30666e48
tree9fb97088b7eecb2b4c1f1f648a2dd85bfcd4d2d5
parent548ccae766a729bbc306ca012f3f9fd58eda2de5
REGRESSION (r229828): web view doesn’t update or respond to resizing until client calls policy decision handler
https://bugs.webkit.org/show_bug.cgi?id=184210
<rdar://problem/39072354>

Reviewed by Wenson Hsieh.

Source/WebCore:

r229828 tried to have some API tests happy on iOS by freezing the layer tree
during the navigation policy decision. However, this is observable by the client
application and a regression from when the policy delegate was synchronous.

To address the issue, this patch reverts r229828 and instead updates the iOS
API tests to wait for the next presentation update after navigating
before interacting with the view.

* loader/FrameLoaderClient.h:
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy):

Source/WebKit:

r229828 tried to have some API tests happy on iOS by freezing the layer tree
during the navigation policy decision. However, this is observable by the client
application and a regression from when the policy delegate was synchronous.

To address the issue, this patch reverts r229828 and instead updates the iOS
API tests to wait for the next presentation update after navigating
before interacting with the view.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebKit::WebFrameLoaderClient::cancelPolicyCheck):
(WebKit::WebFrameLoaderClient::provisionalLoadStarted):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:

Tools:

* TestWebKitAPI/Tests/WebKit/large-red-square-image.html:
* TestWebKitAPI/Tests/WebKitCocoa/dragstart-change-selection-offscreen.html:
Add viewport meta tags.

* TestWebKitAPI/cocoa/TestNavigationDelegate.mm:
(-[WKWebView _test_waitForDidFinishNavigation]):
Update _test_waitForDidFinishNavigation to wait for the next presentation update
to make iOS API tests happy without having to modify each of them.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230876 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/loader/FrameLoaderClient.h
Source/WebCore/loader/PolicyChecker.cpp
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Source/WebKit/WebProcess/WebPage/WebPage.h
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKit/large-red-square-image.html
Tools/TestWebKitAPI/Tests/WebKitCocoa/dragstart-change-selection-offscreen.html
Tools/TestWebKitAPI/cocoa/TestNavigationDelegate.mm