Skip to content

[iOS] Pass correct main frame info when using Chromium web views #29177

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

Merged
merged 1 commit into from
May 22, 2025

Conversation

kylehickinson
Copy link
Collaborator

This change introduces a CWVNavigationAction subclass and new delegate method specific to BraveWebView that provides the correct info from web::WebStatePolicyDecider::RequestInfo for determining if the navigation was done on the main frame which fixes things such as aggressive shields showing interstitials for blocked subframe navigations.

Resolves brave/brave-browser#46239

@kylehickinson kylehickinson self-assigned this May 22, 2025
@kylehickinson kylehickinson requested a review from a team as a code owner May 22, 2025 15:33
@kylehickinson kylehickinson added CI/skip-android Do not run CI builds for Android CI/skip-macos-x64 Do not run CI builds for macOS x64 CI/skip-windows-x64 Do not run CI builds for Windows x64 CI/skip-macos-arm64 Do not run CI builds for macOS arm64 CI/skip-teamcity Do not run builds in TeamCity labels May 22, 2025
This change introduces a `CWVNavigationAction` subclass and new delegate method specific to `BraveWebView` that provides the correct info from `web::WebStatePolicyDecider::RequestInfo` for determining if the navigation was done on the main frame which fixes things such as aggressive shields showing interstitials for blocked subframe navigations.
@kylehickinson kylehickinson force-pushed the ios-chromium-request-info branch from 41f949c to 916ae89 Compare May 22, 2025 15:57
@kylehickinson kylehickinson merged commit be26474 into master May 22, 2025
18 checks passed
@kylehickinson kylehickinson deleted the ios-chromium-request-info branch May 22, 2025 17:38
@github-actions github-actions bot added this to the 1.81.x - Nightly milestone May 22, 2025
brave-builds added a commit that referenced this pull request May 22, 2025
@brave-builds
Copy link
Collaborator

Released in v1.81.5

@kjozwiak
Copy link
Member

Verification PASSED on iPhone 11 running iOS 18.4.1 using the following build(s):

Brave | 1.81.12 Chromium: 137.0.7151.44 (Official Build) nightly (64-bit) 
--- | ---
Revision | d7a3d6610442...
OS | iOS

Using the STR/Cases outlined via brave/brave-browser#46239 (comment), ensured that amazon.com was loading without any issues/failures when Trackers & Ads Blocking is set as Aggressive while having brave://flags#brave-use-chromium-web-embedder enabled as per the following:

Example Example
IMG_1170 IMG_1171

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/skip-android Do not run CI builds for Android CI/skip-macos-arm64 Do not run CI builds for macOS arm64 CI/skip-macos-x64 Do not run CI builds for macOS x64 CI/skip-teamcity Do not run builds in TeamCity CI/skip-windows-x64 Do not run CI builds for Windows x64
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Seeing domain blocked interstitial on Amazon.com with Chromium web embedder flag enabled
5 participants