зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1357002 - Part 1: Cache "dom.webcomponents.customelements.enabled" preference; r=wchen
MozReview-Commit-ID: HMsvOmYJvjX
This commit is contained in:
Родитель
25a1e25bd9
Коммит
03f19d5e46
|
@ -172,7 +172,7 @@ NS_INTERFACE_MAP_END
|
|||
/* static */ bool
|
||||
CustomElementRegistry::IsCustomElementEnabled(JSContext* aCx, JSObject* aObject)
|
||||
{
|
||||
return Preferences::GetBool("dom.webcomponents.customelements.enabled") ||
|
||||
return nsContentUtils::IsCustomElementsEnabled() ||
|
||||
nsContentUtils::IsWebComponentsEnabled();
|
||||
}
|
||||
|
||||
|
|
|
@ -291,6 +291,7 @@ bool nsContentUtils::sIsResourceTimingEnabled = false;
|
|||
bool nsContentUtils::sIsUserTimingLoggingEnabled = false;
|
||||
bool nsContentUtils::sIsExperimentalAutocompleteEnabled = false;
|
||||
bool nsContentUtils::sIsWebComponentsEnabled = false;
|
||||
bool nsContentUtils::sIsCustomElementsEnabled = false;
|
||||
bool nsContentUtils::sPrivacyResistFingerprinting = false;
|
||||
bool nsContentUtils::sSendPerformanceTimingNotifications = false;
|
||||
bool nsContentUtils::sUseActivityCursor = false;
|
||||
|
@ -596,6 +597,9 @@ nsContentUtils::Init()
|
|||
Preferences::AddBoolVarCache(&sIsWebComponentsEnabled,
|
||||
"dom.webcomponents.enabled", false);
|
||||
|
||||
Preferences::AddBoolVarCache(&sIsCustomElementsEnabled,
|
||||
"dom.webcomponents.customelements.enabled", false);
|
||||
|
||||
Preferences::AddBoolVarCache(&sPrivacyResistFingerprinting,
|
||||
"privacy.resistFingerprinting", false);
|
||||
|
||||
|
|
|
@ -2863,6 +2863,9 @@ public:
|
|||
static already_AddRefed<nsIEventTarget>
|
||||
GetEventTargetByLoadInfo(nsILoadInfo* aLoadInfo, mozilla::TaskCategory aCategory);
|
||||
|
||||
static bool
|
||||
IsCustomElementsEnabled() { return sIsCustomElementsEnabled; }
|
||||
|
||||
private:
|
||||
static bool InitializeEventTable();
|
||||
|
||||
|
@ -2980,6 +2983,7 @@ private:
|
|||
static bool sIsFrameTimingPrefEnabled;
|
||||
static bool sIsExperimentalAutocompleteEnabled;
|
||||
static bool sIsWebComponentsEnabled;
|
||||
static bool sIsCustomElementsEnabled;
|
||||
static bool sPrivacyResistFingerprinting;
|
||||
static bool sSendPerformanceTimingNotifications;
|
||||
static bool sUseActivityCursor;
|
||||
|
|
|
@ -64,6 +64,7 @@ const char* mozilla::dom::ContentPrefs::gInitPrefs[] = {
|
|||
"dom.vibrator.enabled",
|
||||
"dom.vibrator.max_vibrate_list_len",
|
||||
"dom.vibrator.max_vibrate_ms",
|
||||
"dom.webcomponents.customelements.enabled",
|
||||
"dom.webcomponents.enabled",
|
||||
"focusmanager.testmode",
|
||||
"font.size.inflation.disabledInMasterProcess",
|
||||
|
|
Загрузка…
Ссылка в новой задаче