Clarify that CSA-053 only applies to temporary workarounds, not
permanent design decisions. Comments explaining why an alternative
API was not used due to a known limitation do not need TODO tracking
issues when the current code is the intended long-term solution.
The wiki content was moved into the docs folder, so the external
link to brave-browser/wiki/Patching-Chromium#making-methods-virtual
now just redirects. Use a local anchor instead.
Clarify that network auditor entries are only needed for
endpoints that do not require user opt-in. Add new best
practice (BS-056) requiring all new Brave endpoints be
added to the HSTS pin list.
* Support tab groups in tree tab strip
Integrate tab groups with the tree tab strip so that groups are represented
as a single tree node wrapping the group (not one tree node per tab). Tabs
inside a group remain direct children of the group collection.
Collection and delegate:
- BraveTreeTabStripCollectionDelegate: When adding a tab with new_group_id,
add to collection without wrapping in a tree node; the group wraps it.
MoveTabsRecursive: handle empty tab_indices (no-op when moving within same
group), and route move-out-of-group and move-into-group to new helpers.
- MoveTabsIntoGroup: unwrap tabs from tree nodes (or detach from other
groups), add to target group; when group is detached (new group), wrap
group in a TreeTabNode and attach at the correct tree position.
- MoveTabsOutOfGroup: move tabs from TabGroupTabCollection back into the
tree by wrapping each in a tree node at the destination index.
- BraveTabStripCollection: add PopDetachedGroupCollectionForDelegate and
GetTreeTabNodeIdForGroup; chromium_src TabStripCollection gains virtual
GetTreeTabNodeIdForGroup. BraveTabStripCollectionDelegate implements
GetTreeTabNodeIdForGroup.
TreeTabNodeTabCollection:
- BuildTreeTabs: wrap entire groups in one tree node (processed_groups set);
grouped tabs stay as direct children of the group.
- New constructor that wraps a TabGroupTabCollection (for creating a group
in tree mode). Single-tab constructor allows null for GetEmptyTreeTabNode
when a tab was moved into a group and the view still holds the old node id.
Model, controller, and UI:
- BraveTabStripModel::GetTreeTabNodeIdForGroup returns the tree node id for
a group (or nullptr if tree tabs off). Wired through controller and
BraveTabStripCollection.
- BraveBrowserTabStripController::GetTreeTabNode returns GetEmptyTreeTabNode()
when the node is null (e.g. tab just moved into group, before
TabGroupedStateChanged/AddTabToGroup updates the view).
- OnTreeTabChanged: handle tab index kNoTab and detached state during group
creation; avoid double-clearing when AddTabToGroup will clear the node id.
- BraveTabStrip::AddTabToGroup override sets the tab's tree_tab_node from
GetTreeTabNodeIdForGroup when adding to a group in tree mode.
Add upstream test failures best practices doc
Consolidates upstream-flake filter guidance from testing-isolation.md
(TI-031, TI-032, TI-041, TI-042, TI-043) and patches.md (PATCH-011)
into a dedicated testing-upstream-failures.md. Expands the flake-check
section with full script usage and the LUCI verdict table.
* Add split tab support for tree tabs
In order to support split tabs in tree tabs, mainly we need to reimplment
two methods - CreateSplit and Unsplit.
For CreateSplit, we need to wrap the split tabs in a tree node, and insert it
at the position.
For Unsplit, we need to extract the tabs back to the tree nodes.
- TabStripCollection: virtual CreateSplit, Unsplit, AddCollectionMapping,
RemoveCollectionMapping; AddTabCollectionAtPosition for delegate.
- BraveTabStripCollection(delegate): override CreateSplit/Unsplit and
AddCollectionMapping/RemoveCollectionMapping; PassKey overloads for
AddTabCollectionAtPosition and collection mapping.
- BraveTreeTabStripCollectionDelegate: implement CreateSplit (wrap split in
tree node, insert at position), Unsplit (extract tabs back to tree nodes),
AddCollectionMapping/RemoveCollectionMapping for TREE_NODE holding split/group;
MoveTabsRecursive same-position handling for split/group creation.
- Tab strip API: handle TREE_NODE in tab_converters (unpinned container).
- Docs: tree tabs + split tabs flow and MoveTabsRecursive behavior.
* 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.
* Make TreeTabModel::SetCollapsed/DoesBelongToCollapsedNode()
TreeTabModel:
- Cache closest collapsed ancestor per node for O(1) visibility checks.
- Add SetCollapsed(id, collapsed) as UI entry point; calls TreeTabNode::set_collapsed()
and updates cache for affected descendants.
- Add DoesBelongToCollapsedNode(id) for quick "under collapsed" queries.
- Update cache in AddTreeTabNode (new node's closest collapsed), RemoveTreeTabNode
(recompute nodes that had removed id as closest), and OnTreeTabNodeMoved (recompute
moved node and its descendants after reparent).
TreeTabNode:
- Add GetClosestCollapsedAncestorId(), IsUnderCollapsedAncestor(), CollectDescendantIds()
for cache maintenance and tree traversal.
TreeTabNodeTabCollection:
- Add on_move callback; BuildTreeTabs and constructor take on_move.
- OnReparented invokes on_move so TreeTabModel can refresh collapse cache.
- Change on_create signature from void(const TreeTabNode&) to void(TreeTabNode&) so
delegate can pass AddTreeTabNode (non-const).
BraveTreeTabStripCollectionDelegate:
- Wire on_move to TreeTabModel::OnTreeTabNodeMoved in BuildTreeTabs and in
single-node TreeTabNodeTabCollection creation sites.
This document outlines the planned architecture and design principles
behind the tree tab feature. It covers the responsibilities of
various components, data structures, and interaction patterns to ensure
a cohesive and decoupled implementation.
* Add Brave Midnight (Darker) theme feature
This commit introduces the Brave Midnight theme, a darker variant of the
existing dark theme, providing users with enhanced customization options
for their browsing experience.
Key changes:
* Add feature flag `kBraveMidnightTheme` to control theme availability
* Create new preference `kBraveDarkerMode` to store user's theme choice
* Implement UI toggle in Customize Chrome side panel for theme switching
* Add Mojo interface methods for theme state management
Technical implementation:
- Created `browser/ui/color/features.{cc,h}` for feature flag definition
- Added feature flag to `about_flags.cc` for experimental access
- Registered preference in `brave_profile_prefs.cc` when feature is enabled
- Extended Customize Chrome UI with `DarkerThemeToggle` component
- Added Mojo interface methods `GetUseDarkerTheme`/`SetUseDarkerTheme`
The feature is disabled by default and can be enabled via the
`brave-midnight-theme` flag in brave://flags. When enabled, users can
toggle the darker theme through the Customize Chrome side panel.
This change adds a dry run mode to plaster, that can be called with:
```sh
tools/cr/plaster.py check
```
This command can also be called with a list of files, that can be either
`rewrite/` files or `patches/` files.
We are also adding support to plaster for .patchinfo files, allowing a
more efficient way to make sure any given plaster file has should be
regenerated.
### What does plaster do to .patchinfo files
Plaster now generates the contents of a .patchinfo file, and based on
that content it determines if one of these files must be updated:
source, patch, or patchinfo (a combination of npm run update_patches
and npm run apply_patches). A new key is being added to the patchinfo
format, namely, plaster, which is used to store the path and checksum
for the plaster file for a given patch/source set. Files are only
updated on disk if the resulting new content doesn't match the hash of
the file saved in disk.
For now plaster always produce a .patchfile when processing a plaster,
to avoid unnecessary writes and to confirm that submitted patches do
have the expected content. This may change in the future with a more
mature approach where the contents of the patchinfo file may be used
to avoid running all the plaster transformations. This means that for
now we have to pay for a full plaster generation to determine if a file
source/patch/patchinfo are out-of-date.
Resolves https://github.com/brave/brave-browser/issues/47066