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

Unified Diff: chrome/browser/ui/views/tabs/tab.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
« no previous file with comments | « chrome/browser/ui/views/layout_constants.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/tab.cc
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc
index c2cc048a959689770ccdd99efc42c4fedef2fd9c..91b8d2a6d32911cbf7c7f9ed2e97a370035d4eaa 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -699,16 +699,14 @@ bool Tab::GetHitTestMask(gfx::Path* mask) const {
#if defined(OS_MACOSX)
// Mac's Cocoa UI doesn't have shadows.
const SkScalar kTabInset = 0;
- const SkScalar kTabTop = 0;
#elif defined(TOOLKIT_VIEWS)
// The views browser UI has shadows in the left, right and top parts of the
// tab.
const SkScalar kTabInset = 6;
- const SkScalar kTabTop = 2;
#endif
SkScalar left = kTabInset;
- SkScalar top = kTabTop;
+ SkScalar top = GetLayoutConstant(TAB_TOP_EXCLUSION_HEIGHT);
SkScalar right = SkIntToScalar(width()) - kTabInset;
SkScalar bottom = SkIntToScalar(height());
@@ -722,7 +720,7 @@ bool Tab::GetHitTestMask(gfx::Path* mask) const {
mask->lineTo(left + kTabCapWidth, top);
// Extend over the top shadow area if we have one and the caller wants it.
- if (kTabTop > 0 && extend_to_top) {
+ if (top > 0 && extend_to_top) {
mask->lineTo(left + kTabCapWidth, 0);
mask->lineTo(right - kTabCapWidth, 0);
}
« no previous file with comments | « chrome/browser/ui/views/layout_constants.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698