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

This commit is contained in:
Andrey Lushnikov 2021-12-09 16:49:01 -08:00 committed by GitHub
parent 4621f61c7d
commit c5c960e76f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 2 deletions

View File

@ -1,2 +1,2 @@
1586
Changed: yurys@chromium.org Tue 07 Dec 2021 12:22:45 PM PST
1587
Changed: lushnikov@chromium.org Thu Dec 9 16:44:57 PST 2021

View File

@ -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

View File

@ -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) {