]> git.gir.st - VimFx.git/commit
Don't crash on pages with out-of-process iframes when fission is enabled fission-dont-crash
authorgirst <girst@users.noreply.github.com>
Tue, 5 May 2020 12:18:53 +0000 (14:18 +0200)
committergirst <girst@users.noreply.github.com>
Tue, 12 May 2020 21:04:56 +0000 (23:04 +0200)
commit9c2f10fec73723e63361fd06bea13d3bff5a35c4
treeaafe067b0afd1438d930804a66815cdf5b23c5b2
parentde9f358ced412078322ad12885102807dd5e7a2f
Don't crash on pages with out-of-process iframes when fission is enabled

This should be considered at most a workaround; oop iframes are
completely opaque to VimFx. This not only means that hints are not
generated for elements inside them, but also that VimFx can't detect
when an input element is focused. Due to the latter, we switch to insert
mode whenever we detect that focus is inside an OOP iframe, so text
inputs can still be used.

During implementation, a bug (https://bugzilla.mozilla.org/1635530) was
found (and filed) where activeElement was wrong. This is fixed as of
Firefox 78. Given that fission is still disabled by default, earlier
verisons aren't affected.

Note: lib/utils.coffee::getTopOffset() also accesses frameElement, but
that's safe, since this function is only called by
simulateMouseEvents(), which only works on elements that were previously
reached via hints mode (where we already check for oop iframes).

lib/utils.coffee::containsDeep() is also safe, albeit less so. It is fed
with potentially unsafe element references from
lib/scrollable-elements.coffee::addChecked(), which is called by
lib/events.coffee's and lib/events-frame.coffee's
addEventHandler('overflow'). Testing in fx78a shows that this event is
not relayed across process borders; for now at least (testing in a
non-fission window shows that the event is relayed).
test case (http://localhost/):
<iframe src="//0.0.0.0/frame.html">
  <div id=child style="white-space:nowrap; width:800px; overflow-scroll">looooong text</div>
</iframe>
<div id=parent style="white-space:nowrap; width:800px; overflow-scroll">looooong text</div>
extension/lib/events-frame.coffee
extension/lib/markable-elements.coffee
extension/lib/utils.coffee
extension/lib/viewport.coffee
Imprint / Impressum