From 8250de36874ab36004751f741b87c310898e9cc0 Mon Sep 17 00:00:00 2001 From: Jim Mathies Date: Sun, 25 Jan 2015 05:16:59 -0600 Subject: [PATCH] Bug 1077085 - Insure puppet widgets don't skip sending resize notifications to the view manager when the user navigates through history items. r=tn --- layout/base/nsDocumentViewer.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp index 4b32c6397e2f..d56b8a39c699 100644 --- a/layout/base/nsDocumentViewer.cpp +++ b/layout/base/nsDocumentViewer.cpp @@ -1930,14 +1930,13 @@ nsDocumentViewer::SetBounds(const nsIntRect& aBounds) NS_ENSURE_TRUE(mDocument, NS_ERROR_NOT_AVAILABLE); mBounds = aBounds; - if (mWindow) { - 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); - } + + if (mWindow && !mAttachedToParent) { + // Resize the widget, but don't trigger 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),