Bug 175896

Summary: Add WKUIDelegatePrivate callbacks corresponding to WKPageUIClient's takeFocus, focus, and unfocus
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Alex Christensen 2017-08-23 11:58:04 PDT
Add WKUIDelegatePrivate callbacks corresponding to WKPageUIClient's takeFocus, focus, and unfocus
Comment 1 Alex Christensen 2017-08-23 12:01:44 PDT
Created attachment 318893 [details]
Patch
Comment 2 Tim Horton 2017-08-23 12:15:01 PDT
Comment on attachment 318893 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=318893&action=review

> Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h:130
> -- (void)_webViewShow:(WKWebView *)webView WK_API_AVAILABLE(macosx(WK_MAC_TBA));
> +- (void)_showWebView:(WKWebView *)webView WK_API_AVAILABLE(macosx(WK_MAC_TBA));
> +- (void)_focusWebView:(WKWebView *)webView WK_API_AVAILABLE(macosx(WK_MAC_TBA));
> +- (void)_unfocusWebView:(WKWebView *)webView WK_API_AVAILABLE(macosx(WK_MAC_TBA));
> +- (void)_webView:(WKWebView *)webView takeFocus:(_WKFocusDirection)direction WK_API_AVAILABLE(macosx(WK_MAC_TBA));

I have another question. Why are all these things Mac only? They don't seem to be, underneath. Platform-specific things should be the exception, not the rule.
Comment 3 Alex Christensen 2017-08-23 12:40:54 PDT
Created attachment 318901 [details]
Patch
Comment 4 Alex Christensen 2017-08-23 12:42:00 PDT
(In reply to Tim Horton from comment #2)
> I have another question. Why are all these things Mac only? They don't seem
> to be, underneath. Platform-specific things should be the exception, not the
> rule.
Focus and keyboard events are quite different on iOS.  _webViewShow didn't work on iOS and it's not needed.  We could fix it and add it later if needed.
Comment 5 Alex Christensen 2017-08-23 13:03:42 PDT
Created attachment 318906 [details]
Patch
Comment 6 Alex Christensen 2017-08-23 13:36:03 PDT
http://trac.webkit.org/r221099
Comment 7 Radar WebKit Bug Importer 2017-08-23 13:36:35 PDT
<rdar://problem/34042618>
Comment 8 Alex Christensen 2017-08-23 14:53:33 PDT
rdar://problem/29270035