mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-22 23:27:30 +09:00
Bug 1341898 - Make nsDocument::IsWebComponentsEnabled use a cached bool pref;
Note: Minus IPC bit. Tag UXP Issue #1344
This commit is contained in:
parent
f7154d573b
commit
d662ddd6b6
4 changed files with 12 additions and 4 deletions
|
|
@ -172,7 +172,7 @@ NS_INTERFACE_MAP_END
|
||||||
CustomElementRegistry::IsCustomElementEnabled(JSContext* aCx, JSObject* aObject)
|
CustomElementRegistry::IsCustomElementEnabled(JSContext* aCx, JSObject* aObject)
|
||||||
{
|
{
|
||||||
return Preferences::GetBool("dom.webcomponents.customelements.enabled") ||
|
return Preferences::GetBool("dom.webcomponents.customelements.enabled") ||
|
||||||
Preferences::GetBool("dom.webcomponents.enabled");
|
nsContentUtils::IsWebComponentsEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ void
|
/* static */ void
|
||||||
|
|
|
||||||
|
|
@ -284,6 +284,7 @@ bool nsContentUtils::sIsResourceTimingEnabled = false;
|
||||||
bool nsContentUtils::sIsPerformanceNavigationTimingEnabled = false;
|
bool nsContentUtils::sIsPerformanceNavigationTimingEnabled = false;
|
||||||
bool nsContentUtils::sIsUserTimingLoggingEnabled = false;
|
bool nsContentUtils::sIsUserTimingLoggingEnabled = false;
|
||||||
bool nsContentUtils::sIsExperimentalAutocompleteEnabled = false;
|
bool nsContentUtils::sIsExperimentalAutocompleteEnabled = false;
|
||||||
|
bool nsContentUtils::sIsWebComponentsEnabled = false;
|
||||||
bool nsContentUtils::sEncodeDecodeURLHash = false;
|
bool nsContentUtils::sEncodeDecodeURLHash = false;
|
||||||
bool nsContentUtils::sGettersDecodeURLHash = false;
|
bool nsContentUtils::sGettersDecodeURLHash = false;
|
||||||
bool nsContentUtils::sPrivacyResistFingerprinting = false;
|
bool nsContentUtils::sPrivacyResistFingerprinting = false;
|
||||||
|
|
@ -584,6 +585,9 @@ nsContentUtils::Init()
|
||||||
Preferences::AddBoolVarCache(&sIsExperimentalAutocompleteEnabled,
|
Preferences::AddBoolVarCache(&sIsExperimentalAutocompleteEnabled,
|
||||||
"dom.forms.autocomplete.experimental", false);
|
"dom.forms.autocomplete.experimental", false);
|
||||||
|
|
||||||
|
Preferences::AddBoolVarCache(&sIsWebComponentsEnabled,
|
||||||
|
"dom.webcomponents.enabled", false);
|
||||||
|
|
||||||
Preferences::AddBoolVarCache(&sEncodeDecodeURLHash,
|
Preferences::AddBoolVarCache(&sEncodeDecodeURLHash,
|
||||||
"dom.url.encode_decode_hash", false);
|
"dom.url.encode_decode_hash", false);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2743,6 +2743,9 @@ public:
|
||||||
static bool
|
static bool
|
||||||
IsLocalRefURL(const nsString& aString);
|
IsLocalRefURL(const nsString& aString);
|
||||||
|
|
||||||
|
static bool
|
||||||
|
IsWebComponentsEnabled() { return sIsWebComponentsEnabled; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static bool InitializeEventTable();
|
static bool InitializeEventTable();
|
||||||
|
|
||||||
|
|
@ -2850,6 +2853,7 @@ private:
|
||||||
static bool sIsUserTimingLoggingEnabled;
|
static bool sIsUserTimingLoggingEnabled;
|
||||||
static bool sIsFrameTimingPrefEnabled;
|
static bool sIsFrameTimingPrefEnabled;
|
||||||
static bool sIsExperimentalAutocompleteEnabled;
|
static bool sIsExperimentalAutocompleteEnabled;
|
||||||
|
static bool sIsWebComponentsEnabled;
|
||||||
static bool sEncodeDecodeURLHash;
|
static bool sEncodeDecodeURLHash;
|
||||||
static bool sGettersDecodeURLHash;
|
static bool sGettersDecodeURLHash;
|
||||||
static bool sPrivacyResistFingerprinting;
|
static bool sPrivacyResistFingerprinting;
|
||||||
|
|
|
||||||
|
|
@ -5710,7 +5710,7 @@ nsDocument::IsWebComponentsEnabled(JSContext* aCx, JSObject* aObject)
|
||||||
{
|
{
|
||||||
JS::Rooted<JSObject*> obj(aCx, aObject);
|
JS::Rooted<JSObject*> obj(aCx, aObject);
|
||||||
|
|
||||||
if (Preferences::GetBool("dom.webcomponents.enabled")) {
|
if (nsContentUtils::IsWebComponentsEnabled()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -5726,7 +5726,7 @@ nsDocument::IsWebComponentsEnabled(JSContext* aCx, JSObject* aObject)
|
||||||
bool
|
bool
|
||||||
nsDocument::IsWebComponentsEnabled(dom::NodeInfo* aNodeInfo)
|
nsDocument::IsWebComponentsEnabled(dom::NodeInfo* aNodeInfo)
|
||||||
{
|
{
|
||||||
if (Preferences::GetBool("dom.webcomponents.enabled")) {
|
if (nsContentUtils::IsWebComponentsEnabled()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue