Title: [271485] trunk/Source/WebKit
- Revision
- 271485
- Author
- [email protected]
- Date
- 2021-01-14 09:15:03 -0800 (Thu, 14 Jan 2021)
Log Message
Update buttons of media permission prompt on macOS
https://bugs.webkit.org/show_bug.cgi?id=220613
Patch by Sihui Liu <[email protected]> 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):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (271484 => 271485)
--- trunk/Source/WebKit/ChangeLog 2021-01-14 16:43:00 UTC (rev 271484)
+++ trunk/Source/WebKit/ChangeLog 2021-01-14 17:15:03 UTC (rev 271485)
@@ -1,3 +1,15 @@
+2021-01-14 Sihui Liu <[email protected]>
+
+ Update buttons of media permission prompt on macOS
+ https://bugs.webkit.org/show_bug.cgi?id=220613
+
+ Reviewed by Eric Carlson.
+
+ Make allow button on the right and not selected to match TCC prompts.
+
+ * UIProcess/Cocoa/MediaPermissionUtilities.mm:
+ (WebKit::alertForPermission):
+
2021-01-14 Per Arne Vollan <[email protected]>
[GPUP][iOS] Create sandbox extensions for cache and temp directory
Modified: trunk/Source/WebKit/UIProcess/Cocoa/MediaPermissionUtilities.mm (271484 => 271485)
--- trunk/Source/WebKit/UIProcess/Cocoa/MediaPermissionUtilities.mm 2021-01-14 16:43:00 UTC (rev 271484)
+++ trunk/Source/WebKit/UIProcess/Cocoa/MediaPermissionUtilities.mm 2021-01-14 17:15:03 UTC (rev 271485)
@@ -183,10 +183,12 @@
#if PLATFORM(MAC)
auto alert = adoptNS([NSAlert new]);
[alert setMessageText:alertTitle];
- [alert addButtonWithTitle:doNotAllowButtonString];
- [alert addButtonWithTitle:allowButtonString];
+ NSButton *button = [alert addButtonWithTitle:allowButtonString];
+ button.keyEquivalent = @"";
+ button = [alert addButtonWithTitle:doNotAllowButtonString];
+ button.keyEquivalent = @"\E";
[alert beginSheetModalForWindow:webView.window completionHandler:[completionBlock](NSModalResponse returnCode) {
- auto shouldAllow = returnCode == NSAlertSecondButtonReturn;
+ auto shouldAllow = returnCode == NSAlertFirstButtonReturn;
completionBlock(shouldAllow);
}];
#else
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes