Summary: | [iOS] Capture WKActionSheetAssistant's interaction with WKContentView in a @protocol | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Andy Estes <aestes> | ||||||
Component: | New Bugs | Assignee: | Andy Estes <aestes> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | commit-queue, enrica, mitz, thorton | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Andy Estes
2014-10-16 14:50:29 PDT
Created attachment 239975 [details]
Patch
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.
The gtk-wk2 failure was due to the EWS bot running out of disk space. 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). s/id<WKActionSheetAssistant>/id<WKWebViewContentProvider>/ 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 :( Committed r174885: <http://trac.webkit.org/changeset/174885> 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! (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”. Reopening to attach new patch. Created attachment 240941 [details]
Patch
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.
Committed r175577: <http://trac.webkit.org/changeset/175577> |