Skip to content

Bugfix FXIOS-9909 [Content Sharing] Block open external apps (backport #26341) #26534

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented May 6, 2025

📜 Tickets

Jira ticket
Github issue

💡 Description

Bugfix block open external apps with special WKNavigationActionPolicy private case, which stands for allowBlockingUniversalLinks. Remove TabNavigationManagerDelegate since it was adding a layer on top of WKNavigationDelegate which were resulting in the BrowserViewController having not direct influence on the navigation, since for delayed response the TabNavigationManagerDelegate would respond before the browser.

Now as discussed with @afurlan-firefox we have the same behavior of other browsers, that by default we open external apps without user asking, but we block for all privates tabs. Still the user can block all the apps, by turning on the appropriate setting.

🎥 Demos

ScreenRecording_04-28-2025.15-07-55_1.MP4

📝 Checklist

  • I filled in the ticket numbers and a description of my work
  • I updated the PR name to follow our PR naming guidelines
  • I ensured unit tests pass and wrote tests for new code
  • If working on UI, I checked and implemented accessibility (Dynamic Text and VoiceOver)
  • If adding telemetry, I read the data stewardship requirements and will request a data review
  • If needed, I updated documentation and added comments to complex code
  • If needed, I added a backport comment (example @Mergifyio backport release/v120)

This is an automatic backport of pull request #26341 done by [Mergify](https://mergify.com).

* Remove TabManagerNavigation, fix opening external apps

* remove note

* tests

* Added tests for BrowserViewController+WebViewDelegates decide policy for navigation action

* Add note around private policy

* Fix failing tests

* remove tests that depends on time

* fix lint

* Fix as per code review

* Refactor TabManager as per code review

* Fix error

* fix BrowserViewController build issue

* Update mocks

* Removed unused file

---------

Co-authored-by: Filippo <[email protected]>
(cherry picked from commit 8553936)

# Conflicts:
#	firefox-ios/Client.xcodeproj/project.pbxproj
#	firefox-ios/Client/Frontend/Browser/BrowserViewController/Extensions/BrowserViewController+WebViewDelegates.swift
#	firefox-ios/Client/TabManagement/TabManagerImplementation.swift
#	firefox-ios/firefox-ios-tests/Tests/ClientTests/TabManagement/Legacy/TabManagerNavDelegateTests.swift
@mergify mergify bot added the conflicts label May 6, 2025
@mergify mergify bot requested a review from a team as a code owner May 6, 2025 13:54
Copy link
Contributor Author

mergify bot commented May 6, 2025

Cherry-pick of 8553936 has failed:

On branch mergify/bp/release/v138/pr-26341
Your branch is up to date with 'origin/release/v138'.

You are currently cherry-picking commit 855393657.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   firefox-ios/Client/Frontend/Browser/BrowserViewController/Views/BrowserViewController.swift
	modified:   firefox-ios/Client/TabManagement/TabManager.swift
	deleted:    firefox-ios/Client/TabManagement/TabManagerNavDelegate.swift
	modified:   firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Browser/BrowserViewControllerWebViewDelegateTests.swift
	modified:   firefox-ios/firefox-ios-tests/Tests/ClientTests/Mocks/MockTabManager.swift

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	both modified:   firefox-ios/Client.xcodeproj/project.pbxproj
	both modified:   firefox-ios/Client/Frontend/Browser/BrowserViewController/Extensions/BrowserViewController+WebViewDelegates.swift
	both modified:   firefox-ios/Client/TabManagement/TabManagerImplementation.swift
	deleted by them: firefox-ios/firefox-ios-tests/Tests/ClientTests/TabManagement/Legacy/TabManagerNavDelegateTests.swift

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot requested review from thatswinnie and removed request for a team May 6, 2025 13:54
@FilippoZazzeroni FilippoZazzeroni added the Do Not Merge ⛔️ This issue is a work in progress and is not ready to land label May 8, 2025
@lmarceau lmarceau requested a review from FilippoZazzeroni May 9, 2025 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conflicts Do Not Merge ⛔️ This issue is a work in progress and is not ready to land
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant