Commit 0438e230 authored by Dana Fried's avatar Dana Fried Committed by Commit Bot

Make sure to update group visuals when dragging.

Tabs are briefly resized to their ideal size when torn out of a window
during a drag, then updated to the size and position they had before the
drag for better visuals. The group visuals were getting updated based on
the ideal bounds (which are never painted and therefore are not visible)
but not the drag-appropriate bounds, resulting in strange group
highlights and underlines.

This causes the tab visuals to be updated after the appropriate dragging
bounds are set on the tabs and tab group header.

Bug: 1099047
Change-Id: I918d34efc47c6ec40e8558c0de5f8cbae2ad8a3a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2268389
Auto-Submit: Dana Fried <dfried@chromium.org>
Commit-Queue: Charlene Yan <cyan@chromium.org>
Reviewed-by: default avatarCharlene Yan <cyan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#782840}
parent dafe50e3
......@@ -678,6 +678,8 @@ class TabStrip::TabDragContextImpl : public TabDragContext {
// Reset the layout size as we've effectively laid out a different size.
// This ensures a layout happens after the drag is done.
tab_strip_->last_layout_size_ = gfx::Size();
if (views.at(0)->group().has_value())
tab_strip_->UpdateTabGroupVisuals(views.at(0)->group().value());
}
void StartedDragging(const std::vector<TabSlotView*>& views) override {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment