mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 17:25:36 +00:00
Bug 1548253 - Port pref cache variables of nsContentUtils to StaticPrefs - full-screen-api.enabled, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D29500 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
260fdd0caa
commit
54e6e5339e
@ -10678,7 +10678,7 @@ static bool HasFullscreenSubDocument(Document* aDoc) {
|
||||
// in the given document. Returns a static string indicates the reason
|
||||
// why it is not enabled otherwise.
|
||||
static const char* GetFullscreenError(Document* aDoc, CallerType aCallerType) {
|
||||
bool apiEnabled = nsContentUtils::IsFullscreenApiEnabled();
|
||||
bool apiEnabled = StaticPrefs::full_screen_api_enabled();
|
||||
if (apiEnabled && aCallerType == CallerType::System) {
|
||||
// Chrome code can always use the fullscreen API, provided it's not
|
||||
// explicitly disabled.
|
||||
|
@ -310,7 +310,6 @@ nsString* nsContentUtils::sAltText = nullptr;
|
||||
nsString* nsContentUtils::sModifierSeparator = nullptr;
|
||||
|
||||
bool nsContentUtils::sInitialized = false;
|
||||
bool nsContentUtils::sIsFullscreenApiEnabled = false;
|
||||
bool nsContentUtils::sIsUnprefixedFullscreenApiEnabled = false;
|
||||
bool nsContentUtils::sTrustedFullscreenOnly = true;
|
||||
bool nsContentUtils::sIsCutCopyAllowed = true;
|
||||
@ -633,9 +632,6 @@ nsresult nsContentUtils::Init() {
|
||||
Preferences::AddBoolVarCache(&sAllowXULXBL_for_file,
|
||||
"dom.allow_XUL_XBL_for_file");
|
||||
|
||||
Preferences::AddBoolVarCache(&sIsFullscreenApiEnabled,
|
||||
"full-screen-api.enabled");
|
||||
|
||||
Preferences::AddBoolVarCache(&sIsUnprefixedFullscreenApiEnabled,
|
||||
"full-screen-api.unprefix.enabled");
|
||||
|
||||
@ -6667,11 +6663,6 @@ bool nsContentUtils::ChannelShouldInheritPrincipal(
|
||||
return inherit;
|
||||
}
|
||||
|
||||
/* static */
|
||||
bool nsContentUtils::IsFullscreenApiEnabled() {
|
||||
return sIsFullscreenApiEnabled;
|
||||
}
|
||||
|
||||
/* static */
|
||||
bool nsContentUtils::IsRequestFullscreenAllowed(CallerType aCallerType) {
|
||||
// If more time has elapsed since the user input than is specified by the
|
||||
|
@ -2325,11 +2325,6 @@ class nsContentUtils {
|
||||
*/
|
||||
static bool IsFocusedContent(const nsIContent* aContent);
|
||||
|
||||
/**
|
||||
* Returns true if the DOM fullscreen API is enabled.
|
||||
*/
|
||||
static bool IsFullscreenApiEnabled();
|
||||
|
||||
/**
|
||||
* Returns true if the unprefixed fullscreen API is enabled.
|
||||
*/
|
||||
@ -3502,7 +3497,6 @@ class nsContentUtils {
|
||||
|
||||
static bool sIsHandlingKeyBoardEvent;
|
||||
static bool sAllowXULXBL_for_file;
|
||||
static bool sIsFullscreenApiEnabled;
|
||||
static bool sIsUnprefixedFullscreenApiEnabled;
|
||||
static bool sTrustedFullscreenOnly;
|
||||
static bool sIsCutCopyAllowed;
|
||||
|
@ -597,7 +597,6 @@ VARCACHE_PREF(
|
||||
bool, true
|
||||
)
|
||||
|
||||
|
||||
// Allow the content process to create a File from a path. This is allowed just
|
||||
// on parent process, on 'file' Content process, or for testing.
|
||||
VARCACHE_PREF(
|
||||
@ -606,6 +605,13 @@ VARCACHE_PREF(
|
||||
RelaxedAtomicBool, false
|
||||
)
|
||||
|
||||
// DOM full-screen API.
|
||||
VARCACHE_PREF(
|
||||
"full-screen-api.enabled",
|
||||
full_screen_api_enabled,
|
||||
bool, false
|
||||
)
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Extension prefs
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -5287,7 +5287,6 @@ pref("alerts.useSystemBackend", true);
|
||||
#endif
|
||||
|
||||
// DOM full-screen API.
|
||||
pref("full-screen-api.enabled", false);
|
||||
pref("full-screen-api.allow-trusted-requests-only", true);
|
||||
// whether to prevent the top level widget from going fullscreen
|
||||
pref("full-screen-api.ignore-widgets", false);
|
||||
|
Loading…
Reference in New Issue
Block a user