b=793501 don't resize toplevel window in response to resized notification r=bz
authorKarl Tomlinson <karlt+@karlt.net>
Tue, 23 Oct 2012 11:32:24 +1300
changeset 111101 31df6929909f429b5c9c7e20376a7c49cdb2befc
parent 111100 45b8a00043d5ab818a276d528cb46083beb8a5ce
child 111102 ded8c7f9a0d2be789c805017f756dfbf0dd9cd2d
push id23727
push userryanvm@gmail.com
push dateTue, 23 Oct 2012 10:47:09 +0000
treeherdermozilla-central@43c585774a13 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs793501
milestone19.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
b=793501 don't resize toplevel window in response to resized notification r=bz
layout/base/nsDocumentViewer.cpp
--- a/layout/base/nsDocumentViewer.cpp
+++ b/layout/base/nsDocumentViewer.cpp
@@ -1864,29 +1864,19 @@ DocumentViewerImpl::SetPreviousViewer(ns
 
 NS_IMETHODIMP
 DocumentViewerImpl::SetBounds(const nsIntRect& aBounds)
 {
   NS_ENSURE_TRUE(mDocument, NS_ERROR_NOT_AVAILABLE);
 
   mBounds = aBounds;
   if (mWindow) {
-    // When attached to a top level window, change the client area, not the
-    // window frame.
-    // Don't have the widget repaint. Layout will generate repaint requests
-    // during reflow.
-    if (mAttachedToParent) {
-      if (aBounds.x != 0 || aBounds.y != 0) {
-        mWindow->ResizeClient(aBounds.x, aBounds.y,
-                              aBounds.width, aBounds.height,
-                              false);
-      } else {
-        mWindow->ResizeClient(aBounds.width, aBounds.height, false);
-      }
-    } else {
+    if (!mAttachedToParent) {
+      // Don't have the widget repaint. Layout will generate repaint requests
+      // during reflow.
       mWindow->Resize(aBounds.x, aBounds.y,
                       aBounds.width, aBounds.height,
                       false);
     }
   } else if (mPresContext && mViewManager) {
     int32_t p2a = mPresContext->AppUnitsPerDevPixel();
     mViewManager->SetWindowDimensions(NSIntPixelsToAppUnits(mBounds.width, p2a),
                                       NSIntPixelsToAppUnits(mBounds.height, p2a));