summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorsuzhe@chromium.org <suzhe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-17 18:48:58 +0000
committersuzhe@chromium.org <suzhe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-17 18:48:58 +0000
commitf37e8610b86a426ad411a8b30889fb0ce1833c1b (patch)
treeaef9fea47ccfbfe9ceadeddc9ab57143f6c87d24 /chrome
parent5c05b40cf995fe0bf0d60bcdb282f3d0d28ec1d9 (diff)
downloadchromium_src-f37e8610b86a426ad411a8b30889fb0ce1833c1b.zip
chromium_src-f37e8610b86a426ad411a8b30889fb0ce1833c1b.tar.gz
chromium_src-f37e8610b86a426ad411a8b30889fb0ce1833c1b.tar.bz2
[Linux]Fix a redraw issue when expanding a GtkChromeShrinkableHBox.
BUG=44379 gtk_chrome_shrinkable_hbox may redraw children with incorrect size allocation. TEST=see bug report. Review URL: http://codereview.chromium.org/2120005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47439 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/gtk/gtk_chrome_shrinkable_hbox.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/browser/gtk/gtk_chrome_shrinkable_hbox.cc b/chrome/browser/gtk/gtk_chrome_shrinkable_hbox.cc
index 5384ff4..3ce83d0 100644
--- a/chrome/browser/gtk/gtk_chrome_shrinkable_hbox.cc
+++ b/chrome/browser/gtk/gtk_chrome_shrinkable_hbox.cc
@@ -182,12 +182,13 @@ static void gtk_chrome_shrinkable_hbox_size_allocate(
// hidden children.
if (widget->allocation.width < allocation->width ||
box->children_width_requisition > children_width_requisition) {
- gint count = 0;
- gtk_container_foreach(GTK_CONTAINER(widget), ShowInvisibleChildren, &count);
+ gtk_container_foreach(GTK_CONTAINER(widget),
+ reinterpret_cast<GtkCallback>(gtk_widget_show), NULL);
// If there were any invisible children, showing them will trigger another
- // allocate, so we can just return here.
- if (count > 0) return;
+ // allocate. But we still need to go through the size allocate process
+ // in this iteration, otherwise before the next allocate iteration, the
+ // children may be redrawn on the screen with incorrect size allocation.
}
// Let the parent class do size allocation first. After that all children will