RESOLVED FIXED137792
[iOS] Capture WKActionSheetAssistant's interaction with WKContentView in a @protocol
https://bugs.webkit.org/show_bug.cgi?id=137792
Summary [iOS] Capture WKActionSheetAssistant's interaction with WKContentView in a @p...
Andy Estes
Reported 2014-10-16 14:50:29 PDT
[iOS] Capture WKActionSheetAssistant's interaction with WKContentView in a @protocol
Attachments
Patch (24.95 KB, patch)
2014-10-16 14:52 PDT, Andy Estes
no flags
Patch (16.36 KB, patch)
2014-11-04 12:22 PST, Andy Estes
mitz: review+
Andy Estes
Comment 1 2014-10-16 14:51:01 PDT
Andy Estes
Comment 2 2014-10-16 14:52:30 PDT
WebKit Commit Bot
Comment 3 2014-10-16 14:55:15 PDT
Attachment 239975 [details] did not pass style-queue: ERROR: Source/WebKit2/UIProcess/API/Cocoa/_WKElementAction.mm:94: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/WebKit2/UIProcess/API/Cocoa/_WKElementAction.mm:100: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/WebKit2/UIProcess/API/Cocoa/_WKElementAction.mm:106: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/WebKit2/UIProcess/API/Cocoa/_WKElementAction.mm:112: Place brace on its own line for function definitions. [whitespace/braces] [4] Total errors found: 4 in 9 files If any of these errors are false positives, please file a bug against check-webkit-style.
Andy Estes
Comment 4 2014-10-18 10:05:54 PDT
The gtk-wk2 failure was due to the EWS bot running out of disk space.
Andy Estes
Comment 5 2014-10-19 17:24:33 PDT
An alternate approach I considered here was to have WKContentView conform to WKWebViewContentProvider and then have WKActionSheetAssistant take an id<WKActionSheetAssistant>. Unfortunately, the amount of refactoring needed to make WKContentView conform to WKWebViewContentProvider exceeded what was necessary for this patch (unless I just added stubs to WKContentView, which didn't seem right).
Andy Estes
Comment 6 2014-10-19 17:26:21 PDT
s/id<WKActionSheetAssistant>/id<WKWebViewContentProvider>/
Tim Horton
Comment 7 2014-10-20 00:26:46 PDT
Comment on attachment 239975 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=239975&action=review > Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:202 > + _interactionSheet = adoptNS([WKActionSheet new]); new :(
Andy Estes
Comment 8 2014-10-20 09:28:14 PDT
mitz
Comment 9 2014-11-04 09:36:43 PST
Comment on attachment 239975 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=239975&action=review > Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.h:52 > +@protocol WKActionSheetAssistantDelegate > +@required > +@property (nonatomic, readonly) const WebKit::InteractionInformationAtPosition& positionInformation; > +- (void)updatePositionInformation; > +- (void)performAction:(WebKit::SheetAction)action; > +- (void)openElementAtLocation:(CGPoint)location; > +- (RetainPtr<NSArray>)actionsForElement:(_WKActivatedElementInfo *)element defaultActions:(RetainPtr<NSArray>)defaultActions; > +- (void)startInteractionWithElement:(_WKActivatedElementInfo *)element; > +- (void)stopInteraction; > +@end All methods in a delegate protocol must have one parameter which is the delegating object (in this case, the WKActionSheetAssistant). None of these do!
mitz
Comment 10 2014-11-04 09:50:51 PST
(In reply to comment #9) > All methods in a delegate protocol must have one parameter which is the > delegating object (in this case, the WKActionSheetAssistant). Oops, this may read differently than intended. Instead of “have one parameter” I should have said “include one parameter”, or simply “include the delegating object as one of the parameters”.
Andy Estes
Comment 11 2014-11-04 12:22:29 PST
Reopening to attach new patch.
Andy Estes
Comment 12 2014-11-04 12:22:30 PST
WebKit Commit Bot
Comment 13 2014-11-04 12:24:44 PST
Attachment 240941 [details] did not pass style-queue: ERROR: Source/WebKit2/UIProcess/API/Cocoa/_WKElementAction.mm:94: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/WebKit2/UIProcess/API/Cocoa/_WKElementAction.mm:100: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/WebKit2/UIProcess/API/Cocoa/_WKElementAction.mm:106: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/WebKit2/UIProcess/API/Cocoa/_WKElementAction.mm:112: Place brace on its own line for function definitions. [whitespace/braces] [4] Total errors found: 4 in 6 files If any of these errors are false positives, please file a bug against check-webkit-style.
Andy Estes
Comment 14 2014-11-04 13:44:05 PST
Note You need to log in before you can comment on or make changes to this bug.