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

Unified Diff: chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc

Issue 1403413006: Distill the concept of the "tab top exclusion region", an area inside the tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@combine_background_image_getters
Patch Set: Fix indenting error Created 5 years, 1 month 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
Index: chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc
index 7e056b43c91f878ecca3caafe922c666469ad296..dc93fb72c53961e99a58e7584bef6006beeead90 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc
@@ -20,9 +20,9 @@
namespace {
-// Besides the frame border, there's another 9 px of empty space atop the
-// window in restored mode, to use to drag the window around.
-const int kNonClientRestoredExtraThickness = 9;
+// Besides the frame border, there's empty space atop the window in restored
+// mode, to use to drag the window around.
+const int kNonClientRestoredExtraThickness = 11;
// The titlebar never shrinks too short to show the caption button plus some
// padding below it.
@@ -227,8 +227,13 @@ int OpaqueBrowserFrameViewLayout::NonClientTopBorderHeight(
int OpaqueBrowserFrameViewLayout::GetTabStripInsetsTop(bool restored) const {
const int top = NonClientTopBorderHeight(restored);
+ // Annoyingly, the pre-MD layout uses different heights for the hit-test
+ // exclusion region (which we want here, since we're trying to size the border
+ // so that the region above the tab's hit-test zone matches) versus the shadow
+ // thickness.
+ const int exclusion = GetLayoutConstant(TAB_TOP_EXCLUSION_HEIGHT);
return (!restored && (IsTitleBarCondensed() || delegate_->IsFullscreen())) ?
- top : (top + kNonClientRestoredExtraThickness);
+ top : (top + kNonClientRestoredExtraThickness - exclusion);
}
int OpaqueBrowserFrameViewLayout::TitlebarBottomThickness(bool restored) const {
« no previous file with comments | « chrome/browser/ui/views/frame/glass_browser_frame_view.cc ('k') | chrome/browser/ui/views/layout_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698