Chromium Code Reviews| 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..8f0e885dfe8cdac72724a4f508dcc392c39fc79f 100644 |
| --- a/webkit/tools/test_shell/test_shell_gtk.cc |
| +++ b/webkit/tools/test_shell/test_shell_gtk.cc |
| @@ -376,15 +376,18 @@ 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) { |
|
tony
2012/01/04 19:08:01
Nit: This condition probably fits on a single line
|
| // 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) { |
|
tony
2012/01/04 19:08:01
Nit: This condition probably fits on a single line
|
| // 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); |