Commit Graph
100 Commits
Author SHA1 Message Date
Kyle Hickinson 9ae2bcca11 [iOS] [Origin] Gate WebUIs on admin policies (#37041)
* [iOS] [Origin] Gate ads-internal WebUI on Brave Rewards policy
* [iOS] [Origin] Gate leo-ai WebUI on AI Chat policy
* [iOS] [Origin] Gate wallet WebUI on Brave Wallet policy
2026-06-05 19:14:08 -04:00
Kyle Hickinson 992b068c09 [iOS] Migrate Block All Cookies preference to Chromium profile prefs (#36532)
This deprecates the Swift-side Preference for Block All Cookies and migrates it to PrefService, updating all usages and observations
2026-06-05 09:52:54 -04:00
Kyle Hickinson 7726cd762a [iOS] Opt-in to prettier for iOS typescript/markdown (#36998) 2026-06-04 20:53:52 -04:00
Kyle Hickinson d12b8b1d55 [iOS] Hide unavailable features from Shortcut widgets (#36989)
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.
2026-06-04 20:51:53 -04:00
Kyle Hickinson bbf4285ed5 [iOS] [Origin] Don't initialize ads service when Rewards is unavailable (#36985) 2026-06-04 12:32:04 -04:00
Kyle Hickinson 6c47850c0b [iOS] Add support for randomized message handlers in JavaScriptFeatures (#36371)
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.
2026-06-03 15:16:40 -04:00
Kyle Hickinson 798e46c6a7 [iOS] Add methods for sending tokenized prompts to the browser (#36855)
This adds an additional tokenized method `sendWebKitMessageSynchronously` alongside `sendTokenizedWebKitMessage{WithReply}` that uses `window.prompt` from SafeBuiltins.
2026-06-03 09:18:29 -04:00
Kyle Hickinson e400d7b93c [iOS] Add support for token validation in JavaScriptFeatures (#36853)
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
2026-06-02 10:34:45 -04:00
Kyle Hickinson 55dedb3293 [iOS] Remove dead code from Playlist script (#36898)
Also fixes the `isElementVisible` function used in the long press action which was missing an arg
2026-06-02 10:32:17 -04:00
Kyle Hickinson 4c5405a5f4 Partial Revert "[iOS]Restore private tabs when "Keep private tabs" is enabled (#34421)" (#36783)
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
2026-05-27 19:37:11 -04:00
Kyle Hickinson 26470af4d2 [iOS] Handle all executions errors from simulator test runner summary (#36727)
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
2026-05-26 19:04:09 +01:00
Kyle Hickinson 338be09e58 [iOS] Add application context check in Origin factory constructor (#36721)
Fixes IOSChromeUnitTest bundles crashing since the application context is not set up for those unit tests
2026-05-26 12:11:39 -04:00
Kyle Hickinson c51ef668da [iOS] [Origin] Dont show sponsored images when rewards is unavailable (#36613)
This also hides the option from the NTP settings page
2026-05-21 15:36:45 -04:00
Kyle Hickinson 6f8c76c892 [iOS] [Origin] Initialize policy manager before profile creation (#36586)
This fixes a deadlock in which the Profile never completes its initialization so the app never shows the browser window
2026-05-20 23:09:40 -04:00
Kyle Hickinson 2e91d30f41 [iOS] [CodeHealth] Use native API to pause media playback (#36544)
Adds TabState APIs to access playback state and pause playback and remove the exposed JS method from the Playlist script
2026-05-20 17:46:14 +01:00
Kyle Hickinson 96de413d94 [iOS] [CodeHealth] Remove unused Brave Talk rewards opt-in view (#36546)
This opt-in view was no longer presented from Brave Talk so it can be removed
2026-05-20 16:10:18 +01:00
Kyle Hickinson 2d0d727bce [iOS] [CodeHealth] Cleanup SKUs related code (#36488)
- 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
2026-05-20 10:49:15 -04:00
Kyle Hickinson 66d5c98ef3 [iOS] Fix local release builds with siso enabled (#36538)
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
2026-05-20 10:09:02 -04:00
Kyle Hickinson b5bd698a46 [iOS] Add GPC JavaScriptFeature (#36094)
This adds a JavaScriptFeature that adds `navigator.globalPrivacyControl` to the page when the `UseProfileWebViewConfiguration` is enabled.
2026-05-19 16:14:17 +01:00
Kyle Hickinson 9877355bd3 [iOS] Add media backgrounding JavaScriptFeature (#36189)
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.
2026-05-19 10:20:47 -04:00
Kyle Hickinson c5fbe9b095 [iOS] [Origin] Include Playlist in Reset to Defaults (#36372) 2026-05-13 13:54:31 -04:00
Kyle Hickinson dc278b581c [iOS] Update JitsiMeetSDK to 12.1.3 (#36250) 2026-05-08 12:27:16 -04:00
Kyle Hickinson ed31fc0d7f [iOS] Display toast on Origin settings after changing a feature state (#36220)
* [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
2026-05-08 12:25:02 -04:00
Kyle Hickinson 2b1b8cf843 [iOS] Migrate media background pref to Chromium (#36187) 2026-05-06 17:00:17 -04:00
Kyle Hickinson c6e3f20ec9 [iOS] Fix TabState storage on reader mode tab helper (#36211)
Fixes a regression in #34545 which caused `TabState` to leak due to storing the `TabState` incorrectly in `ReaderModeTabHelper`
2026-05-06 12:03:42 -04:00
Kyle Hickinson 5fd911c8bd [iOS] Avoid tab retain cycle in NTP section setup (#36212)
Fixes a regression in #35937 which caused a TabState leak by accessing `tab` inside of the setup closure
2026-05-06 12:03:29 -04:00
Kyle Hickinson 3bebcb4e82 [iOS] Construct reader mode CSP meta tags at page construction (#36173)
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.
2026-05-05 13:31:58 -04:00
Kyle Hickinson a1bb07bf14 [iOS] Run JavaScript alert & prompt on MainActor (#36108)
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
2026-05-02 00:28:37 +01:00
Kyle Hickinson 427c20167d [iOS] Re-assign UI delegate after restoring a tab (#36109)
`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.
2026-05-01 23:13:05 +01:00
Kyle Hickinson 79dc45b0b4 [iOS] Update DarkReader and Night Mode exception list (#35968)
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`
2026-05-01 17:06:14 -04:00
Kyle Hickinson 961aaca593 [iOS] Migrate GPC preference to profile pref (#36093)
This migrates and deprecates the current GPC pref we have in the Swift side and exposes a way to fetch the profile pref from the pref service
2026-05-01 17:04:47 -04:00
Kyle Hickinson 59690c1927 [iOS] Hide shortcut button for features disabled by Origin (#35951)
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
2026-04-30 16:33:52 -04:00
Kyle Hickinson d04b85f55d [iOS] Add Brave Search "Make Default" JavaScriptFeature (#36001)
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.
2026-04-30 14:35:05 -04:00
Kyle Hickinson 578fa28be3 [iOS] [Origin] Remove subtitle shown when you re-enable features (#36052) 2026-04-30 13:17:00 -04:00
Kyle Hickinson e58e4c9750 [iOS] Replace OSCrypt usage in Rewards Obj-C bridge (#35939)
This replaces the deprecated `OSCrypt` usages in `BraveRewardsAPI` with `OSCryptAsync`
2026-04-30 13:15:51 -04:00
Kyle Hickinson a7eba3f4dc [iOS] Add Brave navigator JavaScriptFeature (#36021)
This adds a `JavaScriptFeature` based on the `BraveGetUA.js` to support `navigator.brave.isBrave` when the `UseProfileWebViewConfiguration` feature flag is enabled
2026-04-30 13:15:29 -04:00
Kyle Hickinson 57a43ba6a7 [iOS] Add Brave Origin deep link route (#35971)
This adds a deep link route for presenting the Brave Origin paywall (or settings if already purchased)
2026-04-30 10:29:12 -04:00
Kyle Hickinson dc769c43d6 [iOS] Fix access of autofill controller in BraveWebView (#35899)
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)
2026-04-30 10:28:23 -04:00
Kyle Hickinson 9ae0dc6c0e [iOS] Add missing captive portal tab helper creation (#35999)
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}
2026-04-30 10:09:03 -04:00
Kyle Hickinson 51dbde1261 [iOS] Remove FullscreenHelper JavaScript (#36022)
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
2026-04-30 09:54:46 -04:00
Kyle Hickinson 2765657db5 [iOS] Hide URL bar correctly when find-in-page is active (#35976)
This fixes a regression where the URL bar wouldn't hide/collapse correctly while find-in-page was active
2026-04-29 12:08:09 -04:00
Kyle Hickinson e9f4285068 [iOS] Avoid continuation misuse in Leo WebUI photo picker (#35974)
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.
2026-04-28 15:26:37 -04:00
Kyle Hickinson ec2c7ec26c [iOS] Re-land Disable measured pre-boot in test runner (#35972) 2026-04-28 18:13:53 +01:00
Kyle Hickinson cbb092dc2f [iOS] Disable privacy reports & other notifications with Origin (#35937)
This avoids scheduling the privacy reports & default browser notifications when the user has Brave Origin purchased
2026-04-28 09:57:21 -04:00
Kyle Hickinson baee47957f [iOS] Handle purchase flow cancellation in Origin paywall correctly (#35949)
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
2026-04-27 16:26:30 -04:00
Kyle Hickinson c61ec53492 [iOS] Update order of autofill related JS features (#35897)
This fixes password autofill scripts failing to find suggestions for forms
2026-04-27 11:38:44 -04:00
Kyle Hickinson e07fdcc3f7 [iOS] Allow Playlist to be disabled within Origin settings (#35733) 2026-04-27 10:45:43 -04:00
Kyle Hickinson df01d3e55f [iOS] [AI Chat] Replace Skia with UIKit for image decoding & scaling (#35878)
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.
2026-04-26 09:41:16 -04:00
Kyle Hickinson 55141b78df [iOS] Dont update url when safe browsing interstitials are visible (#35889)
This created further issues with Chromium web views and never updated the security icon either
2026-04-24 15:59:09 -04:00
Kyle Hickinson faa9db41a8 [iOS] [AI Chat] Downscale large images selected from photo picker/camera (#35880)
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.
2026-04-24 15:08:17 -04:00
Kyle Hickinson ebf278fdc3 [iOS] Re-add legacy NTP internal scheme handler (#35844)
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
2026-04-23 18:33:06 -04:00
Kyle Hickinson 617b17cc2a [iOS] [AI Chat] Use Skia to process images pasted into the input field (#35826)
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
2026-04-23 20:55:14 +00:00
Kyle Hickinson 8e463b3d5e [iOS] Add Youtube video quality JavaScriptFeature (#35738)
This adds a JavaScriptFeature that enables the auto highest quality video feature on YouTube videos when using the `UseProfileWebViewConfiguration` feature flag
2026-04-23 15:24:40 +00:00
Kyle Hickinson b63114511d [iOS] Migrate youtube quality preference to Chromium (#35736)
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.
2026-04-22 16:52:36 -04:00
Kyle Hickinson 779110a2b6 [iOS] Add safe builtins JavaScript feature (#35629)
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)
2026-04-22 10:41:47 -04:00
Kyle Hickinson 81a466d5d6 [iOS] Enable smooth scrolling in BraveWebClient (#35740)
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}
2026-04-21 19:49:57 -04:00
Kyle Hickinson a19526809f [iOS] Update Brave Origin product copy (#35685) 2026-04-20 16:48:42 -04:00
Kyle Hickinson cebb58cd22 [iOS] Remove basic auth failure count from TabDelegate (#35681)
This argument was never used with Chromium web views and now can be fully removed
2026-04-20 14:24:29 -04:00
Kyle Hickinson 09d2051d9e [iOS] Update doc in BraveStoreSDK.updateSkusPurchaseState (#35682)
This doc was out of date when we added Origin to this
2026-04-20 16:52:23 +00:00
Kyle Hickinson 97888c0118 [iOS] Only restore Origin when using restoring in Origin paywall (#35470)
This avoids attempts to restore other Leo & VPN services when tapping the restore button on the Origin paywall
2026-04-20 12:37:36 -04:00
Kyle Hickinson 72ced66216 [iOS] Always show basic auth prompt even with a preexisting credential (#35677)
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.
2026-04-20 12:25:15 -04:00
Kyle Hickinson 85dd9fc324 [iOS] Dismiss and show Origin settings after successful purchase (#35644) 2026-04-20 10:19:56 -04:00
Kyle Hickinson 144a23d129 [iOS] Force left-to-right URL rendering in collapsed URL bar state (#35564) 2026-04-16 15:16:08 +00:00
Kyle Hickinson c827c80ad4 [iOS] Add Origin entry to chrome://flags (#35488) 2026-04-14 18:14:12 +00:00
Kyle Hickinson 614c95c1df [iOS] Increase sync device limit to 50 to match backend (#35457)
The current client-side limit of 10 was out of date
2026-04-13 12:38:14 -04:00
Kyle Hickinson 8de02abf6a [iOS] [CodeHealth] Replace deprecated UIMenuController usages (#35172)
This removes all usages of `UIMenuController` and `MenuHelper`, replacing it with the newer `UIEditMenuInteraction` API
2026-04-03 09:49:42 -04:00
Kyle Hickinson 8e8c047f04 [iOS] [CodeHealth] Remove unused variables (#35169)
Fixes warnings across the codebase for variables that are no longer used anywhere
2026-04-02 19:32:29 +02:00
Kyle Hickinson 4e1fcd989d [iOS] [CodeHealth] SwiftUI listBackgroundColor modifier warning fixes (#35165)
Removes the custom `listBackgroundColor` modifier which was no longer needed and replaces all instances with the expected `scrollContentBackground`/`background` modifiers
2026-04-02 18:08:13 +02:00
Kyle Hickinson 78c4993d19 [iOS] [CodeHealth] Miscellaneous warning fixes (#35170)
Fixes warnings to do with:
- Unused function results
- Optional fallback/checks on non-optional types
- Ambiguous equality checks
2026-04-02 17:36:33 +02:00
Kyle Hickinson 98691ace5a [iOS] [CodeHealth] Add explicit retroactive conformances attribute (#35168)
Adds `@retroactive` to suppress warnings on types that we actively control, and removes it from one retroactive conformance that we don't (`WKWebsiteDataRecord`)
2026-04-02 11:12:59 -04:00
Kyle Hickinson 938f795326 [iOS] Disable measured pre-boot in test runner (#35181) 2026-04-02 09:21:11 +01:00
Kyle Hickinson 08c7583575 [iOS] [CodeHealth] SwiftUI onChange modifier deprecation warning fixes (#35164)
This replaces all deprecated uses of the `View.onChange` with the replacement that has 2 arguments
2026-04-02 01:07:16 +02:00
Kyle Hickinson fcb4c75242 [iOS] Remove unused playlist folder sharing script & related handlers (#35118)
This feature is no longer maintained/used by Brave so we can remove it entirely
2026-04-01 21:54:04 +02:00
Kyle Hickinson b2387889dc [iOS] Support search ads view event triggers when using profile configs (#35090)
This enables the usage of the new `BraveSearchAdResultsJavaScriptFeature` when the `UseProfileWebViewConfiguration` feature flag is enabled
2026-04-01 13:26:18 -04:00
Kyle Hickinson 46c80adbf6 [iOS] Support Translate using Chromiums implementation (#35117)
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.
2026-04-01 12:55:59 -04:00
Kyle Hickinson e3b56ca4ba [iOS] Remove ReadyStateScript (#35044)
This removes the ReadyStateScript JS and its handlers and migrates the logic executed based on those scripts to the `tabDidCommitSameDocumentNavigation` observer method
2026-04-01 06:47:28 +02:00
Kyle Hickinson d26b3f9e33 [iOS] Add support for using Chromiums translation controller (#35055)
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.
2026-03-31 16:06:59 -04:00
Kyle Hickinson 38f8af772c Improve iOS simulator wipe and boot reliability in test runners (#35111)
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}
2026-03-31 11:32:21 -04:00
Kyle Hickinson 386f292095 [iOS] Add Brave Search Ads Result JavaScriptFeature (#35016)
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.
2026-03-30 17:00:12 -04:00
Kyle Hickinson 0343c9fb7d [iOS] Consolidate Brave Search functionality into a tab helper (#35024)
This shifts the Brave Search related logic that existed in several locations into a tab helper in preparation to support Brave Search related JavaScriptFeatures
2026-03-30 15:40:29 -04:00
Kyle Hickinson 48f53ddd33 [iOS] Add Night Mode JavaScriptFeature (#34968)
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)
2026-03-30 15:40:06 -04:00
Kyle Hickinson 565872c5ed [iOS] Expose TabObserver method for handling same document commits (#35043)
This will be used to remove `ReadyStateScript.js` in a future PR
2026-03-30 14:53:54 -04:00
Kyle Hickinson 1882d81bf8 [iOS] Integrate Chromium favicon state observation (#34936)
Moves favicon state ownership to `FaviconTabHelper` and implements the observations required to handle favicons when the `UseProfileWebViewConfiguration` feature flag is enabled.
2026-03-30 14:36:04 -04:00
Kyle Hickinson b14cc824d7 [iOS] Don't create private WebKit config with profile configs enabled (#35042)
Follow-up fix for #34329 where a WebKit configuration was being created when the final private tab was removed
2026-03-30 17:44:52 +00:00
Kyle Hickinson b603170f2f [iOS] Expose observations for Chromium's favicon JavaScriptFeature (#34911)
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.
2026-03-30 12:21:42 -04:00
Kyle Hickinson d40ce12f69 [iOS] Use Chrome Print JavaScriptFeature (#34820)
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`
2026-03-27 14:21:35 -04:00
Kyle Hickinson bde0f9ace1 [iOS] Update Night Mode JS content world (#34959)
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
2026-03-27 12:23:35 -04:00
Kyle Hickinson 3f8f05d6ff [iOS] Consolidate night mode functionality into a tab helper (#34958)
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.
2026-03-27 10:54:40 -04:00
Kyle Hickinson 3e4296ac34 [iOS] Fix Swift package resolution warnings (#35023)
Removes copies for assets that dont exist
2026-03-26 21:38:58 +01:00
Kyle Hickinson 00a1b41039 [iOS] [AIChat] Support tools for custom models (#34944)
This adds a new toggle to the custom model form to allow the user to control whether or not the local modal supports tools
2026-03-26 15:33:26 -04:00
Kyle Hickinson f1e524783a [iOS] Remove TabManager reference from InfoBar (#35015)
InfoBar is a plain view, it should not be creating tabs, it should be up the caller to handle `onLinkPressed`
2026-03-26 18:46:54 +01:00
Kyle Hickinson 21d15967c3 [iOS] Fix browser menu row button tap region on iPad (#34954)
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.
2026-03-26 13:38:51 -04:00
Kyle Hickinson 0a441f8e79 [iOS] Fix wallet compilation on Xcode 26.4 (#34990)
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)
2026-03-26 16:22:33 +00:00
Kyle Hickinson 340bf7920f [iOS] Move YT quality preference observation into tab helper (#34987) 2026-03-26 10:39:00 -04:00
Kyle Hickinson 8d9e7d2ce8 [iOS] Vendor in Swift-BigInt dependency (#34989)
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
2026-03-26 10:36:03 -04:00
Kyle Hickinson 932a671167 [iOS] Hide tab bar when using bottom bar & in overlay mode (#34994) 2026-03-25 20:47:43 +01:00
Kyle Hickinson d20d8f46df [iOS] Always show mode option picker when adding a device to sync (#34904) 2026-03-24 19:07:28 +00:00
Kyle Hickinson 01eee1ef48 [iOS] Add link options to Origin settings view (#34943) 2026-03-24 14:54:38 -04:00
Kyle Hickinson 2783197e1e [iOS] Add reset functionality to Brave Origin settings (#34938) 2026-03-24 13:12:10 -04:00
Kyle Hickinson a0877d1461 [iOS] Add new favicon status to TabState (#34909)
This exposes the new favicon status method from WebState in TabState. In the future the `Favicon` value will be removed
2026-03-24 09:59:06 -04:00