Commit Graph
73905 Commits
Author SHA1 Message Date
Mikhail 596d26319f [Code Health] Format components/cosmetic_filters/**/*.{ts,js} (#32555)
Format components/cosmetic_filters/**/*.{ts,js}
2025-12-03 01:04:25 +04:00
Mihai PLESA f164d87981 require higher nodejs and npm (#32356) 2025-12-02 20:40:30 +00:00
Brian CliftonandSimon Hong ad6b43a4a8 Fix the path used when looking at registry for some policies (#32628)
* Fix the path used when looking at registry for UserDataDir policy

This only overrides a specific case for UserDataDir when suffix is not appended.

Fixes https://github.com/brave/brave-browser/issues/41854

Co-authored-by: Simon Hong <shong@brave.com>
2025-12-02 12:09:32 -07:00
Kevin Smith fbceb44f69 [Welcome Page] Add scaffolding for new welcome page (#32612) 2025-12-02 14:04:19 -05:00
Kevin Smith e4fa2093b4 [Shields UI] Cache Shields WebContents when displayed in page info bubble (#32558) 2025-12-02 12:58:07 -05:00
Kevin Smith c35483c546 [NTP] Add Rewards provider deprecation notice (#32611) 2025-12-02 12:04:34 -05:00
brave-builds adbd8d6f62 1.87.41 2025-12-02 16:03:10 +00:00
Kevin Smith 3706c72068 [NTP] Deduplicate scoped_css module (#32622) 2025-12-02 09:02:34 -05:00
brave-builds a71136a542 1.87.40 2025-12-02 12:28:19 +00:00
brave-builds edf1f58e94 1.87.39 2025-12-02 12:03:52 +00:00
vadimsandShivan aacd064270 [Element Blocker] Disabled by Default Support for Blocking Elements in Private Browsing (#32339)
Added the ability to enable or disable the element blocker in private browsing
mode using a separate toggle in the shields settings area (default OFF).

Resolves: https://github.com/brave/brave-browser/issues/49428

---------

Signed-off-by: Vadym Struts <vstruts@brave.com>
Co-authored-by: Shivan <shivankaulsahib@gmail.com>
2025-12-02 11:12:45 +01:00
dependabot[bot] 44bb3d10d7 Bump mdast-util-to-hast from 13.1.0 to 13.2.1 (#32632)
Bumps [mdast-util-to-hast](https://github.com/syntax-tree/mdast-util-to-hast) from 13.1.0 to 13.2.1.
- [Release notes](https://github.com/syntax-tree/mdast-util-to-hast/releases)
- [Commits](https://github.com/syntax-tree/mdast-util-to-hast/compare/13.1.0...13.2.1)

---
updated-dependencies:
- dependency-name: mdast-util-to-hast
  dependency-version: 13.2.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-02 09:06:04 +00:00
Max Karolinskiy d48c531fb2 Update l10n for 1.85.x (Chromium 143). (#32503) (lowered to master). (#32620)
Update l10n for 1.85.x (Chromium 143). (#32503)

* Fixes replacement map.

Some languages use non-breaking whitespace intead of regular space in
XTB files, so our map wasn't matching. Replaced spaces to \s in the map
patterns.

* Fixes error printing.

* Adjust ICU strings validation pattern.

* Fixes <br> -> <br/> tags.

* Updated l10n for 1.85.x release.
2025-12-01 23:06:16 -05:00
Douglas Daniel 6c2c874388 [AI Chat]: Disable Premium Models in Skill Dropdown for Non-Premium Users (#32629)
Fixes a bug where a Non-Premium user was able to select a Premium Model in the Create/Edit Skill model
2025-12-01 21:42:33 -06:00
Sangwoo Ko c2a6385f87 Fill extra space in vertical tab strip for pinned tabs (#32513)
* Fill extra space in vertical tab strip for pinned tabs

When there's extra space next to pinned tabs, fill it evenly among
pinned tabs.
2025-12-02 11:44:09 +09:00
Douglas Daniel f67cbb0a57 [AI Chat]: Handle Premium Models for Regenerate Answer UI (#32626)
Will now display Premium labels for Premium models in the Regenerate Answer menu for non-premium users.
Will now show the Premium Suggestion alert if a non-premium user click on a Premium model in the Regenerate Answer menu
2025-12-01 20:42:35 -06:00
Jay Harris 72b1571e3c [AI Chat]: Allow triggering the attachments menu from anywhere in the input box (#32607) 2025-12-02 03:07:17 +01:00
Max Karolinskiy 4f827dd899 [cr143 follow up] Rename BraveSidePanel to SidePanel (#32613)
* Rename BraveSidePanel to SidePanel.

We fully replace upstream's SidePanel class with our own. To avoid
adding chromium_src redefinitions in multiple places we can just use the
upstream name for our class.

* Rename brave_side_panel.h/cc -> side_panel.h/cc

* Rename brave_side_panel_resize_widget.h/cc -> side_panel_resize_widget.h/cc
2025-12-01 17:43:28 -08:00
Jay Harris f87c333c80 [AI Chat]: Port fuzzy finder to Typescript and use it for matches in the filter menu (#32592) 2025-12-02 13:24:16 +13:00
brave-builds 315a76e406 1.87.38 2025-12-02 00:04:05 +00:00
brave-builds 0f9d406e0f 1.87.37 2025-12-01 21:40:06 +00:00
Andrea 2d97608128 [ollama] ui (#31570)
* Add Ollama integration to Leo Assistant settings

- Add OllamaService mojo interface bindings in settings UI
- Include ollama.mojom in settings build configuration
- Add Ollama model discovery UI in model list section
- Update content security policy for Ollama endpoints
- Add localized strings for Ollama integration
- Wire up Ollama service through settings browser proxy
2025-12-01 22:21:46 +01:00
samartnik 7d939c6c4f [CodeHealth][Android] Remove obsolete adjustment for menu footer (#32617) 2025-12-01 15:51:22 -05:00
Nuo Xu f271c74699 [iOS] [VPN] Hide smart proxy indicator beside server/region when it is disabled (#32598) 2025-12-01 11:47:27 -08:00
Terry Mancey cd180cb9f9 [ads][CodeHealth] Network client (#32614) 2025-12-01 19:59:00 +01:00
Szilard Szaloki 7a8a6f166b Disables pull-to-refresh in the Brave Account dialog on Android (#32595) 2025-12-01 18:53:03 +01:00
brave-builds 3699dcf66c 1.87.36 2025-12-01 16:59:23 +00:00
Anton Paymyshev 41acc1bba7 Fix wallet panel disappearing (#32556) 2025-12-01 17:30:26 +01:00
samartnik 527af47c4b [cr143][Android] Fix for crash on trying to group with null parent (#32610) 2025-12-01 11:05:20 -05:00
brave-builds 5f591192f1 1.87.35 2025-12-01 16:03:58 +00:00
Brian R. Bondy 6744853b96 Intermittent failure fix for clickjacking test (#32604)
DecentralizedDnsNavigationThrottleBrowserTest.ClickjackingProtectionPreventsEarlyClicks

Directly control the proceedClicksEnabled JS variable instead of racing against the 500ms timer.

The test was flaky because the timer starts at DOMContentLoaded but the test waits for
document.readyState=='complete', which can take >500ms on slow CI machines, causing the protection to
expire before the test runs.

[ RUN      ] DecentralizedDnsNavigationThrottleBrowserTest.ClickjackingProtectionPreventsEarlyClicks
[19651:1178558:1117/200021.772078:INFO:brave/components/brave_referrals/browser/brave_referrals_service.cc:84] Could not get promo code from /Users/jenkins/jenkins/workspace/brave-browser-build-macos-arm64-nightly/src/out/Release_arm64. The extended attribute com.brave.refcode was not found.
[19651:1178493:1117/200021.848031:ERROR:chrome/browser/ui/views/user_education/impl/browser_user_education_interface_impl.cc:154] Attempting to show IPH IPH_DiscardRing before browser initialization complete; IPH will not be shown.
../../brave/browser/decentralized_dns/test/decentralized_dns_navigation_throttle_browsertest.cc:327: Failure
Expected equality of these values:
  static_cast<int>(ResolveMethodTypes::ASK)
    Which is: 0
  local_state()->GetInteger(kENSResolveMethod)
    Which is: 3
Stack trace:
0   brave_browser_tests                 0x00000001028ed558 cxxbridge1$string$len + 847592
1   brave_browser_tests                 0x000000010d10375c secp256k1_ecdsa_recover + 2729628
4   brave_browser_tests                 0x000000010515cdd0 _v8_internal_Node_Print(void*) + 7890684
10  brave_browser_tests                 0x000000010d102bc8 secp256k1_ecdsa_recover + 2726664
2025-12-01 09:08:50 -05:00
brave-buildsandbrave-builds-ro f4f289ce56 Roll perf profiles update (update-perf-profile-2025-11-30-16-16) (#32605)
* Update perf profile brave-typical-mac using v1.87.31
* Update perf profile brave-typical-android using v1.87.23
* Update perf profile brave-typical-win using v1.87.30
* Update perf profile chrome-typical-mac using v1.87.31
* Update perf profile chrome-typical-android using v1.87.23
* Update perf profile chrome-typical-win using v1.87.30
---------

Co-authored-by: brave-builds-ro <devops+robuilds@brave.com>
2025-12-01 13:38:13 +01:00
brave-builds 50705da57d 1.87.34 2025-12-01 12:14:47 +00:00
brave-builds 50aedac435 1.87.33 2025-12-01 12:03:34 +00:00
brave-builds c466c7a64d 1.87.32 2025-12-01 00:03:15 +00:00
Jay Harris e5be87eb2c [AI Chat]: Allow navigations from the untrusted frames and from the sidebar (#32590) 2025-12-01 08:16:14 +13:00
Sangwoo Ko e6c4f6144c Force context menu on Shift + Right Click on elements in pages (#31770)
* Force context menu on Shift + Right Click on elements in pages

This PR introduces a feature that allows users to open the context menu
even if `event.preventDefault()` is called on the `contextmenu` event
when the Shift key is pressed.

This is particularly useful for users who want to access the context
menu on web pages that disable it through JavaScript.

This is achieved by bypassing the `preventDefault` check for
`contextmenu` events when the Shift key is detected as being pressed in
the "EventDispatcher" so that Node's `DefaultEventHandler` is called.

* Exclude rewrite from license checks
2025-11-30 17:08:45 +09:00
Brian R. Bondy f0656b06f9 Consolidate pref_names.h files (common -> browser) (#32603)
Consolidate pref_names duplicates (common -> browser)
2025-11-29 22:15:10 -05:00
Aleksei Seren e8a45a9125 [ads] Unify UrlRequest logic for iOS (#32599)
Use NetworkClient implementation for iOS
Brave Ads URL requests, matching the
logic already used on Desktop and Android.
2025-11-29 18:34:53 -05:00
Sangwoo Ko 7bd18a26f9 Fix plaster apply command on Windows (#32199)
Fix patch file path generation with PurePath.as_posix()

On Windows path delimiter is `\` and on other platforms `/`. We should normalize the path.
WIth this patch, two particular errors are fixed

```
[11:25:08] Applying plaster file: c:\Users\sangwoo\brave\src\brave\rewrite\chrome\app\BUILD.gn.toml                                                                                           plaster.py:333
Traceback (most recent call last):                                                                                                                                                                        
  File "c:\Users\sangwoo\brave\src\brave\tools\cr\plaster.py", line 429, in <module>
    sys.exit(main())
             ^^^^^^
  File "c:\Users\sangwoo\brave\src\brave\tools\cr\plaster.py", line 424, in main
    args.func(args)
  File "c:\Users\sangwoo\brave\src\brave\tools\cr\plaster.py", line 404, in <lambda>
    apply_parser.set_defaults(func=lambda args: apply())
                                                ^^^^^^^
  File "c:\Users\sangwoo\brave\src\brave\tools\cr\plaster.py", line 334, in apply
    plaster_file.apply()
  File "c:\Users\sangwoo\brave\src\brave\tools\cr\plaster.py", line 257, in apply
    contents = repository.chromium.read_file(info.source)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\sangwoo\brave\src\brave\tools\cr\repository.py", line 150, in read_file
    return self.run_git('show',
           ^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\sangwoo\brave\src\brave\tools\cr\repository.py", line 79, in run_git
    return terminal.run_git('-C', self.from_brave(), *cmd, no_trim=no_trim)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\sangwoo\brave\src\brave\tools\cr\terminal.py", line 183, in run_git
    return self.run(cmd).stdout
           ^^^^^^^^^^^^^
  File "c:\Users\sangwoo\brave\src\brave\tools\cr\terminal.py", line 160, in run
    raise e
  File "c:\Users\sangwoo\brave\src\brave\tools\cr\terminal.py", line 151, in run
    result = subprocess.run(cmd,
             ^^^^^^^^^^^^^^^^^^^
  File "C:\depot_tools\bootstrap-2@3_11_8_chromium_35_bin\python3\bin\Lib\subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['git', '-C', '..', 'show', 'HEAD:chrome\\app\\BUILD.gn']' returned non-zero exit status 128.

```
[11:24:08] Applying plaster file: c:\Users\sangwoo\brave\src\brave\rewrite\chrome\app\BUILD.gn.toml                                                                                           plaster.py:333
Traceback (most recent call last):                                                                                                                                                                        
  File "c:\Users\sangwoo\brave\src\brave\tools\cr\plaster.py", line 429, in <module>
    sys.exit(main())
             ^^^^^^
  File "c:\Users\sangwoo\brave\src\brave\tools\cr\plaster.py", line 424, in main
    args.func(args)
  File "c:\Users\sangwoo\brave\src\brave\tools\cr\plaster.py", line 404, in <lambda>
    apply_parser.set_defaults(func=lambda args: apply())
                                                ^^^^^^^
  File "c:\Users\sangwoo\brave\src\brave\tools\cr\plaster.py", line 334, in apply
    plaster_file.apply()
  File "c:\Users\sangwoo\brave\src\brave\tools\cr\plaster.py", line 310, in apply
    has_changed = info.save_patch_if_changed(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\sangwoo\brave\src\brave\tools\cr\plaster.py", line 210, in save_patch_if_changed
    return self.patch.save_if_changed(new_content=content, dry_run=dry_run)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\sangwoo\brave\src\brave\tools\cr\plaster.py", line 79, in save_if_changed
    self.path.write_text(new_content, encoding='utf-8')
  File "C:\depot_tools\bootstrap-2@3_11_8_chromium_35_bin\python3\bin\Lib\pathlib.py", line 1078, in write_text
    with self.open(mode='w', encoding=encoding, errors=errors, newline=newline) as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\depot_tools\bootstrap-2@3_11_8_chromium_35_bin\python3\bin\Lib\pathlib.py", line 1044, in open
    return io.open(self, mode, buffering, encoding, errors, newline)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'patches\\chrome\\app\\BUILD.gn.patch'
```****
```
2025-11-29 12:40:31 +01:00
Brian R. Bondy 69a0b8db1c Remove brave_infura_project_id gn var and build flag (#32602) 2025-11-28 20:00:15 -05:00
Brian R. Bondy 81e8e952cb Fix intermittent failure BraveSearchTestEnabled.DefaultAPIVisibleKnownHost (#32575) 2025-11-28 19:59:07 -05:00
Aleksei Seren be1127f56f [ads] NetworkClient code health (#32600)
PR renames NetworkClient::UrlRequest to
NetworkClient::SendRequest and
UrlRequestCallback to SendRequestCallback.
2025-11-29 00:55:56 +01:00
Brian R. Bondy a4d9248fcb Add enable_brave_wallet gn var and build flag (#32484)
* Add enable_brave_wallet GN variable and build flag

This adds a new GN build flag 'enable_brave_wallet' that can be set to
false to exclude Brave Wallet from the build. The flag is true by default
to maintain current behavior.

Changes include:
- Add enable_brave_wallet declare_args in build/config/BUILDCONFIG.gn
- Create brave_wallet/common/buildflags with ENABLE_BRAVE_WALLET flag
- Update all BUILD.gn and sources.gni files to use the new flag
- Add wallet buildflags dependencies via minimal one-line imports

* Add patches for wallet buildflags in Chromium BUILD files

Adds minimal one-line patches to import wallet buildflags dependencies
in Chromium source files. This allows Chromium code to conditionally
depend on wallet headers.

Patches:
- chrome/browser/ui/hid/BUILD.gn
- net/BUILD.gn
- third_party/blink/common/BUILD.gn
- third_party/blink/public/common/BUILD.gn
- third_party/blink/renderer/modules/permissions/BUILD.gn

* Guard wallet code in Chromium source overrides

Updates chromium_src overrides to conditionally compile wallet-related
code based on enable_brave_wallet flag. This includes:

- Adding DEPS files to allow buildflags dependencies
- Guarding wallet permission handling with #if BUILDFLAG(ENABLE_BRAVE_WALLET)
- Keeping wallet permission enum values unconditionally to maintain profile
  interchangeability between wallet-enabled and wallet-disabled builds
- Updating component registration and preference handling

Key changes:
- Permission enums remain stable across build configs for UMA and persistence
- Wallet permission handling code only compiled when wallet enabled
- DEPS files updated to allow buildflags includes

* Guard wallet UI code in front-end TypeScript and Mojom

Conditionally compiles wallet-related UI code in TypeScript and Mojom
interfaces based on enable_brave_wallet preprocessor flag.

Changes:
- Settings menu: Use lastInserted pattern for menu item ordering
- Page visibility: Guard wallet page visibility checks
- Browser commands: Guard wallet command handling
- Routes: Conditionally include wallet routes
- Add non-null assertions for DOM insertions in TypeScript
- Update Mojom interfaces to conditionally include wallet enums

Front-end code uses <if expr="enable_brave_wallet"> preprocessor
directives to exclude wallet UI when the feature is disabled.

* Guard wallet usage in non-wallet Brave code

Conditionally compiles wallet-related code in non-wallet Brave files
based on enable_brave_wallet build flag.

Changes include:
- browser/: Guard wallet service factories, preferences, and helpers
- components/: Guard wallet dependencies in rewards, sidebar, and DNS
- renderer/: Conditionally register wallet content settings
- utility/: Guard wallet component registration
- ios/: Add optional chaining for wallet feature flags
- test/: Guard wallet-related test code

Key files:
- brave_stats_updater.cc: Guard wallet pref registration with #if
- brave_profile_prefs.cc: Conditionally register wallet preferences
- sidebar_service.cc: Guard wallet panel items
- iOS WalletConstants.swift: Use optional chaining for feature checks

This allows building Brave without wallet while maintaining profile
compatibility between wallet-enabled and wallet-disabled builds.

* Add static_assert for ENABLE_BRAVE_WALLET in wallet headers

Adds compile-time assertions to wallet headers to ensure they are only
included when wallet is enabled. This prevents accidental usage of wallet
APIs when enable_brave_wallet=false.

Added static_assert(BUILDFLAG(ENABLE_BRAVE_WALLET)) to:

browser/brave_wallet/ (11 files):
- asset_ratio_service_factory.h
- brave_wallet_context_utils.h
- brave_wallet_ipfs_service_factory.h
- brave_wallet_provider_delegate_impl.h
- brave_wallet_service_factory.h
- brave_wallet_tab_helper.h
- meld_integration_service_factory.h
- wallet_notification_service_factory.h
- simulation_service_factory.h
- swap_service_factory.h
- wallet_data_files_installer_delegate_impl.h

components/brave_wallet/browser/ (15 files):
- brave_wallet_p3a_private.h
- brave_wallet_prefs.h
- brave_wallet_service.h
- brave_wallet_utils.h
- ens_resolver_task.h
- json_rpc_service_test_utils.h
- json_rpc_service.h
- keyring_service_observer_base.h
- keyring_service.h
- network_manager.h
- permission_utils.h
- pref_names.h
- test_utils.h
- tx_service.h
- wallet_data_files_installer.h

components/brave_wallet/common/ (6 files):
- brave_wallet_types.h
- common_utils.h
- eth_abi_utils.h
- features.h
- hex_utils.h
- pref_names.h

Also includes minor wallet code updates to use buildflags and
guard zcash-specific test code.

* Follow up fixes after Parts 1-7
2025-11-28 15:54:27 -05:00
samartnik f51ac207b4 [Android] Fix for qr code reader when device is flipped (#32597)
To avoid copy/pasting of the same code in `BraveLocationBarQRDialogFragment` and `BraveSyncScreensPreference`, the common code related to qr code reading was moved to `QRCodeCameraManager` class.
2025-11-28 13:43:21 -05:00
StephenHeaps 91affe0ead [iOS] Restore should shred cache assignment when restoring tabs (#32591)
Restore should shred cache assignment when restoring tabs.
2025-11-28 17:38:30 +01:00
brave-builds f3d0c17c0d 1.87.31 2025-11-28 16:04:19 +00:00
Terry Mancey d6a3e9a425 [ads][CodeHealth] Rename response status_code to code (#32589) 2025-11-28 09:37:25 -05:00
brave-builds 2b1a933455 1.87.30 2025-11-28 13:56:46 +00:00
brave-builds 9298608cf9 1.87.29 2025-11-28 13:32:00 +00:00