From 29f4f18d6d68ac3bd24206f98640d200bb3ac074 Mon Sep 17 00:00:00 2001 From: Pavel Feldman Date: Mon, 10 Feb 2020 19:20:32 -0800 Subject: [PATCH] browser(webkit): allow beforeunload override when headful (#921) --- browser_patches/webkit/BUILD_NUMBER | 2 +- browser_patches/webkit/patches/bootstrap.diff | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/browser_patches/webkit/BUILD_NUMBER b/browser_patches/webkit/BUILD_NUMBER index f36e367645..e60c25e12e 100644 --- a/browser_patches/webkit/BUILD_NUMBER +++ b/browser_patches/webkit/BUILD_NUMBER @@ -1 +1 @@ -1140 +1141 diff --git a/browser_patches/webkit/patches/bootstrap.diff b/browser_patches/webkit/patches/bootstrap.diff index fce45a4362..2457a295bc 100644 --- a/browser_patches/webkit/patches/bootstrap.diff +++ b/browser_patches/webkit/patches/bootstrap.diff @@ -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; + }]; +} +