Bug 574690 - Backout changeset 7124132f0506 due to regressions. a=blocking.

This commit is contained in:
Jim Mathies 2010-10-15 08:50:09 -05:00
Родитель 834616f499
Коммит f43da956eb
1 изменённых файлов: 11 добавлений и 14 удалений

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

@ -994,6 +994,16 @@ void nsXULWindow::OnChromeLoaded()
mChromeLoaded = PR_TRUE;
ApplyChromeFlags();
SyncAttributesToWidget();
if (!mIgnoreXULSize)
LoadSizeFromXUL();
if (mIntrinsicallySized) {
// (if LoadSizeFromXUL set the size, mIntrinsicallySized will be false)
nsCOMPtr<nsIContentViewer> cv;
mDocShell->GetContentViewer(getter_AddRefs(cv));
nsCOMPtr<nsIMarkupDocumentViewer> markupViewer(do_QueryInterface(cv));
if (markupViewer)
markupViewer->SizeToContent();
}
PRBool positionSet = !mIgnoreXULPosition;
nsCOMPtr<nsIXULWindow> parentWindow(do_QueryReferent(mParentWindow));
@ -1006,19 +1016,6 @@ void nsXULWindow::OnChromeLoaded()
#endif
if (positionSet)
positionSet = LoadPositionFromXUL();
if (!mIgnoreXULSize)
LoadSizeFromXUL();
if (mIntrinsicallySized) {
// (if LoadSizeFromXUL set the size, mIntrinsicallySized will be false)
nsCOMPtr<nsIContentViewer> cv;
mDocShell->GetContentViewer(getter_AddRefs(cv));
nsCOMPtr<nsIMarkupDocumentViewer> markupViewer(do_QueryInterface(cv));
if (markupViewer)
markupViewer->SizeToContent();
}
LoadMiscPersistentAttributesFromXUL();
if (mCenterAfterLoad && !positionSet)
@ -1171,7 +1168,7 @@ PRBool nsXULWindow::LoadSizeFromXUL()
mIntrinsicallySized = PR_FALSE;
if (specWidth != currWidth || specHeight != currHeight)
SetSize(specWidth, specHeight, PR_TRUE);
SetSize(specWidth, specHeight, PR_FALSE);
}
return gotSize;