summaryrefslogtreecommitdiffstats
path: root/dom/html/HTMLLinkElement.h
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-08-30 09:29:45 +0000
committerMoonchild <moonchild@palemoon.org>2020-08-30 09:29:45 +0000
commita4780ebaeb123ce9c793b85bb38a1701fad8f7ac (patch)
tree6354d39f9cda4637b084c265befd88e895e74aa8 /dom/html/HTMLLinkElement.h
parentc384fa6e25b07b37e9cc406da0c0aef583c61513 (diff)
downloadUXP-a4780ebaeb123ce9c793b85bb38a1701fad8f7ac.tar
UXP-a4780ebaeb123ce9c793b85bb38a1701fad8f7ac.tar.gz
UXP-a4780ebaeb123ce9c793b85bb38a1701fad8f7ac.tar.lz
UXP-a4780ebaeb123ce9c793b85bb38a1701fad8f7ac.tar.xz
UXP-a4780ebaeb123ce9c793b85bb38a1701fad8f7ac.zip
Issue #1629 - Uplift implementation of <link disabled> behavior for stylesheets.
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;
};