diff options
author | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-20 08:51:37 +0000 |
---|---|---|
committer | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-20 08:51:37 +0000 |
commit | 2d42582e88755e01c421a4c4c5da053a91b7307e (patch) | |
tree | 9a5c3486cdaacc5e74f12ff0884d80911af9c86a /chrome/browser/ui | |
parent | 2379fa269cace9614d2a24d8a6e9758362c9544a (diff) | |
download | chromium_src-2d42582e88755e01c421a4c4c5da053a91b7307e.zip chromium_src-2d42582e88755e01c421a4c4c5da053a91b7307e.tar.gz chromium_src-2d42582e88755e01c421a4c4c5da053a91b7307e.tar.bz2 |
A workaround for Bug 36939.
This change just adds a boundary check to prevent |minimize_button_offset| from exceeding the frame width and to mitigate its pain. (This is not a real fix since the frame width is not equal to the offset to the minimize button of Windows. Nevertheless, it may be a good idea that a whole tab strip is always rendered inside of its parent frame.)
BUG=36939
TEST=run chrome on Win7 PC whose DPI is 144, open 20 tabs, and verify we can see a '+' (newtab) button.
Review URL: http://codereview.chromium.org/6258007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71933 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui')
-rw-r--r-- | chrome/browser/ui/views/frame/glass_browser_frame_view.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc index ac12777..58b3123 100644 --- a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc +++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc @@ -84,7 +84,8 @@ gfx::Rect GlassBrowserFrameView::GetBoundsForTabStrip( NonClientTopBorderHeight(false, false), ps.width(), browser_view_->height()); } - int minimize_button_offset = frame_->GetMinimizeButtonOffset(); + int minimize_button_offset = + std::min(frame_->GetMinimizeButtonOffset(), width()); int tabstrip_x = browser_view_->ShouldShowOffTheRecordAvatar() ? (otr_avatar_bounds_.right() + kOTRSideSpacing) : NonClientBorderThickness(); |