mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 691947 - Relax DOM full-screen API security constraints for requests coming from chrome. r=roc
This commit is contained in:
parent
702c5e844c
commit
29e76a123f
@ -5813,7 +5813,9 @@ nsContentUtils::IsFullScreenApiEnabled()
|
||||
|
||||
bool nsContentUtils::IsRequestFullScreenAllowed()
|
||||
{
|
||||
return !sTrustedFullScreenOnly || nsEventStateManager::IsHandlingUserInput();
|
||||
return !sTrustedFullScreenOnly ||
|
||||
nsEventStateManager::IsHandlingUserInput() ||
|
||||
IsCallerChrome();
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -8607,6 +8607,14 @@ nsDocument::GetMozFullScreenEnabled(bool *aFullScreen)
|
||||
NS_ENSURE_ARG_POINTER(aFullScreen);
|
||||
*aFullScreen = false;
|
||||
|
||||
if (nsContentUtils::IsCallerChrome() &&
|
||||
nsContentUtils::IsFullScreenApiEnabled()) {
|
||||
// Chrome code can always use the full-screen API, provided it's not
|
||||
// explicitly disabled.
|
||||
*aFullScreen = true;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (!nsContentUtils::IsFullScreenApiEnabled() ||
|
||||
nsContentUtils::HasPluginWithUncontrolledEventDispatch(this) ||
|
||||
!IsVisible()) {
|
||||
|
Loading…
Reference in New Issue
Block a user