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

Unified Diff: chrome/browser/gtk/sad_tab_gtk.cc

Issue 414022: Fix assert in sad_tab when requested width for message is < -1. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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/gtk/sad_tab_gtk.cc
===================================================================
--- chrome/browser/gtk/sad_tab_gtk.cc (revision 32365)
+++ chrome/browser/gtk/sad_tab_gtk.cc (working copy)
@@ -168,8 +168,10 @@
// Only readjust width for message if width of widget has changed.
if (allocation->width != 0 && allocation->width != width_) {
width_ = allocation->width;
- // Set width for wrappable message.
- gtk_widget_set_size_request(message_, width_ - (kTabHorzMargin * 2), -1);
+ // If necessary, set width for wrappable message.
+ int message_width = width_ - (kTabHorzMargin * 2);
+ if (message_width > -1)
+ gtk_widget_set_size_request(message_, message_width, -1);
}
}
« 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