From 791df834f9179b98daed71c80b0530c5b38d1c70 Mon Sep 17 00:00:00 2001 From: Jagadesh P Date: Mon, 13 Jan 2025 13:54:20 +0530 Subject: [PATCH] [VerticalTabs] Fix drag-and-drop of text/links not working for the last two tabs. --- .../browser/ui/views/frame/browser_root_view.cc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/chromium_src/chrome/browser/ui/views/frame/browser_root_view.cc b/chromium_src/chrome/browser/ui/views/frame/browser_root_view.cc index df82cb7fe821..f86af94f4710 100644 --- a/chromium_src/chrome/browser/ui/views/frame/browser_root_view.cc +++ b/chromium_src/chrome/browser/ui/views/frame/browser_root_view.cc @@ -7,14 +7,15 @@ #include "brave/browser/ui/views/tabs/vertical_tab_utils.h" -#define ConvertPointToTarget(THIS, TARGET_GETTER, POINT) \ - if (views::View* target_v = TARGET_GETTER; \ - tabs::utils::ShouldShowVerticalTabs(browser_view_->browser()) && \ - (target_v == tabstrip() || !THIS->Contains(target_v))) { \ - ConvertPointToScreen(target_v, POINT); \ - ConvertPointFromScreen(THIS, POINT); \ - } else { \ - ConvertPointToTarget(THIS, target_v, POINT); \ +// Workaround for vertical tabs to work with drag&drop of text/links. +#define ConvertPointToTarget(THIS, TARGET_GETTER, POINT) \ + if (views::View* target_v = TARGET_GETTER; \ + tabs::utils::ShouldShowVerticalTabs(browser_view_->browser()) && \ + (target_v == tabstrip() || !THIS->Contains(target_v))) { \ + ConvertPointToScreen(THIS, POINT); \ + ConvertPointFromScreen(target_v, POINT); \ + } else { \ + ConvertPointToTarget(THIS, target_v, POINT); \ } #include "src/chrome/browser/ui/views/frame/browser_root_view.cc"