summaryrefslogtreecommitdiffstats
path: root/dom/xml
diff options
context:
space:
mode:
authorathenian200 <athenian200@outlook.com>2020-08-11 05:27:40 -0500
committerathenian200 <athenian200@outlook.com>2020-08-13 01:09:58 -0500
commit68623263573f5a087ad878f1609de272cc617399 (patch)
treee736e47a0d896d784749c2d940d838579dad623e /dom/xml
parenta9f337ea7ca1e8743c3f38645c525751a479a561 (diff)
downloadUXP-68623263573f5a087ad878f1609de272cc617399.tar
UXP-68623263573f5a087ad878f1609de272cc617399.tar.gz
UXP-68623263573f5a087ad878f1609de272cc617399.tar.lz
UXP-68623263573f5a087ad878f1609de272cc617399.tar.xz
UXP-68623263573f5a087ad878f1609de272cc617399.zip
Issue #1629 - Part 2: Implement the Explicitly Enabled flag.
This part of the bug was significantly complicated by the following major refactors: https://bugzilla.mozilla.org/show_bug.cgi?id=1456435 https://bugzilla.mozilla.org/show_bug.cgi?id=1459498 As best as I can tell, we just need to implement the explicitly enabled flag on every instance of GetStyleSheetInfo, make sure aIsExplicitlyEnabled is false in every situation except the one where the disabled content attribute is removed from a link element, and enable alternate stylesheets if this flag is set on them. So we take the explicitly enabled flag as an input to PrepareSheet, and also add it to LoadStyleLink and LoadInlineStyle. I also decided not to defer loading of alternate stylesheets that have been explicitly enabled.
Diffstat (limited to 'dom/xml')
-rw-r--r--dom/xml/XMLStylesheetProcessingInstruction.cpp4
-rw-r--r--dom/xml/XMLStylesheetProcessingInstruction.h3
2 files changed, 5 insertions, 2 deletions
diff --git a/dom/xml/XMLStylesheetProcessingInstruction.cpp b/dom/xml/XMLStylesheetProcessingInstruction.cpp
index 3d94e179b..43e45131a 100644
--- a/dom/xml/XMLStylesheetProcessingInstruction.cpp
+++ b/dom/xml/XMLStylesheetProcessingInstruction.cpp
@@ -131,13 +131,15 @@ XMLStylesheetProcessingInstruction::GetStyleSheetInfo(nsAString& aTitle,
nsAString& aType,
nsAString& aMedia,
bool* aIsScoped,
- bool* aIsAlternate)
+ bool* aIsAlternate,
+ bool* aIsExplicitlyEnabled)
{
aTitle.Truncate();
aType.Truncate();
aMedia.Truncate();
*aIsScoped = false;
*aIsAlternate = false;
+ *aIsExplicitlyEnabled = false;
// xml-stylesheet PI is special only in prolog
if (!nsContentUtils::InProlog(this)) {
diff --git a/dom/xml/XMLStylesheetProcessingInstruction.h b/dom/xml/XMLStylesheetProcessingInstruction.h
index 818b3392f..28061834a 100644
--- a/dom/xml/XMLStylesheetProcessingInstruction.h
+++ b/dom/xml/XMLStylesheetProcessingInstruction.h
@@ -82,7 +82,8 @@ protected:
nsAString& aType,
nsAString& aMedia,
bool* aIsScoped,
- bool* aIsAlternate) override;
+ bool* aIsAlternate,
+ bool* aIsExplicitlyEnabled) override;
virtual nsGenericDOMDataNode* CloneDataNode(mozilla::dom::NodeInfo *aNodeInfo,
bool aCloneText) const override;
};