summaryrefslogtreecommitdiffstats
path: root/dom/html/HTMLLinkElement.h
diff options
context:
space:
mode:
Diffstat (limited to 'dom/html/HTMLLinkElement.h')
-rw-r--r--dom/html/HTMLLinkElement.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/dom/html/HTMLLinkElement.h b/dom/html/HTMLLinkElement.h
index 421b149e9..f9c832c8d 100644
--- a/dom/html/HTMLLinkElement.h
+++ b/dom/html/HTMLLinkElement.h
@@ -84,8 +84,8 @@ public:
virtual bool HasDeferredDNSPrefetchRequest() override;
// WebIDL
- bool Disabled();
- void SetDisabled(bool aDisabled);
+ bool Disabled() const;
+ void SetDisabled(bool aDisabled, ErrorResult& aRv);
// XPCOM GetHref is fine.
void SetHref(const nsAString& aHref, ErrorResult& aRv)
{
@@ -179,10 +179,18 @@ protected:
nsAString& aType,
nsAString& aMedia,
bool* aIsScoped,
- bool* aIsAlternate) override;
-protected:
+ bool* aIsAlternate,
+ bool* aIsExplicitlyEnabled) override;
+
RefPtr<nsDOMTokenList> mRelList;
+ // The "explicitly enabled" flag. This flag is set whenever the 'disabled'
+ // attribute is explicitly unset, and makes alternate stylesheets not be
+ // disabled by default anymore.
+ //
+ // See https://github.com/whatwg/html/issues/3840#issuecomment-481034206.
+ bool mExplicitlyEnabled = false;
+
private:
RefPtr<ImportLoader> mImportLoader;
};