diff options
author | rlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-06 19:20:21 +0000 |
---|---|---|
committer | rlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-06 19:20:21 +0000 |
commit | 08eafdae4119847cbfda59f4ee5c1288049a8b23 (patch) | |
tree | 028d8bc44f0b5079bad89fa24eac73c394496dac /chrome/browser | |
parent | e66f3488103178253b6621a1e30ab48c0dace93b (diff) | |
download | chromium_src-08eafdae4119847cbfda59f4ee5c1288049a8b23.zip chromium_src-08eafdae4119847cbfda59f4ee5c1288049a8b23.tar.gz chromium_src-08eafdae4119847cbfda59f4ee5c1288049a8b23.tar.bz2 |
Fixing the bug that occurs when the hover shader becomes null due to small tab width.
BUG=67498
TEST=visual, layout tests, tested with null shader
Review URL: http://codereview.chromium.org/6004013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70630 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/ui/views/tabs/tab.cc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc index 59cab04..42c82c1 100644 --- a/chrome/browser/ui/views/tabs/tab.cc +++ b/chrome/browser/ui/views/tabs/tab.cc @@ -603,12 +603,15 @@ SkBitmap Tab::DrawHoverGlowBitmap(int width_input, int height_input) { NULL, 2, SkShader::kClamp_TileMode); - paint.setShader(shader); - shader->unref(); - hover_canvas.DrawRectInt(hover_point_.x() - radius, - hover_point_.y() - radius, - radius * 2, radius * 2, paint); - + // Shader can end up null when radius = 0. + // If so, this results in default full tab glow behavior. + if (shader) { + paint.setShader(shader); + shader->unref(); + hover_canvas.DrawRectInt(hover_point_.x() - radius, + hover_point_.y() - radius, + radius * 2, radius * 2, paint); + } return hover_canvas.ExtractBitmap(); } |