From ca5c9e43ccd036afab025bca61174a080efa94d5 Mon Sep 17 00:00:00 2001 From: "kipp%netscape.com" Date: Thu, 30 Jul 1998 16:07:04 +0000 Subject: [PATCH] Removed ForceRefresh call git-svn-id: svn://10.0.0.236/trunk@6871 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webshell/src/nsDocumentViewer.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/mozilla/webshell/src/nsDocumentViewer.cpp b/mozilla/webshell/src/nsDocumentViewer.cpp index 005ca7b6f89..c8c08381be6 100644 --- a/mozilla/webshell/src/nsDocumentViewer.cpp +++ b/mozilla/webshell/src/nsDocumentViewer.cpp @@ -280,6 +280,7 @@ DocumentViewerImpl::Init(nsNativeWidget aNativeParent, { nsresult rv; nsRect bounds; + nscoord width, height; NS_PRECONDITION(nsnull != aPresContext, "null ptr"); NS_PRECONDITION(nsnull != aDocument, "null ptr"); @@ -342,17 +343,14 @@ DocumentViewerImpl::Init(nsNativeWidget aNativeParent, goto done; } - // Now that we have a presentation shell trigger a reflow so we - // create a frame model + // Initialize our view manager mWindow->GetBounds(bounds); - if (nsnull != mPresShell) { - nscoord width = bounds.width; - nscoord height = bounds.height; - width = NS_TO_INT_ROUND(width * mPresContext->GetPixelsToTwips()); - height = NS_TO_INT_ROUND(height * mPresContext->GetPixelsToTwips()); - mViewManager->SetWindowDimensions(width, height); - } - ForceRefresh(); + width = bounds.width; + height = bounds.height; + width = NS_TO_INT_ROUND(width * mPresContext->GetPixelsToTwips()); + height = NS_TO_INT_ROUND(height * mPresContext->GetPixelsToTwips()); + mViewManager->DisableRefresh(); + mViewManager->SetWindowDimensions(width, height); done: return rv;