[iOS] Synchronize PDF resizing with device rotation
authoraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Jun 2018 17:06:30 +0000 (17:06 +0000)
committeraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Jun 2018 17:06:30 +0000 (17:06 +0000)
commit63098613d40929675d8144cade87e38984c0ea98
treed2a7b403791c273ced02c5d30b29d240c095c6ec
parent7ed52694b95f46bfd5a851d7d4635ba624b04850
[iOS] Synchronize PDF resizing with device rotation
https://bugs.webkit.org/show_bug.cgi?id=186587
<rdar://problem/40922462>

Reviewed by Darin Adler.

Both -beginPDFViewRotation and -endPDFViewRotation need to be called as part of
the transition coordinator's -animateAlongsideTransition: block to be synchronized
with rotation. Additionally, updateBlock needs to be invoked between the two calls
so that PDFKit can capture the frame geometry before and after the update.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
* UIProcess/Cocoa/WKWebViewContentProvider.h:
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_beginAnimatedResizeWithUpdates:]):
(-[WKPDFView web_beginAnimatedResize]): Renamed to web_beginAnimatedResizeWithUpdates:.
(-[WKPDFView web_endAnimatedResize]): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232794 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit/UIProcess/Cocoa/WKWebViewContentProvider.h
Source/WebKit/UIProcess/ios/WKPDFView.mm