[Webkit-unassigned] [Bug 195225] Check whether to launch a default action instead of action sheet
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Mar 5 21:09:42 PST 2019
https://bugs.webkit.org/show_bug.cgi?id=195225
--- Comment #10 from Daniel Bates <dbates at webkit.org> ---
Comment on attachment 363650
--> https://bugs.webkit.org/attachment.cgi?id=363650
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=363650&action=review
> Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:275
> + auto delegate = _delegate.get();
.get() is not needed. This local is not needed as its only used in this line. Just inline right hand side.
> Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:289
> + DDDetectionController *controller = [getDDDetectionControllerClass() sharedController];
auto?
> Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:624
> + DDAction *action = [controller defaultActionForURL:targetURL results:nil context:context];
auto?
> Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:625
> + RetainPtr<WKActionSheetAssistant> retainedSelf = self;
auto retainedSelf = retainPtr(self);
> Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:626
> + _WKElementAction *elementAction = [_WKElementAction elementActionWithTitle:[action localizedName] actionHandler:^(_WKActivatedElementInfo *actionInfo) {
Dot notation please whenever possible in objective C.
auto?
> Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:627
> + retainedSelf.get()->_isPresentingDDUserInterface = action.hasUserInterface;
.get() not necessary
> Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:628
> + [[getDDDetectionControllerClass() sharedController] performAction:action fromAlertController:retainedSelf.get()->_interactionSheet.get() interactionDelegate:retainedSelf.get()];
Ditto for second argument.
> Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:631
> + return (BOOL)!action.hasUserInterface;
Cast is unnecessary. Or if it is necessary then move return type to before block start to remove the cast.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190306/329e6964/attachment-0001.html>
More information about the webkit-unassigned
mailing list