diff options
author | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-13 01:39:31 +0000 |
---|---|---|
committer | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-13 01:39:31 +0000 |
commit | ec2191fc123ffe5208995a4f4bd3f4e350590a44 (patch) | |
tree | cd383dc958ea0d9a75c02d59ef2d54f10ee708f4 /views/widget | |
parent | 7a9ed29b2d14f043532def474448f50bd38fc029 (diff) | |
download | chromium_src-ec2191fc123ffe5208995a4f4bd3f4e350590a44.zip chromium_src-ec2191fc123ffe5208995a4f4bd3f4e350590a44.tar.gz chromium_src-ec2191fc123ffe5208995a4f4bd3f4e350590a44.tar.bz2 |
Revert 28716 - Gets blocked popups to work on views/gtk. I had to fix a couple of
additional things here:
. Avoid doing anything in OnSizeAllocation if the size hasn't
changed. Because of how gtk works I was getting stuck in a loop if I
OnSizeAllocate did anything if the size hadn't changed.
. Applied similar shortcut to TabContentsViewGtk.
. Made SimpleMenuModel only ask delegate for checked state if the item
is a check.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/261051
TBR=sky@chromium.org
Review URL: http://codereview.chromium.org/267069
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28768 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget')
-rw-r--r-- | views/widget/widget_gtk.cc | 9 | ||||
-rw-r--r-- | views/widget/widget_gtk.h | 7 |
2 files changed, 0 insertions, 16 deletions
diff --git a/views/widget/widget_gtk.cc b/views/widget/widget_gtk.cc index 51140a6..cc0aec9 100644 --- a/views/widget/widget_gtk.cc +++ b/views/widget/widget_gtk.cc @@ -628,15 +628,6 @@ void WidgetGtk::CreateGtkWidget(GtkWidget* parent, const gfx::Rect& bounds) { } void WidgetGtk::OnSizeAllocate(GtkWidget* widget, GtkAllocation* allocation) { - // See comment next to size_ as to why we do this. Also note, it's tempting - // to put this in the static method so subclasses don't need to worry about - // it, but if a subclasses needs to set a shape then they need to always - // reset the shape in this method regardless of whether the size changed. - gfx::Size new_size(allocation->width, allocation->height); - if (new_size == size_) - return; - - size_ = new_size; root_view_->SetBounds(0, 0, allocation->width, allocation->height); root_view_->SchedulePaint(); } diff --git a/views/widget/widget_gtk.h b/views/widget/widget_gtk.h index e082eea..ccd3bd5 100644 --- a/views/widget/widget_gtk.h +++ b/views/widget/widget_gtk.h @@ -8,7 +8,6 @@ #include <gtk/gtk.h> #include "app/active_window_watcher_x.h" -#include "base/gfx/size.h" #include "base/message_loop.h" #include "views/focus/focus_manager.h" #include "views/widget/widget.h" @@ -414,12 +413,6 @@ class WidgetGtk // See make_transient_to_parent for a description. bool transient_to_parent_; - // Last size supplied to OnSizeAllocate. We cache this as any time the - // size of a GtkWidget changes size_allocate is called, even if the size - // didn't change. If we didn't cache this and ignore calls when the size - // hasn't changed, we can end up getting stuck in a never ending loop. - gfx::Size size_; - DISALLOW_COPY_AND_ASSIGN(WidgetGtk); }; |