Page using safe area constant properties jumps to correct layout after resize
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jul 2017 01:45:59 +0000 (01:45 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jul 2017 01:45:59 +0000 (01:45 +0000)
commit2427e2b6f252c9530ddf610c2002870fff2118b0
tree8db8f400ed112fd0bf766341ba16d10748cb6a5f
parentdd8302b49893c5897e60d8490b8478434db7030f
Page using safe area constant properties jumps to correct layout after resize
https://bugs.webkit.org/show_bug.cgi?id=174598
<rdar://problem/33364275>

Reviewed by Simon Fraser.

Source/WebKit:

Test: fast/events/ios/rotation/safe-area-insets-during-safari-type-rotation.html

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::dynamicViewportSizeUpdate):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):
Plumb unobscured safe area insets through in the dynamicViewportSizeUpdate,
like we do in VisibleContentRectUpdate (once again sad that these aren't
more similar), so that it will be correct in the during-rotation snapshot,
instead of only becoming correct in the first visible content rect update
post-rotation.

LayoutTests:

* fast/events/ios/rotation/safe-area-insets-during-safari-type-rotation-expected.txt: Added.
* fast/events/ios/rotation/safe-area-insets-during-safari-type-rotation.html: Added.
Add a test making sure that dynamic-viewport-update-based rotation
updates safe area insets when needed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219594 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/events/ios/rotation/safe-area-insets-during-safari-type-rotation-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/ios/rotation/safe-area-insets-during-safari-type-rotation.html [new file with mode: 0644]
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
Source/WebKit/WebProcess/WebPage/WebPage.h
Source/WebKit/WebProcess/WebPage/WebPage.messages.in
Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm