Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(662)

Unified Diff: chrome/browser/ui/views/tabs/tab_drag_controller.cc

Issue 1545863002: Compute the correct height above the tabstrip when dragging tabs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab_strip.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/tab_drag_controller.cc
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.cc b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
index c911022af464ad022be74c3bd47cd5575f3e3457..a7fc9f40aebd343fb1809a17d41240c01f4c026d 100644
--- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
@@ -1687,11 +1687,14 @@ gfx::Rect TabDragController::CalculateDraggedBrowserBounds(
break; // Nothing to do for DETACH_ABOVE_OR_BELOW.
}
- // To account for the extra vertical on restored windows that is absent on
- // maximized windows, add an additional vertical offset extracted from the tab
- // strip.
- if (source->GetWidget()->IsMaximized())
- new_bounds.Offset(0, -source->kNewTabButtonVerticalOffset);
+ // Account for the extra space above the tabstrip on restored windows versus
+ // maximized windows.
+ if (source->GetWidget()->IsMaximized()) {
+ const auto* frame_view = static_cast<BrowserNonClientFrameView*>(
+ source->GetWidget()->non_client_view()->frame_view());
+ new_bounds.Offset(
+ 0, frame_view->GetTopInset(false) - frame_view->GetTopInset(true));
+ }
return new_bounds;
}
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab_strip.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698