Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

browser(webkit): fix WebKit compilation on MacOS 12 (#10843)

Andrey Lushnikovc5c960e76f31
diff --git a/browser_patches/webkit/BUILD_NUMBER b/browser_patches/webkit/BUILD_NUMBER
index 356342ba0f..6613ff0623 100644
--- a/browser_patches/webkit/BUILD_NUMBER
+++ b/browser_patches/webkit/BUILD_NUMBER
@@ -1,2 +1,2 @@
-1586
-Changed: [email protected] Tue 07 Dec 2021 12:22:45 PM PST
+1587
+Changed: [email protected] Thu Dec 9 16:44:57 PST 2021
diff --git a/browser_patches/webkit/build.sh b/browser_patches/webkit/build.sh
index 392c759b6d..280a7aa111 100755
--- a/browser_patches/webkit/build.sh
+++ b/browser_patches/webkit/build.sh
@@ -49,6 +49,8 @@ if [[ "$(uname)" == "Darwin" ]]; then
selectXcodeVersionOrDie "11.7"
elif [[ "${CURRENT_HOST_OS_VERSION}" == "11."* ]]; then
selectXcodeVersionOrDie "12.2"
+ elif [[ "${CURRENT_HOST_OS_VERSION}" == "12."* ]]; then
+ selectXcodeVersionOrDie "13.2"
else
echo "ERROR: ${CURRENT_HOST_OS_VERSION} is not supported"
exit 1
diff --git a/browser_patches/webkit/embedder/Playwright/mac/BrowserWindowController.m b/browser_patches/webkit/embedder/Playwright/mac/BrowserWindowController.m
index 11a7415fd9..0b5fef6cea 100644
--- a/browser_patches/webkit/embedder/Playwright/mac/BrowserWindowController.m
+++ b/browser_patches/webkit/embedder/Playwright/mac/BrowserWindowController.m
@@ -911,7 +911,10 @@ static NSSet *dataTypes()
- (IBAction)saveAsPDF:(id)sender
{
NSSavePanel *panel = [NSSavePanel savePanel];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
panel.allowedFileTypes = @[ @"pdf" ];
+#pragma clang diagnostic pop
[panel beginSheetModalForWindow:self.window completionHandler:^(NSInteger result) {
if (result == NSModalResponseOK) {
[_webView createPDFWithConfiguration:nil completionHandler:^(NSData *pdfSnapshotData, NSError *error) {
@@ -924,7 +927,10 @@ static NSSet *dataTypes()
- (IBAction)saveAsWebArchive:(id)sender
{
NSSavePanel *panel = [NSSavePanel savePanel];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
panel.allowedFileTypes = @[ @"webarchive" ];
+#pragma clang diagnostic pop
[panel beginSheetModalForWindow:self.window completionHandler:^(NSInteger result) {
if (result == NSModalResponseOK) {
[_webView createWebArchiveDataWithCompletionHandler:^(NSData *archiveData, NSError *error) {