summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authordglazkov@chromium.org <dglazkov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 22:47:56 +0000
committerdglazkov@chromium.org <dglazkov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 22:47:56 +0000
commitd3ac6514978094404e1518f637443bc62e4bad1f (patch)
tree90687948c1dba46b230c6c24b749d33e931e024a /webkit
parent90669cb412412e38b62d53e567dae37a917b5ca1 (diff)
downloadchromium_src-d3ac6514978094404e1518f637443bc62e4bad1f.zip
chromium_src-d3ac6514978094404e1518f637443bc62e4bad1f.tar.gz
chromium_src-d3ac6514978094404e1518f637443bc62e4bad1f.tar.bz2
[GTK] Stash new dimensions on resize, so that the backing store can use them
without having to wait on GtkWindow to resize. R=tony BUG=8630 TEST=less flakiness on layout tests Review URL: http://codereview.chromium.org/198031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25538 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/tools/test_shell/webwidget_host.h5
-rw-r--r--webkit/tools/test_shell/webwidget_host_gtk.cc6
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