[Webkit-unassigned] [Bug 217869] Minor additions to minibrowser

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Oct 18 13:24:04 PDT 2020


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

--- Comment #5 from Darin Adler <darin at apple.com> ---
Comment on attachment 411655
  --> https://bugs.webkit.org/attachment.cgi?id=411655
Patch

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

> Tools/MiniBrowser/mac/SettingsController.h:62
> + at property (nonatomic, readonly) BOOL useInvalidHTTPSWebsites;

I would call this "allow", not "use".

> Tools/MiniBrowser/mac/SettingsController.m:178
> +    [self _addItemWithTitle:@"Enable accessing sites with an invalid HTTPS configuration" action:@selector(toggleUseInvalidHTTPSWebsites:) indented:YES];

This needs a shorter title. I think "Allow Invalid HTTPS" would be a good title.

> Tools/MiniBrowser/mac/WK2BrowserWindowController.m:795
> +    SettingsController *settingsController = [[NSApplication sharedApplication] browserAppDelegate].settingsController;

No need to mix styles here. Could just write NSApplication.sharedApplication.browserAppDelegate.settingsController.

> Tools/MiniBrowser/mac/WK2BrowserWindowController.m:797
> +    if ([challenge protectionSpace].serverTrust
> +        && settingsController.useInvalidHTTPSWebsites) {

WebKit coding style would put this on one line, not broken like this.

> Tools/MiniBrowser/mac/WK2BrowserWindowController.m:800
> +        NSURLCredential *httpsCred =
> +        [[NSURLCredential alloc] initWithTrust:[challenge protectionSpace].serverTrust];

This is not WebKit project style formatting, breaking the line like this. I suggest doing it in one line. I think credential is a fine name for this local variable, fitting more with WebKit coding style.

This object is being leaked here. This file does not get compiled with ARC, so we need to call release on httpsCred before returning.

-- 
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/20201018/9f424c94/attachment-0001.htm>


More information about the webkit-unassigned mailing list