This stores features that are unavailable in the group container similar to favourites to adjust how the shortcuts widget is displayed when features are unavailable due to Brave Origin or enterprise policies.
This change adds a helper class `RandomizedMessageHandlerName` that can be used in JavaScriptFeature's to support randomizing message handler names. The randomized message handler is a UUIDv4 which is injected with the script itself via placeholder replacement.
This adds an additional tokenized method `sendWebKitMessageSynchronously` alongside `sendTokenizedWebKitMessage{WithReply}` that uses `window.prompt` from SafeBuiltins.
This change adds a helper class `MessageHandlerToken` that can be used in JavaScriptFeature's to support tokenized communication validation. The token is a UUIDv4 which is injected with the script itself via placeholder replacement. Given the sensitivity of the token
This removes the newly added auth check when the Private Tabs > Require Face ID setting is enabled which could conflict with Browser Lock and leave the user stuck on the launch screen
The `step_text` key is only ever set if an exception was raised while executing the iOS simulator test runners, we should ensure that all exceptions result in a failure to catch issues such as `AppLaunchError` which occurs when the test suite crashes and fails to run any tests
- Removes `BraveSkusManager`, shifting majority of logic onto `SkusService` extension
- Removes `setLocalStorageReceipt` in SKUS user script since this data is already injected into the local storage in `BraveSkusAccountLink.injectLocalStorage` every navigation on valid domains
- Removes a number of unused functions/types
- Shifted VPN session expiration into `BraveVPN`
- Moves order ID preference update side-effects out of credential summary getter
We use `isBraveReleaseBuild` when disabling `enable_dsyms` but `is_official_build` when re-enabling them on iOS so local release builds were being built with `enable_dsyms = false` incorrectly
This adds a new JavaScriptFeature that enables background audio for videos when the `UseProfileWebViewConfiguration` feature flag is enabled.
This script diverges slightly from its original in that it exposes an API to call instead of being dynamically injected based on the preference. By doing this we also change it to be injected into the main frame only and use the document end injection timing.
* [iOS] Display toast on Origin settings after changing a feature state
This adds a new toast that displays until the user dismisses it/swipes it away that explains to users that the app needs to be restarted in order to apply Origin changes
* scoped animations, accessibility improvements, swap to overlay
+ only show toast on successful change
This changes the reader mode scripts to send only the actual meta tag content to the browser so that the tag can be constructed securely during reader mode page construction rather than copied in as-is.
This fixes a DCHECK that occurs when these methods are handled by Brave since they will execute as nonisolated and trigger a sequence checker in Chromium
`CWVWebView` resets the held `JavaScriptPresenter` when its WebState is reset such as when you restore a tab, but it does not assign the `UIDelegate` back even if the `CWVWebView` still has one, so this re-assigns the `CWVUIDelegate` after a restore so that JS alerts/confirmations/prompts work on restored tabs.
This bumps the DarkReader dependency from `4.9.119` to `4.9.125` and updates its exception list. The update removes these sites from the exception list as they either were invalid or no longer needed: `amazon.com`, `presearch.com`, `macrumors.com`, `9to5mac.com`, `wowhead.com`, `xbox.com`, `thegamer.com`, `starwars.com`
This updates hides both the options that are disabled in the shortcut button picker as well as the shortcut button itself if the option was selected prior to disabling the feature with Origin
This adds support for `getCanSetDefaultSearchProvider` and `setIsDefaultSearchProvider` JS functions available to Brave Search to enable quick-Brave Search-default setting when the `UseProfileWebViewConfiguration` feature flag is enabled.
This adds a `JavaScriptFeature` based on the `BraveGetUA.js` to support `navigator.brave.isBrave` when the `UseProfileWebViewConfiguration` feature flag is enabled
This updates the chromium_src overrides that enable the usage of `CWVAutofillController`, namely removing logic in the `WebView*` types that use `WebViewBrowserState` rather than a dependency injected into the client. This means creating a few new overrides for `IOSWebViewPaymentsAutofillClient` and supplying a different autofill client bridge/driver for the `CWVAutofillController` (via subclass)
This tab helper was converted to `WebStateUserData` in cr147 so it was no longer being created correctly. This change refactors the override to expose the tab helper properly so that it can be created it in `AttachTabHelpers`
Chromium change:
commit b689e19d72624727f68767ca806a1de7044f97a7
Author: Sylvain Defresne <sdefresne@chromium.org>
Date: Mon Feb 23 05:15:34 2026 -0800
[ios] Convert CaptivePortalTabHelper into a WebStateUserData<T>
With the optimisation to create TabHelper only for realized WebStates,
it is no longer necessary to use LazyWebStateUserData<T>. Convert the
class CaptivePortalTabHelper to use WebStateUserData<T> instead.
Bug: 409299519
Change-Id: Ib14babdf5bd6f1ea43b494f4ccce62e43084e3d8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7594552
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Federica Germinario <fedegermi@google.com>
Reviewed-by: Federica Germinario <fedegermi@google.com>
Cr-Commit-Position: refs/heads/main@{#1588636}
The purpose of this script was to enable fullscreen support on iPads for devices that didn't yet have support, however as of iOS 16.4 this API is fully featured on iPads already so there is no reason to inject it anymore since our minimum deployment target is iOS 17
This is a speculative fix for the Photos picker calling the `didFinishPicking` delegate method more than once by ensuring that the continuation is niled out after a single use.
This fixes a bug where if you cancelled the payment flow on the Origin paywall it would still dismiss the paywall and send you to the Origin settings page
Skia's `SkCanvas` requires the usage of a `DiscardableMemoryAllocator` which is not set in Chromium iOS so the shared scale logic fails a CHECK and crashes at runtime.
This applies the same 1024x768 limit as when you paste an image into Leo to the photo picker & camera attachment options which should help with web process lagging and possibly crashing while it loads the image into context.
This temporarily adds a internal scheme handler for the old NTP url (`internal://local/about/home`) so that legacy URLs that may still exist in a users back/forward list and open tabs will load correctly after upgrade
This replaces the DataDecoder service which is not available to use and hits a fatal CHECK on iOS when not building with blink, fixing the crash when pasting images into the input field on Leo WebUI
This adds a JavaScriptFeature that enables the auto highest quality video feature on YouTube videos when using the `UseProfileWebViewConfiguration` feature flag
This migrates the media preference that controls whether or not we automatically set youtube videos to the highest quality to Chromium's preferences. This is required to implement the same JavaScript feature when using profile web view configurations.
This adds a base JavaScriptFeature for accessing safe builtins in Brave JS features that require it based on the code in `__firefox__.js`. The main difference here is that this PR only focuses on the builtins (Object, Function, Array) needed for Web3 scripts and does not handle any `toString` overrides (which were only needed for tokenized communication)
Brave handles the web views frame while scrolling on the Swift side so we need to return true for the `IsSmoothScrollingSupported` web client method so that it doesn't automatically inset the web view by the safe area
Chromium change:
commit 0b9166658b79a5f788860e3e215165d8d26d73b1
Author: Gauthier Ambard <gambard@chromium.org>
Date: Mon Mar 9 08:40:04 2026 -0700
[iOS] Replace use of SmoothScrolling flag with the provider
This is how it is supposed to be used. Make sure to move all the uses of
the smooth scrolling flag at the same time to have a state where half
the app is using the flag and the other app the provider.
Also, updates the test to ensure they only run when the provider is
returning true.
The download manager test is updated as the tap was failing.
Bug: 483998779
Change-Id: Ic81a977ecbc0ebc131c49bd992511a97eb916abb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7648409
Reviewed-by: Aliona Dangla <alionadangla@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1596357}
This fixes a bug where the a webpage could request basic auth credentials indefinitely after a user inputs invalid credentials as Brave would simply automatically resubmit with those credentials. This change ensures that the prompt is always displayed to the user regardless and just pre-fills the prompt with the supplied credential for the user to correct on follow-up auth attempts.
Removes the custom `listBackgroundColor` modifier which was no longer needed and replaces all instances with the expected `scrollContentBackground`/`background` modifiers
Adds `@retroactive` to suppress warnings on types that we actively control, and removes it from one retroactive conformance that we don't (`WKWebsiteDataRecord`)
This adds a new flow for using Chromium's Translate component through `CWVTranslationController` when the `UseProfileWebViewConfiguration` feature flag is enabled.
Note: This new tab helper does not support the Apple on-device translation feature flag yet.
This removes the ReadyStateScript JS and its handlers and migrates the logic executed based on those scripts to the `tabDidCommitSameDocumentNavigation` observer method
This implements the required method in `BraveWebView` to access the embedded `CWVTranslationController`. The controller will only function correctly when `UseProfileWebViewConfiguration` is enabled since it requires the Chromium JavaScript features to be injected.
This adds patches that bring in the changes from a cr148 CL to hopefully improve the issue in CI where simulators hang when tearing down.
Chromium change:
commit 39a1c1938c9f9c3bcf36f015172600018169b6db
Author: Yue She <yueshe@google.com>
Date: Wed Mar 18 11:57:28 2026 -0700
Improve iOS simulator wipe and boot reliability in test runners
- Reorders simulator teardown steps: `kill_simulators` is now invoked
after wiping/erasing data instead of before. This ensures that any stray processes or simulators>
procedures are properly cleaned up.
- Adds a retry mechanism for simulator pre-booting.
Bug: 441038354
Change-Id: I8f94649d195a3804d9392dafdcde6dbd2c88ec88
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7676077
Reviewed-by: Will Yeager <wyeager@google.com>
Commit-Queue: Yue She <yueshe@google.com>
Cr-Commit-Position: refs/heads/main@{#1601444}
This adds a JavaScriptFeature based on `BraveSearchResultAdScript.js` that allows us to fetch the ads creatives from the Brave Search page. This differs from the original script in that it doesn't message the app at all and instead exposes an API which avoids having to do origin checks in the script itself.
This shifts the Brave Search related logic that existed in several locations into a tab helper in preparation to support Brave Search related JavaScriptFeatures
This adds a JavaScriptFeature for injecting the standard DarkReader. At the moment this does not inject any additional TypeScript to expose an API interface due to Chromium limitations (Chromium JS can only execute from `WebFrame` but `WebFrame`s are collected asynchronously and isn't ready in time to execute `DarkReader.enable` before the page begins to paint causing a white flash)
Moves favicon state ownership to `FaviconTabHelper` and implements the observations required to handle favicons when the `UseProfileWebViewConfiguration` feature flag is enabled.
This adds support for handling favicon updates from `BraveWebView` by exposing the required methods into `TabObserver`.
Currently we reuse the same `BraveIOSWebFaviconDriver` that is wrapped by `FaviconDriver` and stored in `TabBrowserData`, but hopefully in the future we can just use Chromiums `WebFaviconDriver` directly.
This uses the existing Chrome `PrintJavaScriptFeature` and implements the required printing handlers in a new tab helper. This new tab helper houses the majority of the print logic that was in `PrintScriptHandler`
This changes the content world that Night Mode is injected to be the default sandboxed content world. This is a preemptive change as Chromium doesn't support custom content worlds
This shifts the night mode logic that existed in several locations into a tab helper. As as aside this also removes redundant night mode script assignments since it was already part of the "always injected scripts" list.
Apply a second `contentShape(.rect)` after `hoverEffect` to re-assert the custom ButtonStyle hit-test boundaries, which `hoverEffect` was breaking on iPad by restoring the default increased Button hit-test slop.
Xcode 26.4 has a stricter type checker when it comes to numbers which can cause ambiguity errors when compiling code with custom equality & comparison overloads that use strict number types (`Double` in this case)
This dependency doesn't seem to be maintained anymore and needs further updates to compile with Xcode 26.4. Since its only used for certain wallet frontend pieces in iOS and may go away completely in the future, vendoring this in for simplicity