Simplify group updates during tab dragging
This makes it so that TabDragController::UpdateGroupForDraggedTabs does only what its name suggests (updates the group membership of the dragged tabs) without doing anything extra (lots of tab movement). The assumption is that tabs are moved to their destination before UpdateGroupForDraggedTabs is called. This assumption is commented here: https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/views/tabs/tab_drag_controller.h;l=527 And it still holds because of this call here: https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/views/tabs/tab_drag_controller.cc;l=1034 Most of the deleted movements in UpdateGroupForDraggedTabs were added because functions like RemoveFromGroup() could potentially shift tabs around. However, by using MoveAndSetGroup instead, the tabs don't actually move as long as the above assumption holds. Tested manually and via interactive UI tests: https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc;l=698 Bug: 1163845 Change-Id: I447c66a10c26a20a10d08979cd47cee4906d9b71 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622324Reviewed-by:Charlene Yan <cyan@chromium.org> Commit-Queue: Connie Wan <connily@chromium.org> Cr-Commit-Position: refs/heads/master@{#843162}
Showing
Please register or sign in to comment