Limit tabstrip width to its preferred width.
Prior to this CL, the tabstrip always occupies the entire width of the titlebar area (minus the caption buttons). Changing this allows us to lay out the NTB just to the right of the tabstrip view itself instead of having the tabstrip control the NTB's bounds. This CL does that by simply changing the FlexRule governing the tabstrip's width (and fixing the numerous resulting bugs). This is a modified reland of https://crrev.com/c/2336296. Changes from that version: - PreferredSizeChanged() while dragging, since the dragged tabs may have been moved past the previous extents of the tabstrip. - Take tab closing mode into account when determining the tab area's preferred width. - Bypass ScrollView when observing the tabstrip's preferred size changes. - PreferredSizeChanged() in SnapToIdealBounds, since the tabs may have been snapped outside the previous extents of the tabstrip. Known issues: - Tab closing mode doesn't play nicely with scrolling in all cases. That was true before this CL, but this moves around which cases are broken. Bug: 1093972 Change-Id: I214534847bd07c53829005b7496a9b9bc63e6d5e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2432088 Commit-Queue: Taylor Bergquist <tbergquist@chromium.org> Reviewed-by:Charlene Yan <cyan@chromium.org> Reviewed-by:
Peter Boström <pbos@chromium.org> Cr-Commit-Position: refs/heads/master@{#816778}
Showing
Please register or sign in to comment