Commit 3e66c43e authored by Charlene Yan's avatar Charlene Yan Committed by Commit Bot

[Tab Groups Collapse] Draw the header when starting drag.

Bug: 1099376
Change-Id: I8d88e6ef7d4e0911ea85715c334915a11d7aa3eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2303971
Commit-Queue: Charlene Yan <cyan@chromium.org>
Reviewed-by: default avatarConnie Wan <connily@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789305}
parent 70fc0cf0
......@@ -704,17 +704,18 @@ class TabStrip::TabDragContextImpl : public TabDragContext {
// Move the dragged tabs to their ideal bounds.
tab_strip_->UpdateIdealBounds();
// Sets the bounds of the dragged tabs.
for (size_t i = 0; i < views.size(); ++i) {
// Non-tabs, such as TabGroupHeaders, may also be dragging. Ignore these,
// since they are positioned independently.
if (views[i]->GetTabSlotViewType() != TabSlotView::ViewType::kTab)
continue;
int tab_data_index = GetIndexOf(views[i]);
// Sets the bounds of the dragged tab slots.
for (TabSlotView* view : views) {
if (view->GetTabSlotViewType() ==
TabSlotView::ViewType::kTabGroupHeader) {
view->SetBoundsRect(ideal_bounds(view->group().value()));
} else {
int tab_data_index = GetIndexOf(view);
DCHECK_NE(TabStripModel::kNoTab, tab_data_index);
views[i]->SetBoundsRect(ideal_bounds(tab_data_index));
view->SetBoundsRect(ideal_bounds(tab_data_index));
}
}
tab_strip_->SetTabSlotVisibility();
tab_strip_->SchedulePaint();
}
......
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