mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 781384 - Allow web apps to exit fullscreen outside of user generated event handlers. r=jlebar
This commit is contained in:
parent
a7be937da8
commit
8ceac78a9d
@ -8492,10 +8492,13 @@ DispatchFullScreenChange(nsIDocument* aTarget)
|
|||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsDocument::MozCancelFullScreen()
|
nsDocument::MozCancelFullScreen()
|
||||||
{
|
{
|
||||||
if (!nsContentUtils::IsRequestFullScreenAllowed()) {
|
// Only perform fullscreen changes if we're running in a webapp
|
||||||
return NS_OK;
|
// same-origin to the web app, or if we're in a user generated event
|
||||||
|
// handler.
|
||||||
|
if (NodePrincipal()->GetAppStatus() >= nsIPrincipal::APP_STATUS_INSTALLED ||
|
||||||
|
nsContentUtils::IsRequestFullScreenAllowed()) {
|
||||||
|
RestorePreviousFullScreenState();
|
||||||
}
|
}
|
||||||
RestorePreviousFullScreenState();
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user