Bug 782852 - Assume fullscreen/pointer lock is approved hwhen full-screen-api.approval-required pref is false. r=smaug

This commit is contained in:
Chris Pearce 2012-08-17 12:47:37 +12:00
parent 0684d004cb
commit 84222bb1d7

View File

@ -9124,6 +9124,7 @@ nsDocument::RequestFullScreen(Element* aElement,
// trusted and so are automatically approved.
if (!mIsApprovedForFullscreen) {
mIsApprovedForFullscreen =
!Preferences::GetBool("full-screen-api.approval-required") ||
NodePrincipal()->GetAppStatus() >= nsIPrincipal::APP_STATUS_INSTALLED ||
nsContentUtils::IsSitePermAllow(NodePrincipal(), "fullscreen");
}