summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authordpolukhin@chromium.org <dpolukhin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-21 11:23:31 +0000
committerdpolukhin@chromium.org <dpolukhin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-21 11:23:31 +0000
commit970e30dc8789352e51963fd205f79a317e9d3ec4 (patch)
tree1814a47c844b3aa2f4daa2ff718eabc6d6b84617 /views
parent633877bd6ded864ddc9d89487a7e34c1fcf0b17f (diff)
downloadchromium_src-970e30dc8789352e51963fd205f79a317e9d3ec4.zip
chromium_src-970e30dc8789352e51963fd205f79a317e9d3ec4.tar.gz
chromium_src-970e30dc8789352e51963fd205f79a317e9d3ec4.tar.bz2
Revert revisions 47902 and 47900.
Chrome UI blinks after replacement of gtk_widget_set_size_request with gtk_widget_size_allocate on resizing or infobar appearing animation. It happens because gtk_widget_size_allocate results in background resizing on message loop idle. It looks like we can't use gtk_widget_size_allocate at this place at all. Review URL: http://codereview.chromium.org/2131021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47913 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/controls/native/native_view_host_gtk.cc15
1 files changed, 5 insertions, 10 deletions
diff --git a/views/controls/native/native_view_host_gtk.cc b/views/controls/native/native_view_host_gtk.cc
index 40af166..79a144d 100644
--- a/views/controls/native/native_view_host_gtk.cc
+++ b/views/controls/native/native_view_host_gtk.cc
@@ -10,7 +10,6 @@
#include "base/logging.h"
#include "views/controls/native/native_view_host.h"
#include "views/focus/focus_manager.h"
-#include "views/widget/gtk_views_fixed.h"
#include "views/widget/widget_gtk.h"
namespace views {
@@ -229,17 +228,13 @@ void NativeViewHostGtk::ShowWidget(int x, int y, int w, int h) {
fixed_h = std::min(installed_clip_bounds_.height(), h);
}
- // Size and place the hosted NativeView. It should be done BEFORE placing
- // fixed_ itself, otherwise controls will initially appear at 0,0 of fixed_
- // parent.
- GtkAllocation alloc = { child_x, child_y, child_w, child_h };
- gtk_widget_size_allocate(host_->native_view(), &alloc);
- gtk_views_fixed_set_use_allocated_size(host_->native_view(), true);
- gtk_fixed_move(GTK_FIXED(fixed_), host_->native_view(), child_x, child_y);
-
// Size and place the fixed_.
GetHostWidget()->PositionChild(fixed_, fixed_x, fixed_y, fixed_w, fixed_h);
+ // Size and place the hosted NativeView.
+ gtk_widget_set_size_request(host_->native_view(), child_w, child_h);
+ gtk_fixed_move(GTK_FIXED(fixed_), host_->native_view(), child_x, child_y);
+
gtk_widget_show(fixed_);
gtk_widget_show(host_->native_view());
}
@@ -277,7 +272,7 @@ void NativeViewHostGtk::CreateFixed(bool needs_window) {
DestroyFixed();
- fixed_ = gtk_views_fixed_new();
+ fixed_ = gtk_fixed_new();
gtk_widget_set_name(fixed_, "views-native-view-host-fixed");
gtk_fixed_set_has_window(GTK_FIXED(fixed_), needs_window);
// Defeat refcounting. We need to own the fixed.