From 931e8d29faf577e3cec64b896ee1a06cd93b27b9 Mon Sep 17 00:00:00 2001 From: athenian200 Date: Fri, 14 Aug 2020 11:06:13 -0500 Subject: Issue #1629 - Part 3: Implement behind preference. This is not very "clean," and is mostly done in the same sloppy way as Emilio did it because that's basically the only way you can do it. Note well that this does NOT actually turn off everything I've done in a clean fashion like ifdefs would. For instance, the Explicitly Enabled flag is still present, but is now always false because the only condition that can set it true is behind the pref and therefore inert when this pref is off. Also, because the arguments of SetDisabled have changed, my modifications to SetMozDisabled must be present regardless of whether the pref is on or off. What I have done is turn off the actual reflection of the disabled attribute in Disabled and SetDisabled, as well as in AfterSetAttr. However, turning the pref off seems to restore more or less our old behavior, though there may be subtle differences unlike with an ifdef since this is, unfortunately, not an exact science and I can only turn off changes that happen within individual functions and not changes in how functions interact with each other. --- modules/libpref/init/all.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'modules') diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 766c00d397..8cd9344393 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -1185,6 +1185,14 @@ pref("dom.storage.default_quota", 5120); pref("dom.send_after_paint_to_content", false); +// Whether the disabled attribute in HTMLLinkElement disables the sheet loading +// altogether, or forwards to the inner stylesheet method without attribute +// reflection. +// +// Historical behavior is the second, the first is being discussed at: +// https://github.com/whatwg/html/issues/3840 +pref("dom.link.disabled_attribute.enabled", true); + // Timeout clamp in ms for timeouts we clamp pref("dom.min_timeout_value", 4); // And for background windows -- cgit v1.2.3