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

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

Issue 1401933004: Switch tab.cc to use an empty border for the contents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test Created 5 years, 2 months 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/tabs/tab.h ('k') | chrome/browser/ui/views/tabs/tab_unittest.cc » ('j') | 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 6df01e27b9814d564359ce6c8ec0fe113a9aa4ed..809d656f9b3e57f8e603f80b54133ad05a376a16 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -390,6 +390,8 @@ Tab::Tab(TabController* controller)
set_id(VIEW_ID_TAB);
+ SetBorder(views::Border::CreateEmptyBorder(GetLayoutInsets(TAB)));
+
title_->SetHorizontalAlignment(gfx::ALIGN_TO_HEAD);
title_->SetElideBehavior(gfx::FADE_TAIL);
title_->SetHandlesTooltips(false);
@@ -779,7 +781,7 @@ void Tab::OnPaint(gfx::Canvas* canvas) {
}
void Tab::Layout() {
- gfx::Rect lb = GetInteriorBounds();
+ gfx::Rect lb = GetContentsBounds();
if (lb.IsEmpty())
return;
@@ -1346,7 +1348,7 @@ void Tab::PaintIcon(gfx::Canvas* canvas) {
gfx::Rect bounds = favicon_bounds_;
bounds.set_x(GetMirroredXForRect(bounds));
bounds.Offset(0, favicon_hiding_offset_);
- bounds.Intersect(GetInteriorBounds());
+ bounds.Intersect(GetContentsBounds());
if (bounds.IsEmpty())
return;
@@ -1521,12 +1523,6 @@ void Tab::ScheduleIconPaint() {
SchedulePaintInRect(bounds);
}
-gfx::Rect Tab::GetInteriorBounds() const {
- gfx::Rect bounds(GetContentsBounds());
- bounds.Inset(GetLayoutInsets(TAB));
- return bounds;
-}
-
gfx::Rect Tab::GetImmersiveBarRect() const {
// The main bar is as wide as the normal tab's horizontal top line.
// This top line of the tab extends a few pixels left and right of the
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.h ('k') | chrome/browser/ui/views/tabs/tab_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698