| Index: chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.cc
|
| diff --git a/chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.cc b/chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.cc
|
| index e549f8640a72a08c9fc0c75f15369573f87e2ed8..138ba39109d46dd691cb370b7ed57d0558464d55 100644
|
| --- a/chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.cc
|
| +++ b/chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.cc
|
| @@ -86,7 +86,10 @@ void ChildSizeAllocate(GtkWidget* child, gpointer userdata) {
|
| }
|
| }
|
|
|
| - if (child_allocation.width != child->allocation.width) {
|
| + GtkAllocation current_allocation;
|
| + gtk_widget_get_allocation(child, ¤t_allocation);
|
| +
|
| + if (child_allocation.width != current_allocation.width) {
|
| if (data->box->hide_child_directly || child_allocation.width <= 1)
|
| gtk_widget_hide(child);
|
| else
|
| @@ -177,11 +180,14 @@ static void gtk_chrome_shrinkable_hbox_size_allocate(
|
| gtk_container_foreach(GTK_CONTAINER(widget), SumChildrenWidthRequisition,
|
| &children_width_requisition);
|
|
|
| + GtkAllocation widget_allocation;
|
| + gtk_widget_get_allocation(widget, &widget_allocation);
|
| +
|
| // If we are allocated to more width or some children are removed or shrunk,
|
| // then we need to show all invisible children before calling parent class's
|
| // size_allocate method, because the new width may be enough to show those
|
| // hidden children.
|
| - if (widget->allocation.width < allocation->width ||
|
| + if (widget_allocation.width < allocation->width ||
|
| box->children_width_requisition > children_width_requisition) {
|
| gtk_container_foreach(GTK_CONTAINER(widget),
|
| reinterpret_cast<GtkCallback>(gtk_widget_show), NULL);
|
|
|