browser(webkit): respect download attribute (#5474)

References #5396
This commit is contained in:
Andrey Lushnikov 2021-02-16 10:22:19 -08:00 committed by GitHub
parent d0352cfb71
commit 4f1d84d6b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -1,2 +1,2 @@
1434
Changed: yurys@chromium.org Mon 08 Feb 2021 09:49:33 AM PST
1435
Changed: lushnikov@chromium.org Tue Feb 16 10:30:00 MST 2021

View file

@ -670,6 +670,11 @@ static NSSet *dataTypes()
{
LOG(@"decidePolicyForNavigationAction");
if (navigationAction.shouldPerformDownload) {
decisionHandler(WKNavigationActionPolicyDownload);
return;
}
if (navigationAction._canHandleRequest) {
decisionHandler(WKNavigationActionPolicyAllow);
return;