summaryrefslogtreecommitdiffstats
path: root/layout
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-09-13 11:17:55 +0000
committerGitHub <noreply@github.com>2020-09-13 11:17:55 +0000
commit85f915543cef49764f2759e63665bc70d416354f (patch)
treea969cb4a2a69b4b60f17ed6cf7c6b07a8b7fc473 /layout
parent00e0733915741d7e945893d530a031cf7592082f (diff)
parent1f65f171aa7bc29523654a1dbea770907e6195ac (diff)
downloadUXP-85f915543cef49764f2759e63665bc70d416354f.tar
UXP-85f915543cef49764f2759e63665bc70d416354f.tar.gz
UXP-85f915543cef49764f2759e63665bc70d416354f.tar.lz
UXP-85f915543cef49764f2759e63665bc70d416354f.tar.xz
UXP-85f915543cef49764f2759e63665bc70d416354f.zip
Merge pull request #1651 from athenian200/link_element_disabled
Clean up local variables from <link> disabled issue.
Diffstat (limited to 'layout')
-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 c21199238..155ecbeee 100644
--- a/layout/style/Loader.cpp
+++ b/layout/style/Loader.cpp
@@ -2273,7 +2273,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,
@@ -2283,8 +2282,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);
@@ -2397,7 +2397,6 @@ Loader::InternalLoadNonDocumentSheet(nsIURI* aURL,
StyleSheetState state;
bool isAlternate;
- bool isExplicitlyEnabled;
RefPtr<StyleSheet> sheet;
bool syncLoad = (aObserver == nullptr);
const nsSubstring& empty = EmptyString();
@@ -2407,7 +2406,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"));