Bug 1077085 - Insure puppet widgets don't skip sending resize notifications to the view manager when the user navigates through history items. r=tn

This commit is contained in:
Jim Mathies 2015-01-25 05:16:59 -06:00
Родитель 901be380e7
Коммит 8250de3687
1 изменённых файлов: 7 добавлений и 8 удалений

Просмотреть файл

@ -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),