diff options
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/tools/test_shell/webwidget_host.h | 5 | ||||
-rw-r--r-- | webkit/tools/test_shell/webwidget_host_gtk.cc | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/webkit/tools/test_shell/webwidget_host.h b/webkit/tools/test_shell/webwidget_host.h index 49c0ba7..cb9dee7 100644 --- a/webkit/tools/test_shell/webwidget_host.h +++ b/webkit/tools/test_shell/webwidget_host.h @@ -132,6 +132,11 @@ class WebWidgetHost { int scroll_dy_; bool track_mouse_leave_; +#if defined(OS_LINUX) + // Since GtkWindow resize is asynchronous, we have to stash the dimensions, + // so that the backing store doesn't have to wait for sizing to take place. + gfx::Size logical_size_; +#endif #ifndef NDEBUG bool painting_; diff --git a/webkit/tools/test_shell/webwidget_host_gtk.cc b/webkit/tools/test_shell/webwidget_host_gtk.cc index 77981e1..b471e6d 100644 --- a/webkit/tools/test_shell/webwidget_host_gtk.cc +++ b/webkit/tools/test_shell/webwidget_host_gtk.cc @@ -323,13 +323,13 @@ WebWidgetHost::~WebWidgetHost() { void WebWidgetHost::Resize(const gfx::Size &newsize) { // The pixel buffer backing us is now the wrong size canvas_.reset(); - + logical_size_ = newsize; webwidget_->resize(newsize); } void WebWidgetHost::Paint() { - int width = view_->allocation.width; - int height = view_->allocation.height; + int width = logical_size_.width(); + int height = logical_size_.height(); gfx::Rect client_rect(width, height); // Allocate a canvas if necessary |