From ec85e6880806202737a4d32c94817f0ecad4ca8b Mon Sep 17 00:00:00 2001 From: "robertshield@google.com" Date: Thu, 23 Apr 2009 01:16:45 +0000 Subject: 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 --- chrome/browser/extensions/extension_view.cc | 40 +++++++++++------------------ 1 file changed, 15 insertions(+), 25 deletions(-) (limited to 'chrome/browser') 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(); } } -- cgit v1.1