From b498a3f2ba862c654b93d09a2188b111cacc356a Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Fri, 24 Apr 2020 16:53:25 -0700 Subject: [PATCH] browser(webkit): make blob downloads work on Mac (#1971) --- browser_patches/webkit/BUILD_NUMBER | 2 +- browser_patches/webkit/src/Tools/Playwright/mac/AppDelegate.m | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/browser_patches/webkit/BUILD_NUMBER b/browser_patches/webkit/BUILD_NUMBER index 9c2de76605041..44ba2fc680cbb 100644 --- a/browser_patches/webkit/BUILD_NUMBER +++ b/browser_patches/webkit/BUILD_NUMBER @@ -1 +1 @@ -1210 +1211 diff --git a/browser_patches/webkit/src/Tools/Playwright/mac/AppDelegate.m b/browser_patches/webkit/src/Tools/Playwright/mac/AppDelegate.m index d46e0dbe96777..f4edc978e8c31 100644 --- a/browser_patches/webkit/src/Tools/Playwright/mac/AppDelegate.m +++ b/browser_patches/webkit/src/Tools/Playwright/mac/AppDelegate.m @@ -372,6 +372,10 @@ - (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigati { LOG(@"decidePolicyForNavigationAction"); + if (navigationAction._shouldPerformDownload) { + decisionHandler(_WKNavigationActionPolicyDownload); + return; + } if (navigationAction._canHandleRequest) { decisionHandler(WKNavigationActionPolicyAllow); return;