[Webkit-unassigned] [Bug 149646] Add a WKWebView form delegate API

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 29 15:45:37 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=149646

--- Comment #3 from Wenson Hsieh <wenson_hsieh at apple.com> ---
Comment on attachment 262112
  --> https://bugs.webkit.org/attachment.cgi?id=262112
Patch

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

> Source/WebKit2/UIProcess/API/Cocoa/WKFormDelegate.h:35
> + at protocol WKFormDelegate <NSObject>

Since this is intended to be a public API, we'll need a lot of documentation here explaining when these methods are called/what they do. When we're more sure about which methods to include as public API, I'll write detailed descriptions similar to those in WKUIDelegate.h

> Source/WebKit2/UIProcess/API/Cocoa/WKFormDelegate.h:43
> +- (BOOL)webView:(WKWebView *)webView shouldShowKeyboard:(BOOL)userIsInteracting WK_AVAILABLE(10_11, 9_0);

Since we only have 1 piece of information right now (userIsInteracting) I thought it would make more sense to just pass it in directly here as a parameter -- when we figure out exactly what pieces of information we should give to our clients, we should refactor this method to take in an object or maybe a dictionary containing information about the focused element.

> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h:71
> + at property (WK_NULLABLE_PROPERTY nonatomic, weak) id <WKFormDelegate> formDelegate WK_AVAILABLE(10_11, 9_0);

I changed this from _formDelegate to just formDelegate since we're now making it public. However, this means we'll need to do some small changes to Safari where we use the form delegate to make Safari not break.

> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:160
> +    std::unique_ptr<WebKit::FormDelegate> _formDelegateWrapper;

I made the WKWebView access the delegate through a C++ wrapper class, like we do in the case of WKUIDelegate and WKNavigationDelegate.

> Source/WebKit2/UIProcess/API/Cocoa/_WKFormDelegate.h:33
> +WK_ASSUME_NONNULL_BEGIN

I believe this was in error. I'll remove this.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150929/9fe6fe86/attachment.html>


More information about the webkit-unassigned mailing list