Commit Graph
76190 Commits
Author SHA1 Message Date
Aleksei Khoroshilov ecb96b1fef Enable more ts checks in build/commands. (#34341) 2026-03-10 14:11:32 +00:00
Douglas Daniel 8378c4d212 [Wallet]: Prices Updated Tooltip (#34578)
Introduces a Last updated time ago tooltip in the Wallet that we can display when hovering over prices.
2026-03-10 09:00:27 -05:00
Pavel Beloborodov a54d56b28d Fixed SameSite cookies exposed due cross-site navigations. (#34474) 2026-03-10 20:34:34 +07:00
brave-builds a7ce2352b6 1.90.17 2026-03-10 12:48:15 +00:00
Aleksei Khoroshilov ce76e01a49 Support contained tabs session restore and sync. (#33313)
* Support contained tabs session restore and sync.

* Review fixes.

* Use struct as a return value instead of optional with out args.

* Add a unit test for view-source: scheme.

* Move TabRestore helper to components.

* Add containers-specific SerializedNavigationBuilder* tests.

* Guard PageState.top.url_string use.

* Add plaster files for few patches.

* Replace browser_tabrestore.cc #define patch with plaster rewrite.

* Replace content_serialized_navigation_builder.cc change with rewrite.

* Fix gn check.

* Add prefix_length check.

* Improve rewrite rules.

* Guard PageState changes with buildflag.

* Rename StoragePartitionKeyToUrlPrefix.

* Add buildflag check into SerializedNavigationEntry.

* Fix build issues with containers buildflag disabled.

* Fix iOS build.
2026-03-10 19:20:50 +07:00
brave-builds 56a8b98336 1.90.16 2026-03-10 12:03:08 +00:00
Sangwoo Ko 86eda949d4 [Tree Tabs] Add tree tab collapse/expand UI button (#34469)
* Add tree tab collapse/expand UI and auto-expand on selection

- Add tree toggle button on BraveTab: when a tab has descendants, show
  expand/collapse icon (replacing close button when applicable). When
  the node is collapsed but has descendants, always show the toggle so
  users can expand. Button uses submenu/expand icons per collapsed state.

- Model: BraveTabStripModel::SetTreeTabNodeCollapsed() updates collapse
  state and notifies observers via TreeTabChange::kNodeCollapsedStateChanged.
  TreeTabModel::GetClosestCollapsedAncestor() returns the closest collapsed
  ancestor for a node.

- Controller: BraveBrowserTabStripController exposes
  SetTreeTabNodeCollapsed(), IsInCollapsedTreeTabNode(), and
  GetClosestCollapsedAncestor(). On collapsed-state change, updates the
  tab’s tree toggle icon and invalidates layout.

- Tab strip: Override SetSelection() to post ExpandAllCollapsedAncestors();
  when the user selects a tab (or adds an active new tab) that lives under
  collapsed nodes, all ancestors are expanded so the selection is visible.

- Layout: TabStripLayoutHelper marks slots in collapsed tree nodes as
  TabOpen::kClosed so those tabs are not laid out (hidden).

- Observer: Add TreeTabChange::CollapsedStateChangedChange and
  kNodeCollapsedStateChanged. TabSlotController gains
  SetTreeTabNodeCollapsed() and IsInCollapsedTreeTabNode(); TabSlotView
  gains IsInCollapsedTreeTabNode(). Chromium overrides provide no-ops or
  defaults.

- Tests: TreeTabsBrowserTest for auto-expand on selecting a tab in a
  collapsed tree and on adding an active new tab; BraveTabTestWithTreeTab
  for toggle visibility (replacing close button when has descendants, and
  always visible when collapsed with descendants).

- TreeTabNode: add set_height_for_test() for unit tests.
2026-03-10 20:57:24 +09:00
Anthony Tseng 73c1f6462f Move WASM crates next to their consumer components (#34574)
* Move opaque_ke WASM crate next to its consumer component

Move opaque_ke from third_party/wasm/ to
components/brave_account/resources/opaque_ke/ so it lives
next to the component that consumes it.

- Move crate directory with index.js as-is
- Add workspace key to Cargo.toml for workspace discovery
- Update .cargo/config.toml vendor path
- Add transpile_web_ui target in resources/opaque_ke/BUILD.gn
- Update workspace Cargo.toml member path
- Update update.py to use make_config_toml for relative vendor paths

* Move candle_embedding_gemma WASM crate next to its consumer component

Move candle_embedding_gemma from third_party/wasm/ to
components/local_ai/resources/candle_embedding_gemma/ so it lives
next to the component that consumes it.

- Move crate directory
- Add workspace key to Cargo.toml for workspace discovery
- Update .cargo/config.toml vendor path
- Update workspace Cargo.toml member path
- Update update.py PRESERVE_PATTERNS for new config location
2026-03-10 11:06:21 +00:00
Simon Hong d682c1766d Fixed VerticalTabStripBrowserTest.VerticalTabLayoutInRTL (#34594)
Issue - https://github.com/brave/brave-browser/issues/53468

Test failed with 1px overlap with contents and vertical tab.
    vertical_tab_strip_browsertest.cc(2204):
      error: Expected: (contents_bounds_right.right()) <= (tab_widget_bounds_right.x()), actual: 727 vs 726

For testing right-side vertical tab in RTL, disable rounded corners and move sidebar to left side.
So, test can compare right-side vertical tab position with contents area w/o any other factors.

Filed https://github.com/brave/brave-core/pull/34594 as right-side vertical tab has 1px off with rounded corners.
2026-03-10 15:59:23 +09:00
Darnell Andries ac8f4a61e1 Change brave_capability field to a list, add Deep Research feature & capability (#34511)
* Change `brave_capability` field to a list, add Deep Research feature & capability

* Allow multiple conversation capabilities in `ConversationHandler`

* Update tests to support capability lists

* Add CHECK for conflicting capabilities

* Add test for conversation capability set

* Fix rebase issues

* Fix storybook

* Move `ConversationCapabilitySet` to types.h

* Check that all conversation capabilities are included in model supported capabilities

* Remove `CHAT` and `CONTENT_AGENT` mutual exclusion

* Address PR test feedback
2026-03-09 21:01:29 -07:00
Pete MillerandJay Harris bd7058ebbf [AI Chat] Use brave:// URLs on android (#32721)
[AI Chat]: Make url on Android use chrome: scheme

Co-authored-by: Jay Harris <jay.harris@outlook.co.nz>
2026-03-10 03:43:24 +00:00
Szilard Szaloki f8e93a3b69 Client<>: make Response::body std::nullopt when body missing or invalid. (#34577)
Remove `JSONEmptyBody`/`ProtobufEmptyBody` semantics and simplify deserialization.
2026-03-09 20:59:49 -06:00
Brian R. Bondy af22939d2e Import Claude Code skills and helper scripts (#34569)
* Import best-practice docs from brave-experiments/brave-core-tools

* Add Claude Code skills and helper scripts

Skills for: code review, CI management,
branch management, crash analysis, upstream flake detection, PR
creation, preflight checks, and more.
2026-03-09 21:15:46 -04:00
Brian R. Bondy e7235b16de Skip CheckLongLines for web files formatted by prettier (#34584) 2026-03-09 21:14:15 -04:00
Szilard Szaloki 8459b9ccdb Fix JSONEmptyBody comparison duplicate symbol in debug builds (#34575)
Fix JSONEmptyBody comparison duplicate symbol in debug builds
2026-03-09 20:33:05 -04:00
Sangwoo Ko 1b95387c91 [Customize Toolbar]Check nullptr in ListActions and ListCategories (#34504)
* Check nullptr in ListActions and ListCategories

* Make list action modifiers more robust
2026-03-10 01:30:22 +01:00
Darnell Andries ec552262a8 Media session metric fixes (#34509)
* Media session P3A fix wip

* Move `MediaSessionMetrics` to browser/misc_metrics

* Update test

* Code follow ups

* Expand uptime monitor to record 8 days

* Revert "Expand uptime monitor to record 8 days"

This reverts commit 00dd9f1d26f5d96fb2d2dbdaf0095cb7f91c739f.

* Use TimeDelta prefs instead of TPS

* Make Session final
2026-03-10 01:29:29 +01:00
brave-builds fc73386b8a 1.90.15 2026-03-10 00:03:03 +00:00
StephenHeaps 253aaaf272 [iOS] Weakly hold TabState in ForcePasteTabHelper to resolve memory leak (#34582)
Weakly hold TabState in ForcePasteTabHelper to resolve memory leak.
2026-03-09 23:39:36 +00:00
Sangwoo Ko 1b29733681 [Containers] Fix missing colors for tabs (#34561)
* Fix wrong color ids for light-unpinned-inactive

* Add override_tab_background_color to TabAccentColors

We need to override tab background color for inactive tabs with accent in case
it's hovered.
2026-03-10 07:55:37 +09:00
Anthony Tseng fef2a76f4c Move WASM workspace to third_party/wasm/ (#34497)
Relocate the WASM workspace from ui/webui/resources/wasm/ to
third_party/wasm/, following the convention of third_party/rust/.

This is a plain move with path updates — no structural changes to
the workspace, crate locations within it, or build targets.
2026-03-09 22:50:50 +00:00
Serg 12400944d6 [Android] Fix crash in BraveNewsUtils when mojo pipe is closed (#34573)
Guard mojo calls with try/catch for IllegalStateException since the
pipe can be closed by onDetachedFromWindow() or onConnectionError()
before the BEST_EFFORT task executes, and Java mojo bindings have no
non-destructive validity check.

Resolves: https://github.com/brave/brave-browser/issues/53479
2026-03-09 23:27:30 +01:00
Kevin Smith 159aa53ce1 [NTP] Do not submit search query if isComposing flag is true (#34559)
When the user in the middle of typing a character that requires
multiple keystrokes, the Enter key may be used to select a
character. Do not execute search when Enter is pressed in this
state.
2026-03-09 15:23:15 -04:00
Serg 181edb1979 [Android] Fix CustomizeBraveMenuTest exit item visibility test (#34572)
Initialize default invisible items before applying customization to
emulate the onboarding step that hides the exit menu item.

Resolves: https://github.com/brave/brave-browser/issues/53474
Resolves: https://github.com/brave/brave-browser/issues/53475
2026-03-09 19:31:59 +01:00
Brian R. Bondy 66d25b65b5 Import best-practice docs from brave-experiments/brave-core-tools (#34568) 2026-03-09 14:15:22 -04:00
Terry Mancey a86c7f70bd [CodeHealth] SERP metrics (#34518)
As part of general code health improvements, apply IWYU fixes, replace
SerpClassifier with free functions, improve TestHttpsServerBuilder,
update tests whose behavior did not match our expectations, and
deduplicate the search engine allowlist.
2026-03-09 16:21:51 +00:00
brave-builds 1a28501278 1.90.14 2026-03-09 16:02:49 +00:00
Simone Arpe 9ff0e5646d Init exit menu item as hidden (#34482)
Initializes exit menu item as hidden for new users only by setting it as disabled during onboarding. Exit item will be shown as disabled in the customized menu and tapping it on the toggle will bring it back.
2026-03-09 15:19:19 +01:00
Simon Hong db800648ed Fix crash in ~PlaylistMediaFileDownloader when GUID mismatches (#34548)
OnDownloadCreated() was not observing download items whose GUID didn't
match current_download_item_guid_ (e.g. when a download was canceled
before its DownloadItemImpl was created). Those items remained in
InProgressDownloadManager unobserved, so the destructor's call to
RemoveObservation() hit a CHECK failure.

Fix: always add the observation in OnDownloadCreated() before the GUID
check. Stale items still get a cancel scheduled; the observation ensures
proper cleanup in the destructor.
2026-03-09 14:03:20 +00:00
brave-builds 0ffe3da81e 1.90.13 2026-03-09 12:33:31 +00:00
brave-builds ec2a72ffa6 1.90.12 2026-03-09 12:17:19 +00:00
Simon Hong c091089ba3 Fixed vertical tab layout in RTL (#34423)
Resolves brave/brave-browser#53099

Fix vertical tab strip layout in RTL

The vertical tab strip and its surrounding views (contents area, bookmark bar, infobar, sidebar) were
being incorrectly positioned in RTL locales. The Views framework automatically mirrors child view
positions in RTL, which conflicted with Brave's explicit alignment preferences for the vertical tab
strip and sidebar.

Root cause

The layout in CalculateSideBarLayout was applying GetMirroredRect only to the sidebar and contents
bounds. When in RTL mode, the Views framework would also auto-mirror the vertical tab strip host view,
causing it to appear on the opposite side from what the user configured.

Changes

- BraveBrowserViewTabbedLayoutImpl::CalculateProposedLayout: Consolidate all RTL mirroring into a
single post-processing step at the end of the function. After the full layout is computed in logical
(LTR-equivalent) coordinates, apply GetMirroredRect uniformly to contents, bookmark bar, infobar
container, sidebar container, sidebar separator, and vertical tab strip host. This ensures all views
are mirrored consistently and respects the user's vertical-tab/sidebar alignment preference regardless of
RTL mode.

- BraveBrowserViewTabbedLayoutImpl::CalculateSideBarLayout: Remove the per-view GetMirroredRect calls
that were previously scattered here (sidebar bounds, contents bounds, separator bounds). These are now
handled centrally in CalculateProposedLayout.

- BraveVerticalTabStripRegionView and VerticalTabStripWidgetDelegateView: Call SetMirrored(false) to
prevent the Views framework from flipping their internal layout in RTL. Their visual position is
already controlled by the layout's GetMirroredRect post-processing step, matching the approach used by
SidebarContainerView.

- Add VerticalTabLayoutInRTL browser test to verify that both the host view (via GetMirroredBounds())
and the OS-level widget (via GetWindowBoundsInScreen()) are on the correct side of the contents area in
RTL, for both the "vertical tab on left" and "vertical tab on right" user preferences.
2026-03-09 20:40:06 +09:00
Pete Miller 804747a361 [AI Chat] don't double up act or nest waitFor inside act unneccessarily (#34539)
* [AI Chat] don't double up act or nest waitFor inside act unneccessarily

Could mess with jest timeout
2026-03-09 05:47:33 +00:00
Jay Harris 5f7095cd00 [AI Chat]: Don't close sidebar when changing conversation in fullpage (#34556) 2026-03-09 01:46:02 +00:00
Jay Harris 59c648dde4 [Shields]: Truncate long origins in scripts/fingerprinting panel (#34552) 2026-03-09 13:35:41 +13:00
brave-builds a2c22d06e4 1.90.11 2026-03-09 00:02:59 +00:00
Kamil Jozwiak c82c9dffe8 Upgrade from Chromium 146.0.7680.32 to Chromium 146.0.7680.65 (#34526)
<!-- Add brave-browser issue below that this PR will resolve -->
Resolves https://github.com/brave/brave-browser/issues/53432

<!-- CI-related labels that can be applied to this PR:
* CI/disable-pipeline-step-cache - instruct CI to not cache build steps
between runs for the same commit hash
* CI/enable-coverage - enable coverage reporting for your code changes
* CI/enable-test-only-affected - instruct CI to only run tests affected
by your change
* CI/run-audit-deps (1) - check for known npm/cargo vulnerabilities
(audit_deps)
* CI/run-network-audit (1) - run network-audit
* CI/run-perf-smoke-tests - run smoke performance tests
* CI/storybook-url (1) - deploy storybook and provide a unique URL for
each build
* CI/run-upstream-tests - run Chromium unit and browser tests on Linux
and Windows (otherwise only on Linux)
* CI/skip-upstream-tests - do not run Chromium unit, or browser tests
(otherwise only on Linux)
* CI/run-teamcity - run TeamCity
* CI/skip-teamcity - skip TeamCity
* CI/skip - do not run CI builds (except noplatform)
* CI/run-linux-arm64, CI/run-macos-x64, CI/run-windows-arm64,
CI/run-windows-x86 - run builds that would otherwise be skipped
* CI/skip-linux-x64, CI/skip-android, CI/skip-macos-arm64, CI/skip-ios,
CI/skip-windows-x64 - skip CI builds for specific platforms

(1) applied automatically when some files are changed (see:
https://github.com/brave/brave-core/blob/master/.github/labeler.yml)
-->

<!--
## Checklist:

- Review design docs
[Browser design
principles](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/chrome_browser_design_principles.md)
[Style
guide](https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++.md)
[Core principles](https://www.chromium.org/developers/core-principles/)
- Ensure there are
(tests)[https://www.chromium.org/developers/testing/]. Unit test as much
as possible (including edge cases), but also include browser tests
covering high level functionality.
- Ensure that there are comments explaining what classes/methods are/do.
The "why" is often more important than the "what" in comments. Also
update any relevant docs (moving docs from wiki to brave-core if
necessary).
- Request security or other review (third-party libraries, rust code,
etc...) if applicable [security/privacy review is
needed](https://github.com/brave/brave-browser/wiki/Security-reviews)
[other review](https://github.com/brave/reviews/issues/new/choose)
Also see [adding third-party
libraries](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/adding_to_third_party.md)
for general guidelines on using third party code
- Make sure there is a
[ticket](https://github.com/brave/brave-browser/issues) for your issue
- Use Github [auto-closing
keywords](https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue)
in the PR description above
- Write a good [PR/commit
description](https://google.github.io/eng-practices/review/developer/cl-descriptions.html)
- Squash any review feedback or "fixup" commits before merge, so that
history is a record of what happened in the repo, not your PR
- Add appropriate labels (`QA/Yes` or `QA/No`; `release-notes/include`
or `release-notes/exclude`; `OS/...`) to the associated issue
- Checked the PR locally:
* `npm run test -- brave_browser_tests`, `npm run test --
brave_unit_tests`
[wiki](https://github.com/brave/brave-browser/wiki/Tests)
* `npm run presubmit`
[wiki](https://github.com/brave/brave-browser/wiki/Presubmit-checks),
`npm run gn_check`, `npm run tslint`
- Run `git rebase master` (if needed)
-->
2026-03-07 20:15:54 -05:00
Netzenbot 29d1c70790 Disable All/GetDisplayMediaHiDpiBrowserTest.Capture/1 (#34531)
This upstream Chromium test intermittently fails in Brave (issue
#53422). The test detects video playback via canvas getImageData()
fingerprinting which Brave's canvas farbling (PerturbPixels) modifies.
The sibling variant Capture/0 is already disabled for the same reason.

Stable upstream: Capture/0 1.1%, Capture/1 0.2% flake rate (30-day
LUCI Analysis).

Resolves https://github.com/brave/brave-browser/issues/53422
2026-03-07 12:13:48 -05:00
Darnell Andries fdfbc6f866 Add metrics for Brave Search entry percentages (#33951)
* Add omnibox search percentage metrics

* Add NTP search percentage metric

* Include private queries in search metrics

* Update metric_names.h

* Fix

* Trigger `ReportDailyMetrics` from `PageMetrics::ReportAllMetrics`

* Address PR feedback

* Fix after Chromium upgrade, misc fixes after rebase

* Add CHECK_GT

* Add missing metric names
2026-03-06 16:09:40 -08:00
Emerick Rogul a0a4b5618c Disable unsupported upstream tests 2026-03-06 18:32:09 -05:00
Claudio DeSouza bbf9c5bbfa [cr147][WIP] Stubbing off PageInterface selection control events
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/61945115e29e52db591108c859ddea4e3740d61f

commit 61945115e29e52db591108c859ddea4e3740d61f
Author: Orin Jaworski <orinj@google.com>
Date:   Mon Feb 23 19:24:49 2026 -0800

    [omnibox][next] Implement popup selection control in webui omnibox

    This CL does a few things:
    - Lets the classic webui omnibox popup control its own popup selections
    - Introduces a concept of "popup-focus" which is distinct from standard
      browser focus, thus allowing the OmniboxViewView to retain input focus
      while independently updating popup-focus as a visual indicator of
      which popup selection should be opened when the user presses Enter
    - Makes all elements on the classic webui omnibox keyboard accessible
    - Makes the AIM button focusable even when there are no other
      matches to select.
    - Plumbs selection control signals (up/down/tab/pageup/pagedown etc.)
      from native to webui so that webui can control its own logical
      popup focus
    - Provides a general mechanism for opening all natively supported
      popup selections
    - Implements selection navigation logic similar to that of
      OmniboxPopupSelection but simpler and easier to reason about

    Screen reader behavior is not changed or implemented on this CL,
    it still depends on the native selection updates. More work is
    needed to implement screen reading for the new popup-only (non-native)
    selections like the context menu entrypoint button.

    The main feature added on this CL is disabled by default but there
    are also some bug fixing parts that aren't guarded.

    Bug: 462775253, 476191408, 483063098
    Change-Id: I47dd2b01801a28b8916c64e89a8389848a06e4e7
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7562907
    Commit-Queue: Orin Jaworski <orinj@chromium.org>
    Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
    Reviewed-by: Orin Jaworski <orinj@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1589123}
2026-03-06 18:32:09 -05:00
Emerick Rogul 17586fc485 Update patches from Chromium 146.0.7680.32 to Chromium 146.0.7680.65. 2026-03-06 18:32:08 -05:00
Emerick Rogul ddebfdc197 Conflict-resolved patches from Chromium 146.0.7680.32 to Chromium 146.0.7680.65. 2026-03-06 18:32:08 -05:00
Emerick Rogul c71a5d7cdf Update from Chromium 146.0.7680.32 to Chromium 146.0.7680.65. 2026-03-06 18:32:08 -05:00
Serg ae69664eab [Android] Clean up Origin preferences and implement reset/link purchase (#34535)
- Remove unused "Crash reports" toggle (no policy mapping)
- Remove "Manage account" preference
- Rename "Leo AI" toggle label to "AI"
- Implement "Reset to defaults" with confirmation dialog
- Implement "Link purchase" to open Brave account linking page

Resolves: https://github.com/brave/brave-browser/issues/53435
2026-03-06 17:28:33 -05:00
Szilard Szaloki 0a2b5cea96 Adds Protobuf support to Client<>. (#34505) 2026-03-06 15:28:26 -07:00
Jocelyn Liu afa1f8b8f3 [Brave Wallet] Add missing meldIntegrationService.getCryptoCurrencies mock (#34537) 2026-03-06 22:27:50 +00:00
brave-builds af26d63083 1.90.10 2026-03-06 21:54:47 +00:00
Aleksei Seren 415e745349 Fix flaky SERP metrics back/forward navigation tests (#34508)
This PR fixes the flakiness by replacing custom
GoBack()/GoForward() helpers with
HistoryGoBack() and HistoryGoForward() from
Chromium's browser_test_utils, which wait until
navigation is finished before returning.
2026-03-06 21:04:12 +00:00
Agustín Ruiz 68f53afc0c Style fixes for markdown renderer (#34523) 2026-03-06 16:53:53 -03:00