summaryrefslogtreecommitdiff
path: root/layout/style/nsLayoutStylesheetCache.cpp
diff options
context:
space:
mode:
authorathenian200 <athenian200@outlook.com>2021-03-31 17:57:48 -0500
committerathenian200 <athenian200@outlook.com>2021-03-31 17:57:48 -0500
commit82cb11de19e8aa2b4dbee923e16cab6d35dd908d (patch)
tree632edd900d2f94f24c8d539da10fa778838de303 /layout/style/nsLayoutStylesheetCache.cpp
parentb969ea3b9ced3eac51cd94c3390742ab57a4e520 (diff)
downloaduxp-82cb11de19e8aa2b4dbee923e16cab6d35dd908d.tar.gz
Issue #1757 - Reinstate "dom.details_element.enabled" preference
The removal of this preference was botched, all other surrounding plumbing changes appear to be working okay. The ability to use prefs to control this stylesheet might be useful in the future, so perhaps this is one of those "if it ain't broke, don't fix it" bugs where leaving well enough alone in the first place would have been the best choice.
Diffstat (limited to 'layout/style/nsLayoutStylesheetCache.cpp')
-rw-r--r--layout/style/nsLayoutStylesheetCache.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/layout/style/nsLayoutStylesheetCache.cpp b/layout/style/nsLayoutStylesheetCache.cpp
index bf87b006ca..1905d8c5cd 100644
--- a/layout/style/nsLayoutStylesheetCache.cpp
+++ b/layout/style/nsLayoutStylesheetCache.cpp
@@ -121,6 +121,11 @@ nsLayoutStylesheetCache::UASheet()
StyleSheet*
nsLayoutStylesheetCache::HTMLSheet()
{
+ if (!mHTMLSheet) {
+ LoadSheetURL("resource://gre-resources/html.css",
+ &mHTMLSheet, eAgentSheetFeatures, eCrash);
+ }
+
return mHTMLSheet;
}
@@ -316,8 +321,6 @@ nsLayoutStylesheetCache::nsLayoutStylesheetCache(StyleBackendType aType)
// per-profile, since they're profile-invariant.
LoadSheetURL("resource://gre-resources/counterstyles.css",
&mCounterStylesSheet, eAgentSheetFeatures, eCrash);
- LoadSheetURL("resource://gre-resources/html.css",
- &mHTMLSheet, eAgentSheetFeatures, eCrash);
LoadSheetURL("chrome://global/content/minimal-xul.css",
&mMinimalXULSheet, eAgentSheetFeatures, eCrash);
LoadSheetURL("resource://gre-resources/quirk.css",
@@ -378,6 +381,8 @@ nsLayoutStylesheetCache::For(StyleBackendType aType)
// "layout.css.example-pref.enabled");
Preferences::RegisterCallback(&DependentPrefChanged,
"layout.css.grid.enabled");
+ Preferences::RegisterCallback(&DependentPrefChanged,
+ "dom.details_element.enabled");
}
return cache;
@@ -549,6 +554,7 @@ nsLayoutStylesheetCache::DependentPrefChanged(const char* aPref, void* aData)
gStyleCache_Servo ? &gStyleCache_Servo->sheet_ : nullptr);
INVALIDATE(mUASheet); // for layout.css.grid.enabled
+ INVALIDATE(mHTMLSheet); // for dom.details_element.enabled
#undef INVALIDATE
}