diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-05 01:11:08 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-05 01:11:08 +0000 |
commit | 18a397884cb6824b3e4bff9554f1f23df109f527 (patch) | |
tree | d5a33bad4498dd67ce14f719b4860184f5d8e2f3 /webkit | |
parent | 13eb97de2ab499a8fc74d54a60baa6866d080863 (diff) | |
download | chromium_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')
-rw-r--r-- | webkit/plugins/npapi/gtk_plugin_container_manager.cc | 5 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_gtk.cc | 11 |
2 files changed, 9 insertions, 7 deletions
diff --git a/webkit/plugins/npapi/gtk_plugin_container_manager.cc b/webkit/plugins/npapi/gtk_plugin_container_manager.cc index 8ccf5f4..d018714 100644 --- a/webkit/plugins/npapi/gtk_plugin_container_manager.cc +++ b/webkit/plugins/npapi/gtk_plugin_container_manager.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. @@ -85,7 +85,8 @@ void GtkPluginContainerManager::MovePluginContainer( GdkRectangle clip_rect = move.clip_rect.ToGdkRectangle(); GdkRegion* clip_region = gdk_region_rectangle(&clip_rect); gfx::SubtractRectanglesFromRegion(clip_region, move.cutout_rects); - gdk_window_shape_combine_region(widget->window, clip_region, 0, 0); + gdk_window_shape_combine_region(gtk_widget_get_window(widget), + clip_region, 0, 0); gdk_region_destroy(clip_region); } 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); |