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

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

Issue 6004013: Fixing the bug that occurs when the hover shader becomes null due to small ta... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 | « no previous file | 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
===================================================================
--- chrome/browser/ui/views/tabs/tab.cc (revision 70404)
+++ chrome/browser/ui/views/tabs/tab.cc (working copy)
@@ -603,12 +603,15 @@
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();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698