summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormsw <msw@chromium.org>2014-10-14 09:06:48 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-14 16:07:02 +0000
commitc1e1f74161297a16dc111f016da39a44202a5036 (patch)
tree5342554057a665d2ab358cb12fef53c95e654225
parentde13cf44ff5aa5815dd742c2cedcaece02601f4b (diff)
downloadchromium_src-c1e1f74161297a16dc111f016da39a44202a5036.zip
chromium_src-c1e1f74161297a16dc111f016da39a44202a5036.tar.gz
chromium_src-c1e1f74161297a16dc111f016da39a44202a5036.tar.bz2
Fix a tab layout regression with the close button.
My CL caused a regression in tab close button visibility: http://crrev.com/9a391ca240057108941495db69c9c55d0613d167 Restore the prior bounds insetting and early return order. (updates |close_button_| visibility more often, as before) BUG=409633 TEST=CTRL+TAB w/many tabs doesn't show bad close buttons. R=sky@chromium.org Review URL: https://codereview.chromium.org/656463007 Cr-Commit-Position: refs/heads/master@{#299489}
-rw-r--r--chrome/browser/ui/views/tabs/tab.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc
index d9890ec..e4597ee 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -743,10 +743,10 @@ void Tab::OnPaint(gfx::Canvas* canvas) {
void Tab::Layout() {
gfx::Rect lb = GetContentsBounds();
- lb.Inset(kLeftPadding, kTopPadding, kRightPadding, kBottomPadding);
if (lb.IsEmpty())
return;
+ lb.Inset(kLeftPadding, kTopPadding, kRightPadding, kBottomPadding);
showing_icon_ = ShouldShowIcon();
favicon_bounds_.SetRect(lb.x(), lb.y(), 0, 0);
if (showing_icon_) {