diff options
author | robertshield@google.com <robertshield@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-23 01:16:45 +0000 |
---|---|---|
committer | robertshield@google.com <robertshield@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-23 01:16:45 +0000 |
commit | ec85e6880806202737a4d32c94817f0ecad4ca8b (patch) | |
tree | 70316d4f9ffffa4393e01fae2bd8718c6daa5f5f /chrome/browser | |
parent | be20c1e89c051da55c3c3280d95aa0329f5606e1 (diff) | |
download | chromium_src-ec85e6880806202737a4d32c94817f0ecad4ca8b.zip chromium_src-ec85e6880806202737a4d32c94817f0ecad4ca8b.tar.gz chromium_src-ec85e6880806202737a4d32c94817f0ecad4ca8b.tar.bz2 |
Revert of http://codereview.chromium.org/87058 which appears to hang the XP Tests.
Log of hanging tests:
http://build.chromium.org/buildbot/waterfall/builders/XP%20Tests%20(dbg)(2)/builds/1246/steps/unit_tests/logs/stdio
TBR=http://codereview.chromium.org/92055
Review URL: http://codereview.chromium.org/92055
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14281 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rwxr-xr-x | chrome/browser/extensions/extension_view.cc | 40 |
1 files changed, 15 insertions, 25 deletions
diff --git a/chrome/browser/extensions/extension_view.cc b/chrome/browser/extensions/extension_view.cc index 8caf259..960765a 100755 --- a/chrome/browser/extensions/extension_view.cc +++ b/chrome/browser/extensions/extension_view.cc @@ -50,32 +50,22 @@ void ExtensionView::DidStopLoading(RenderViewHost* render_view_host, void ExtensionView::DidContentsPreferredWidthChange(const int pref_width) { if (pref_width > 0) { - gfx::Size pref_size = GetPreferredSize(); - // This seems to get called a fair amount, so early out if preferred width - // is unchanged. - if (pref_size.width() != pref_width) { - // SchedulePaint first because new_width may be smaller and we want - // the Parent to paint the vacated space. - SchedulePaint(); - set_preferred_size(gfx::Size(pref_width, 100)); - SizeToPreferredSize(); - - // TODO(rafaelw): This assumes that the extension view is a child of an - // ExtensionToolstrip, which is a child of the BookmarkBarView. There - // should be a way to do this where the ExtensionView doesn't have to know - // its containment hierarchy. - if (GetParent() != NULL && GetParent()->GetParent() != NULL) { - GetParent()->GetParent()->Layout(); - } - - // Also SchedulePaint after because new_width may be larger, and we need - // to draw the new part of the view. - SchedulePaint(); - - // Need to tell the RenderWidgetHostView about the new size since it's - // not part of the view hierarchy. - render_view_host()->view()->SetSize(size()); + // SchedulePaint first because new_width may be smaller and we want + // the Parent to paint the vacated space. + SchedulePaint(); + set_preferred_size(gfx::Size(pref_width, 100)); + SizeToPreferredSize(); + + // TODO(rafaelw): This assumes that the extension view is a child of an + // ExtensionToolstrip, which is a child of the BookmarkBarView. There should + // be a way to do this where the ExtensionView doesn't have to know it's + // containment hierarchy. + if (GetParent() != NULL && GetParent()->GetParent() != NULL) { + GetParent()->GetParent()->Layout(); } + + SchedulePaint(); + render_view_host()->WasResized(); } } |