Skip to content
Commit 9adeb297 authored by Taylor Bergquist's avatar Taylor Bergquist Committed by Chromium LUCI CQ
Browse files

Basic CompoundTabContainer implementation.

This gives us a (crashy, messy, incomplete) starting point for iteration, which can be swapped into use in the TabStrip with the new SplitTabStrip feature flag. See go/2-tabcontainers-1-pager for more details on the overall objective here.

Supports the following operations:
- construction/layout/paint/basic existence as a View
- opening a new tab, either pinned or unpinned
- closing a tab (via ctrl + w only, not mouse)
- pinning a tab via tab context menu, only if that does not cause a reorder.

Notable not-yet-supported things:
- tab groups
- tab reordering
- tab dragging
- pin + move combo operations
- correct animations when pinning/unpinning a tab
- overlapping the pinned/unpinned containers to get a visually continuous tabstrip
- programmatic scrolls (e.g. scroll buttons or selection change)
- hover cards
- touch input
- tab closing mode
- link/text drag and drop sessions

Known issues:
- Some hard to reproduce multi-second lag spike when pinning a tab.

Future cleanup work/tech debt:
- Clarify the exact API for moving tabs between the containers. Currently TransferTabOut is a bit of a placeholder, and won't meet all our needs in the future.
- Inconsistent/poorly thought out use of index types (model, viewmodel, etc) when counting number of pinned tabs. Likely some subtle issues can happen while midway through opening/closing/pinning/unpinning a tab while those different indices are out of sync.

Bug: 1346017
Change-Id: Ia3f1de48addebbe0c1e0f4cfac48e1e82ff916b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3830085


Reviewed-by: default avatarDavid Pennington <dpenning@chromium.org>
Reviewed-by: default avatarPeter Boström <pbos@chromium.org>
Commit-Queue: Taylor Bergquist <tbergquist@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1039410}
parent 2d617825
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment