commit | 8f3d075ebf5ff02504a72ac34e0adcc088376881 | [log] [tgz] |
---|---|---|
author | Taylor Bergquist <tbergquist@chromium.org> | Tue Jan 21 22:40:53 2025 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Jan 21 22:40:53 2025 |
tree | d9fc0ffe086320ffe84e5077aa74b22c618d9c2f | |
parent | ebf22c080867f3adf58c9b009663e168f9f5976a [diff] |
Simplify layout when creating a window during tab dragging. There were several compounding complexities in the old approach: - the window and tab bounds calculations were distributed across several methods, with unclear responsibilities and interactions - the two cases (dragging all tabs in a window, and dragging some tabs out into a new window) reused some of these methods, and duplicated (with some important differences) other parts of the logic - Wayland doesn't support screen coordinates or programmatically positioning windows; this required special handling whenever any window origin math was done (as that all happens in screen space) It turns out that a lot of this complexity can just cancel out if you arrange things the right way. This CL does several things: - skips calculating the detached window origin (over and over, and incrementally nudging the window around). The move loop will reposition it for us, so we can just calculate the drag offset once at the end. - greatly simplifies the dragging all tabs in a window case, which was only complicated because it was reusing too much of the other case - clearly defines the responsibilities of, and information flow between, the helper methods of DragBrowserToNewTabStrip - unifies calculations between Wayland (which doesn't support screen coordinates or programmatically positioning windows) and other platforms - more strictly separates the calculation of different pieces of information (mainly window size/origin and tab sizes/origins) Bug: 382754501 Change-Id: Icf0296f81ee0e5b660c0a0bfd21b8e9862722a8f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6160815 Reviewed-by: Max Ihlenfeldt <max@igalia.com> Reviewed-by: David Pennington <dpenning@chromium.org> Reviewed-by: Nick Yamane <nickdiego@igalia.com> Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com> Commit-Queue: Taylor Bergquist <tbergquist@chromium.org> Cr-Commit-Position: refs/heads/main@{#1409303}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.