From e0995b8b4259b353b85308254f179aac8bcec2a6 Mon Sep 17 00:00:00 2001 From: wukko Date: Mon, 27 Oct 2025 16:32:35 +0600 Subject: [PATCH] helium: fix crash when creating a split in tab group with a detached tab taken from upstream: [7032449](https://chromium-review.googlesource.com/c/chromium/src/+/7032449) fixes #345 --- .../fix-tab-group-split-insertion.patch | 17 +++++++++++++++++ patches/series | 2 ++ 2 files changed, 19 insertions(+) create mode 100644 patches/helium/upstream-fixes/fix-tab-group-split-insertion.patch diff --git a/patches/helium/upstream-fixes/fix-tab-group-split-insertion.patch b/patches/helium/upstream-fixes/fix-tab-group-split-insertion.patch new file mode 100644 index 00000000..d513314d --- /dev/null +++ b/patches/helium/upstream-fixes/fix-tab-group-split-insertion.patch @@ -0,0 +1,17 @@ +--- a/chrome/browser/ui/views/frame/multi_contents_view_delegate.cc ++++ b/chrome/browser/ui/views/frame/multi_contents_view_delegate.cc +@@ -126,9 +126,12 @@ void MultiContentsViewDelegateImpl::Hand + const int new_tab_idx = + tab_strip_model_->active_index() + + (side == MultiContentsDropTargetView::DropSide::START ? 0 : 1); ++ ++ tabs::TabInterface* active_tab = tab_strip_model_->GetActiveTab(); + const int inserted_tab_idx = tab_strip_model_->InsertDetachedTabAt( +- new_tab_idx, std::move(detached_tab), AddTabTypes::ADD_NONE, +- std::nullopt); ++ new_tab_idx, std::move(detached_tab), ++ active_tab->IsPinned() ? AddTabTypes::ADD_PINNED : AddTabTypes::ADD_NONE, ++ active_tab->GetGroup()); + tab_strip_model_->AddToNewSplit( + {inserted_tab_idx}, split_data, + split_tabs::SplitTabCreatedSource::kDragAndDropTab); diff --git a/patches/series b/patches/series index bb33650a..6c098289 100644 --- a/patches/series +++ b/patches/series @@ -108,6 +108,8 @@ extra/brave/chrome-importer-files.patch extra/brave/custom-importer.patch extra/brave/fix-component-content-settings-store.patch +helium/upstream-fixes/fix-tab-group-split-insertion.patch + helium/core/add-zen-importer.patch helium/core/disable-unsupported-importers.patch helium/core/fix-building-without-safebrowsing.patch