From 26699bebc4c4072ad19c5afda7e7813169c7a494 Mon Sep 17 00:00:00 2001 From: bwaresiak Date: Fri, 20 Dec 2024 08:28:02 +0100 Subject: [PATCH] Delegate new tab creation to WebView (#3746) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task/Issue URL: https://app.asana.com/0/856498667320406/1208699273169079/f Tech Design URL: CC: **Description**: Delegate new tab creation to WebView. **Steps to test this PR**: 1. Navigate to https://privacy-test-pages.site/privacy-protections/referrer-trimming/ 2. Check for referrer and how tabs behave. **Definition of Done (Internal Only)**: * [ ] Does this PR satisfy our [Definition of Done](https://app.asana.com/0/1202500774821704/1207634633537039/f)? **Device Testing**: * [ ] iPhone * [ ] iPad **OS Testing**: * [ ] iOS 15 * [ ] iOS 16 * [ ] iOS 17 * [ ] iOS 18 --- ###### Internal references: [Software Engineering Expectations](https://app.asana.com/0/59792373528535/199064865822552) [Technical Design Template](https://app.asana.com/0/59792373528535/184709971311943) --- DuckDuckGo/TabViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DuckDuckGo/TabViewController.swift b/DuckDuckGo/TabViewController.swift index 19bb29eeec..031dd5ea55 100644 --- a/DuckDuckGo/TabViewController.swift +++ b/DuckDuckGo/TabViewController.swift @@ -2032,8 +2032,8 @@ extension TabViewController: WKNavigationDelegate { } if isNewTargetBlankRequest(navigationAction: navigationAction) { - delegate?.tab(self, didRequestNewTabForUrl: url, openedByPage: true, inheritingAttribution: adClickAttributionLogic.state) - completion(.cancel) + // This will fallback to native WebView handling through webView(_:createWebViewWith:for:windowFeatures:) + completion(allowPolicy) return }