Bug 610057. Sizemode attribute is incorrect in windows which are not set to persist the attribute (e.g. popup windows). r=neil a=blocking-final

This commit is contained in:
Felipe Gomes 2010-12-20 13:59:48 -08:00
Родитель ccf162871b
Коммит 877ef110f9
1 изменённых файлов: 2 добавлений и 3 удалений

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

@ -1519,8 +1519,7 @@ NS_IMETHODIMP nsXULWindow::SavePersistentAttributes()
}
if (mPersistentAttributesDirty & PAD_MISC) {
if (sizeMode != nsSizeMode_Minimized &&
persistString.Find("sizemode") >= 0) {
if (sizeMode != nsSizeMode_Minimized) {
if (sizeMode == nsSizeMode_Maximized)
sizeString.Assign(SIZEMODE_MAXIMIZED);
else if (sizeMode == nsSizeMode_Fullscreen)
@ -1528,7 +1527,7 @@ NS_IMETHODIMP nsXULWindow::SavePersistentAttributes()
else
sizeString.Assign(SIZEMODE_NORMAL);
docShellElement->SetAttribute(MODE_ATTRIBUTE, sizeString);
if (ownerXULDoc)
if (ownerXULDoc && persistString.Find("sizemode") >= 0)
ownerXULDoc->Persist(windowElementId, MODE_ATTRIBUTE);
}
if (persistString.Find("zlevel") >= 0) {