зеркало из https://github.com/mozilla/gecko-dev.git
Bug 574690 - Backout changeset 7124132f0506 due to regressions. a=blocking.
This commit is contained in:
Родитель
94d54bbb1f
Коммит
6c6962138a
|
@ -994,6 +994,16 @@ void nsXULWindow::OnChromeLoaded()
|
||||||
mChromeLoaded = PR_TRUE;
|
mChromeLoaded = PR_TRUE;
|
||||||
ApplyChromeFlags();
|
ApplyChromeFlags();
|
||||||
SyncAttributesToWidget();
|
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;
|
PRBool positionSet = !mIgnoreXULPosition;
|
||||||
nsCOMPtr<nsIXULWindow> parentWindow(do_QueryReferent(mParentWindow));
|
nsCOMPtr<nsIXULWindow> parentWindow(do_QueryReferent(mParentWindow));
|
||||||
|
@ -1006,19 +1016,6 @@ void nsXULWindow::OnChromeLoaded()
|
||||||
#endif
|
#endif
|
||||||
if (positionSet)
|
if (positionSet)
|
||||||
positionSet = LoadPositionFromXUL();
|
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();
|
LoadMiscPersistentAttributesFromXUL();
|
||||||
|
|
||||||
if (mCenterAfterLoad && !positionSet)
|
if (mCenterAfterLoad && !positionSet)
|
||||||
|
@ -1171,7 +1168,7 @@ PRBool nsXULWindow::LoadSizeFromXUL()
|
||||||
|
|
||||||
mIntrinsicallySized = PR_FALSE;
|
mIntrinsicallySized = PR_FALSE;
|
||||||
if (specWidth != currWidth || specHeight != currHeight)
|
if (specWidth != currWidth || specHeight != currHeight)
|
||||||
SetSize(specWidth, specHeight, PR_TRUE);
|
SetSize(specWidth, specHeight, PR_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return gotSize;
|
return gotSize;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче