mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1191597 part 5 - Ensure to cleanup old window size from the list when exit fullscreen. r=smaug
This commit is contained in:
parent
9a1b1a3c54
commit
71588c6764
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user