summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authordpolukhin@google.com <dpolukhin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-10 19:18:31 +0000
committerdpolukhin@google.com <dpolukhin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-10 19:18:31 +0000
commitd2bbcc8d3d11b0d53b0a8229b7d253ff448b1824 (patch)
treef00b7c0a5941536c46bc2f0c489da1f4ff52185b /chrome/browser
parenta3a494dafa67cc224fa77f39912850bce0e3f855 (diff)
downloadchromium_src-d2bbcc8d3d11b0d53b0a8229b7d253ff448b1824.zip
chromium_src-d2bbcc8d3d11b0d53b0a8229b7d253ff448b1824.tar.gz
chromium_src-d2bbcc8d3d11b0d53b0a8229b7d253ff448b1824.tar.bz2
Temporary revert CLs due to perf regression on New Tab Warm:
http://codereview.chromium.org/660087 http://codereview.chromium.org/669238 BUG=37533 TEST=none Review URL: http://codereview.chromium.org/829001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41185 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/views/tab_contents/tab_contents_view_win.cc20
1 files changed, 4 insertions, 16 deletions
diff --git a/chrome/browser/views/tab_contents/tab_contents_view_win.cc b/chrome/browser/views/tab_contents/tab_contents_view_win.cc
index 9161668..d1c3bfe 100644
--- a/chrome/browser/views/tab_contents/tab_contents_view_win.cc
+++ b/chrome/browser/views/tab_contents/tab_contents_view_win.cc
@@ -171,11 +171,7 @@ void TabContentsViewWin::OnTabCrashed() {
void TabContentsViewWin::SizeContents(const gfx::Size& size) {
// TODO(brettw) this is a hack and should be removed. See tab_contents_view.h.
-
- // Set new window size. It will fire OnWindowPosChanged and we will do
- // the rest in WasSized.
- UINT swp_flags = SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE;
- SetWindowPos(NULL, 0, 0, size.width(), size.height(), swp_flags);
+ WasSized(size);
}
void TabContentsViewWin::Focus() {
@@ -455,12 +451,7 @@ void TabContentsViewWin::OnWindowPosChanged(WINDOWPOS* window_pos) {
}
void TabContentsViewWin::OnSize(UINT param, const CSize& size) {
- // NOTE: Because TabContentsViewWin handles OnWindowPosChanged without calling
- // DefWindowProc, OnSize is NOT called on window resize. This handler
- // is called only once when the window is created.
-
- // Don't call base class OnSize to avoid useless layout for 0x0 size.
- // We will get OnWindowPosChanged later and layout root view in WasSized.
+ WidgetWin::OnSize(param, size);
// Hack for thinkpad touchpad driver.
// Set fake scrollbars so that we can get scroll messages,
@@ -511,16 +502,13 @@ void TabContentsViewWin::WasShown() {
}
void TabContentsViewWin::WasSized(const gfx::Size& size) {
+ UINT swp_flags = SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE;
+ SetWindowPos(NULL, 0, 0, size.width(), size.height(), swp_flags);
if (tab_contents()->interstitial_page())
tab_contents()->interstitial_page()->SetSize(size);
RenderWidgetHostView* rwhv = tab_contents()->GetRenderWidgetHostView();
if (rwhv)
rwhv->SetSize(size);
-
- // We have to layout root view here because we handle OnWindowPosChanged
- // without calling DefWindowProc (it sends OnSize and OnMove) so we don't
- // receive OnSize.
- LayoutRootView();
}
bool TabContentsViewWin::ScrollZoom(int scroll_type) {