summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-05 01:11:08 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-05 01:11:08 +0000
commit18a397884cb6824b3e4bff9554f1f23df109f527 (patch)
treed5a33bad4498dd67ce14f719b4860184f5d8e2f3 /webkit/tools/test_shell
parent13eb97de2ab499a8fc74d54a60baa6866d080863 (diff)
downloadchromium_src-18a397884cb6824b3e4bff9554f1f23df109f527.zip
chromium_src-18a397884cb6824b3e4bff9554f1f23df109f527.tar.gz
chromium_src-18a397884cb6824b3e4bff9554f1f23df109f527.tar.bz2
GTK: A bunch more removal of deprecated raw GtkWidget access, focusing on GtkWidget->window
BUG=79722 TEST=none Review URL: http://codereview.chromium.org/9030029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116430 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell')
-rw-r--r--webkit/tools/test_shell/test_shell_gtk.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/webkit/tools/test_shell/test_shell_gtk.cc b/webkit/tools/test_shell/test_shell_gtk.cc
index f1eeb79..d575da5 100644
--- a/webkit/tools/test_shell/test_shell_gtk.cc
+++ b/webkit/tools/test_shell/test_shell_gtk.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -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);