Index: webkit/tools/test_shell/test_shell_gtk.cc |
diff --git a/webkit/tools/test_shell/test_shell_gtk.cc b/webkit/tools/test_shell/test_shell_gtk.cc |
index de053e8cd65fd090cb9931b3e2ca255758bc8319..79ea19839e5fcb1e2621b5bff3174b15abccf9d1 100644 |
--- a/webkit/tools/test_shell/test_shell_gtk.cc |
+++ b/webkit/tools/test_shell/test_shell_gtk.cc |
@@ -376,15 +376,16 @@ void TestShell::TestFinished() { |
void TestShell::SizeTo(int width, int height) { |
GtkWidget* widget = m_webViewHost->view_handle(); |
- if (widget->allocation.width == width && |
- widget->allocation.height == height) { |
+ |
+ GtkAllocation allocation; |
+ gtk_widget_get_allocation(widget, &allocation); |
+ if (allocation.width == width && allocation.height == height) { |
// Nothing to do. |
return; |
} |
gtk_widget_set_size_request(widget, width, height); |
- if (widget->allocation.width > width || |
- widget->allocation.height > height) { |
+ if (allocation.width > width || allocation.height > height) { |
// We've been sized smaller. Shrink the window so it snaps back to the |
// appropriate size. |
gtk_window_resize(GTK_WINDOW(m_mainWnd), 1, 1); |