From 19c18672af61609ec18338f283854b44878a8a55 Mon Sep 17 00:00:00 2001 From: girst Date: Thu, 18 Nov 2021 15:20:53 +0100 Subject: [PATCH] make Fission check more strict only warn when fission.webContentIsolationStrategy > 0 (i.e. when remote subframes are enabled) --- documentation/known-bugs.md | 34 +++++++++++++++------------------- extension/lib/main.coffee | 13 +++++++------ 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/documentation/known-bugs.md b/documentation/known-bugs.md index 041b723..30ed834 100644 --- a/documentation/known-bugs.md +++ b/documentation/known-bugs.md @@ -21,28 +21,24 @@ The [new RDM] does not have this bug; it can be enabled by switching ## Fission -**Affected**: some Nightly users, future versions -**Workaround**: `fission.autostart;false` +**Affected**: Firefox >= 96 +**Workaround**: `fission.webContentIsolationStrategy;0` With [Fission] enabled, VimFx can't inspect out-of-process iframes. -Fission, sometimes called *Site Isolation*, is not (yet) turned on by default, -but can be disabled by switching `fission.autostart` to `false` in -`about:config`. With Fission, VimFx cannot place hint markers or determine -whether an editable element is active in iframes from a different domain to the -top document. We will instead enter insert mode whenever such an iframe is -active (so input elements are usable; hit Escape or click outside the iframe to -let VimFx re-gain control). - - - - +With Fission, sometimes called *Site Isolation*, VimFx cannot place hint markers +or detect input elements inside iframes from a different domain to the top +document. We will instead enter insert mode whenever such an iframe is active. +Hit Escape or click outside the iframe to let VimFx re-gain control. Setting +`fission.webContentIsolationStrategy` to `0` in `about:config` only disables the +iframe part of Fission, but is available only since Firefox 94. Some Nightly +installations were opted into Fission earlier; set `fission.autostart` +to `false` if the main workaround is unavailable. + + [Fission]: https://wiki.mozilla.org/Project_Fission diff --git a/extension/lib/main.coffee b/extension/lib/main.coffee index 7417dc7..a49d548 100644 --- a/extension/lib/main.coffee +++ b/extension/lib/main.coffee @@ -117,14 +117,15 @@ module.exports = (data, reason) -> ) # check whether Fission is enabled, and warn the user if so. - FISSION_ENABLED_PREF = 'fission.autostart' + FISSION_ENABLED_PREF = 'fission.autostart' # fx68+ + FISSION_ISOLATION_PREF = 'fission.webContentIsolationStrategy' # fx94+ IGNORE_FISSION_PREF = 'ignore_fission' isFissionWindow = window.docShell.nsILoadContext.useRemoteSubframes - isFissionEnabled = Services.appinfo.fissionAutostart and # current session - prefs.root.get(FISSION_ENABLED_PREF) # future sessions - isFissionIgnored = prefs.has(IGNORE_FISSION_PREF) and - prefs.get(IGNORE_FISSION_PREF) == true - if isFissionWindow and isFissionEnabled and not isFissionIgnored + isFissionEnabled = prefs.root.get(FISSION_ENABLED_PREF) + isIsolateNothing = (try prefs.root.get(FISSION_ISOLATION_PREF)) == 0 + isFissionIgnored = (try prefs.get(IGNORE_FISSION_PREF)) == true + if isFissionWindow and isFissionEnabled and not isIsolateNothing and + not isFissionIgnored console.error('VimFx: Fission is enabled in your browser.' 'VimFx will not be able to interact with third party iframes.') console.info("Please consult VimFx' documentation on Known Bugs.") -- 2.39.3