Changeset 271485 in webkit


Ignore:
Timestamp:
Jan 14, 2021 9:15:03 AM (18 months ago)
Author:
commit-queue@webkit.org
Message:

Update buttons of media permission prompt on macOS
https://bugs.webkit.org/show_bug.cgi?id=220613

Patch by Sihui Liu <sihui_liu@appe.com> on 2021-01-14
Reviewed by Eric Carlson.

Make allow button on the right and not selected to match TCC prompts.

  • UIProcess/Cocoa/MediaPermissionUtilities.mm:

(WebKit::alertForPermission):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r271482 r271485  
     12021-01-14  Sihui Liu  <sihui_liu@appe.com>
     2
     3        Update buttons of media permission prompt on macOS
     4        https://bugs.webkit.org/show_bug.cgi?id=220613
     5
     6        Reviewed by Eric Carlson.
     7
     8        Make allow button on the right and not selected to match TCC prompts.
     9
     10        * UIProcess/Cocoa/MediaPermissionUtilities.mm:
     11        (WebKit::alertForPermission):
     12
    1132021-01-14  Per Arne Vollan  <pvollan@apple.com>
    214
  • trunk/Source/WebKit/UIProcess/Cocoa/MediaPermissionUtilities.mm

    r271229 r271485  
    184184    auto alert = adoptNS([NSAlert new]);
    185185    [alert setMessageText:alertTitle];
    186     [alert addButtonWithTitle:doNotAllowButtonString];
    187     [alert addButtonWithTitle:allowButtonString];
     186    NSButton *button = [alert addButtonWithTitle:allowButtonString];
     187    button.keyEquivalent = @"";
     188    button = [alert addButtonWithTitle:doNotAllowButtonString];
     189    button.keyEquivalent = @"\E";
    188190    [alert beginSheetModalForWindow:webView.window completionHandler:[completionBlock](NSModalResponse returnCode) {
    189         auto shouldAllow = returnCode == NSAlertSecondButtonReturn;
     191        auto shouldAllow = returnCode == NSAlertFirstButtonReturn;
    190192        completionBlock(shouldAllow);
    191193    }];
Note: See TracChangeset for help on using the changeset viewer.