browser(webkit): allow beforeunload override when headful (#921)

This commit is contained in:
Pavel Feldman 2020-02-10 19:20:32 -08:00 committed by GitHub
parent 251ad38824
commit 29f4f18d6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -1 +1 @@
1140
1141

View File

@ -14277,10 +14277,10 @@ index 0000000000000000000000000000000000000000..4dbf13c8fb31a745ae8e1965a457d4fb
+@end
diff --git a/Tools/Playwright/mac/BrowserWindowController.m b/Tools/Playwright/mac/BrowserWindowController.m
new file mode 100644
index 0000000000000000000000000000000000000000..033c4fcda83002cda5d069205d4f605d02f1e1f5
index 0000000000000000000000000000000000000000..72edf5c432f58659765d16dabdb536b44942b1f2
--- /dev/null
+++ b/Tools/Playwright/mac/BrowserWindowController.m
@@ -0,0 +1,826 @@
@@ -0,0 +1,828 @@
+/*
+ * Copyright (C) 2010-2016 Apple Inc. All rights reserved.
+ *
@ -14842,9 +14842,11 @@ index 0000000000000000000000000000000000000000..033c4fcda83002cda5d069205d4f605d
+ [alert addButtonWithTitle:@"Leave Page"];
+ [alert addButtonWithTitle:@"Stay On Page"];
+
+ _alert = alert;
+ [alert beginSheetModalForWindow:self.window completionHandler:^void (NSModalResponse response) {
+ completionHandler(response == NSAlertFirstButtonReturn);
+ [alert release];
+ _alert = nil;
+ }];
+}
+