[Webkit-unassigned] [Bug 149646] Add a WKWebView input delegate SPI

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 13 22:51:09 PDT 2015


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

mitz at webkit.org <mitz at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #262626|review?                     |review+
              Flags|                            |

--- Comment #13 from mitz at webkit.org <mitz at webkit.org> ---
Comment on attachment 262626
  --> https://bugs.webkit.org/attachment.cgi?id=262626
Patch

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

> Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h:206
> + at property (nonatomic, weak, getter=_formDelegate, setter=_setFormDelegate:) id <_WKFormDelegate> _formDelegate;

No need for getter=_formDelegate since it’s exactly the same as the property name.

Instead of comment (which is not entirely correct: the declaration is here for source compatibility, the implementation is what gives us binary compatibility) you can annotate this with WK_DEPRECATED(10_10, WK_MAC_TBA, 8_0, WK_IOS_TBA, "use _inputDelegate")

> Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h:207
> + at property (nonatomic, weak, setter=_setInputDelegate:) id <_WKInputDelegate> _inputDelegate;

This needs to be annotated with WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA) since it’s new.

> Source/WebKit2/UIProcess/API/Cocoa/_WKFormDelegate.h:27
> +#ifndef _WKFormDelegate_h
> +#define _WKFormDelegate_h

We don’t use such guards in headers that include Objective-C declarations (unless the declarations themselves are guarded with #if __OBJC__), because they are only imported from Objective-C files, which use #import directives which don’t require such guards.

> Source/WebKit2/UIProcess/API/Cocoa/_WKFormDelegate.h:33
> +#import "_WKInputDelegate.h"

This needs to be a framework-style import, <WebKit/_WKInputDelegate.h>, because this is a framework header.

> Source/WebKit2/UIProcess/API/Cocoa/_WKFormDelegate.h:36
> + * We are transitioning _WKFormDelegate to _WKInputDelegate. This header is here temporarily for binary compatibility and

source compatibility

> Source/WebKit2/UIProcess/API/Cocoa/_WKInputDelegate.h:34
> + at protocol _WKFormInputSession;
> + at protocol _WKFocusedElementInfo;

Please keep these sorted, c before r.

> Source/WebKit2/UIProcess/API/Cocoa/_WKInputDelegate.h:36
> + at protocol _WKInputDelegate <NSObject>

I believe that we should annotate the entire protocol with availability information, but I am not sure exactly how.

> Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:298
> +    self = [super init];
> +    if (!self)
> +        return nil;

We usually save a line by writing this:

if (!(self = [super init]))
    return nil;

> Source/WebKit2/WebKit2.xcodeproj/project.pbxproj:5303
> +				37A64E5418F38E3C00EB30F1 /* _WKInputDelegate.h */,
>  				37A64E5618F38F4600EB30F1 /* _WKFormInputSession.h */,
> +				2E7A94491BBD95C600945547 /* _WKFocusedElementInfo.h */,

Can you keep these sorted?

> Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:53
> -#import "WKWebProcessPluginFrameInternal.h"
> -#import "WKWebProcessPlugInInternal.h"
>  #import "WKWebProcessPlugInFormDelegatePrivate.h"
> +#import "WKWebProcessPlugInInternal.h"
>  #import "WKWebProcessPlugInLoadDelegate.h"
>  #import "WKWebProcessPlugInNodeHandleInternal.h"
>  #import "WKWebProcessPlugInPageGroupInternal.h"
>  #import "WKWebProcessPlugInScriptWorldInternal.h"
> +#import "WKWebProcessPluginFrameInternal.h"

What’s this about? Seems unrelated to this patch.

-- 
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/20151014/c911bff1/attachment-0001.html>


More information about the webkit-unassigned mailing list