Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Unified Diff: webkit/tools/test_shell/test_shell_gtk.cc

Issue 9030029: GTK: A bunch more removal of deprecated raw GtkWidget access, focusing on GtkWidget->window (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
« ui/gfx/gtk_preserve_window.cc ('K') | « webkit/plugins/npapi/gtk_plugin_container_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698