зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1191597 part 5 - Ensure to cleanup old window size from the list when exit fullscreen. r=smaug
--HG-- extra : source : 64ff6f986119f8ace8f2c3fa73e554a2a73e2242
This commit is contained in:
Родитель
1dac48d33e
Коммит
18f7e26d54
|
@ -3096,6 +3096,10 @@ nsDOMWindowUtils::ExitFullscreen()
|
|||
{
|
||||
nsCOMPtr<nsIDocument> doc = GetDocument();
|
||||
NS_ENSURE_STATE(doc);
|
||||
|
||||
// Although we would not use the old size if we have already exited
|
||||
// fullscreen, we still want to cleanup in case we haven't.
|
||||
nsSize oldSize = OldWindowSize::GetAndRemove(doc->GetWindow());
|
||||
if (!doc->IsFullScreenDoc()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -3104,9 +3108,7 @@ nsDOMWindowUtils::ExitFullscreen()
|
|||
// set the window dimensions in advance. Since the resize message
|
||||
// comes after the fullscreen change call, doing so could avoid an
|
||||
// extra resize reflow after this point.
|
||||
FullscreenChangePrepare prepare(
|
||||
GetPresShell(), OldWindowSize::GetAndRemove(doc->GetWindow()));
|
||||
|
||||
FullscreenChangePrepare prepare(GetPresShell(), oldSize);
|
||||
nsIDocument::ExitFullscreenInDocTree(doc);
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче