Hardware keyboard arrow keys/spacebar don't scroll PDFs (works for web content)
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Oct 2018 23:41:18 +0000 (23:41 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Oct 2018 23:41:18 +0000 (23:41 +0000)
commit55c3732beca5501bb105e27365782ef30e4b11e2
tree63d4040357b22fa79a2cda2edce666f7b7fe9149
parent5ee5eec02bcb4bbf6dbda1871792a9e0991337e0
Hardware keyboard arrow keys/spacebar don't scroll PDFs (works for web content)
https://bugs.webkit.org/show_bug.cgi?id=190495
<rdar://problem/22734616>

Reviewed by Andy Estes.

Hook up WKKeyboardScrollViewAnimator to the scroll view when
WKPDFView is installed.

* Platform/spi/ios/UIKitSPI.h:
Move _inputFlags to the IPI section so we can remove it
from WKContentViewInteraction.

* SourcesCocoa.txt:
* UIProcess/ios/WKWebEvent.h:
* UIProcess/ios/WKWebEvent.mm:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView handleKeyEvent:]):
(-[WKWebEvent dealloc]): Deleted.
* WebKit.xcodeproj/project.pbxproj:
Move WKWebEvent out of WKContentViewInteraction.
We tend to prefer one file per class.
Also, move the code to make a WKWebEvent from a UIEvent into
-initWithEvent:, instead of being ad-hoc in WKContentViewInteraction.
Adopt RetainPtr for the WKWebEvent's uiEvent property.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _handleKeyUIEvent:]):
* UIProcess/Cocoa/WKWebViewContentProvider.h:
Plumb hardware keyboard events to custom content views, if they want them.

* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView dealloc]):
(-[WKPDFView web_handleKeyEvent:]):
(-[WKPDFView web_initWithFrame:webView:mimeType:]):
Install a WKKeyboardScrollViewAnimator and plumb key events to it.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/Platform/spi/ios/UIKitSPI.h
Source/WebKit/SourcesCocoa.txt
Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit/UIProcess/Cocoa/WKWebViewContentProvider.h
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Source/WebKit/UIProcess/ios/WKPDFView.mm
Source/WebKit/UIProcess/ios/WKWebEvent.h [new file with mode: 0644]
Source/WebKit/UIProcess/ios/WKWebEvent.mm [new file with mode: 0644]
Source/WebKit/WebKit.xcodeproj/project.pbxproj