mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-14 05:44:20 +00:00
Bug 781384 - Allow web apps to exit fullscreen outside of user generated event handlers. r=jlebar
This commit is contained in:
parent
84222bb1d7
commit
52afa94578
@ -8492,10 +8492,13 @@ DispatchFullScreenChange(nsIDocument* aTarget)
|
||||
NS_IMETHODIMP
|
||||
nsDocument::MozCancelFullScreen()
|
||||
{
|
||||
if (!nsContentUtils::IsRequestFullScreenAllowed()) {
|
||||
return NS_OK;
|
||||
// Only perform fullscreen changes if we're running in a webapp
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user