summaryrefslogtreecommitdiffstats
path: root/layout/style/Loader.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-09-23 23:45:46 +0000
committerMoonchild <moonchild@palemoon.org>2020-09-23 23:45:46 +0000
commit9f5c27ba479c54d4ebb1bd59b61fbf793f6df93f (patch)
tree831e0ae1649d6135429def03688bc93ff7c86b03 /layout/style/Loader.cpp
parent42f895f27f239e973c9c06241f7a58da7381353c (diff)
parentf624bd1375655dea196cdcb70a9860bc5817df49 (diff)
downloadUXP-f583969f6ffe8f2dbd525dd3dc55d25347d7c492.tar
UXP-f583969f6ffe8f2dbd525dd3dc55d25347d7c492.tar.gz
UXP-f583969f6ffe8f2dbd525dd3dc55d25347d7c492.tar.lz
UXP-f583969f6ffe8f2dbd525dd3dc55d25347d7c492.tar.xz
UXP-f583969f6ffe8f2dbd525dd3dc55d25347d7c492.zip
Merge branch 'redwood' into releaseRELBASE_20200929RC_20200924
Diffstat (limited to 'layout/style/Loader.cpp')
-rw-r--r--layout/style/Loader.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/layout/style/Loader.cpp b/layout/style/Loader.cpp
index df523174d..a06dd3737 100644
--- a/layout/style/Loader.cpp
+++ b/layout/style/Loader.cpp
@@ -2272,7 +2272,6 @@ Loader::LoadChildSheet(StyleSheet* aParentSheet,
state = eSheetComplete;
} else {
bool isAlternate;
- bool isExplicitlyEnabled;
const nsSubstring& empty = EmptyString();
// For now, use CORS_NONE for child sheets
rv = CreateSheet(aURL, nullptr, principal,
@@ -2282,8 +2281,9 @@ Loader::LoadChildSheet(StyleSheet* aParentSheet,
parentData ? parentData->mSyncLoad : false,
false, empty, state, &isAlternate, &sheet);
NS_ENSURE_SUCCESS(rv, rv);
-
- PrepareSheet(sheet, empty, empty, aMedia, nullptr, isAlternate, isExplicitlyEnabled);
+ // For now, child sheets are not explicitly enabled (seventh argument is
+ // always false here).
+ PrepareSheet(sheet, empty, empty, aMedia, nullptr, isAlternate, false);
}
rv = InsertChildSheet(sheet, aParentSheet, aParentRule);
@@ -2396,7 +2396,6 @@ Loader::InternalLoadNonDocumentSheet(nsIURI* aURL,
StyleSheetState state;
bool isAlternate;
- bool isExplicitlyEnabled;
RefPtr<StyleSheet> sheet;
bool syncLoad = (aObserver == nullptr);
const nsSubstring& empty = EmptyString();
@@ -2406,7 +2405,10 @@ Loader::InternalLoadNonDocumentSheet(nsIURI* aURL,
false, empty, state, &isAlternate, &sheet);
NS_ENSURE_SUCCESS(rv, rv);
- PrepareSheet(sheet, empty, empty, nullptr, nullptr, isAlternate, isExplicitlyEnabled);
+ // Sheets can only be explicitly enabled after creation and preparation, so
+ // we always pass false for the initial value of the explicitly enabled flag
+ // when calling PrepareSheet.
+ PrepareSheet(sheet, empty, empty, nullptr, nullptr, isAlternate, false);
if (state == eSheetComplete) {
LOG((" Sheet already complete"));