The issue here is that when we incrementally add the anon content container, we end up computing its insertion frame as the SVG frame. That is kind of messed up (because they'd usually be under nsCanvasFrame), but is sort of ok because they go in the top layer anyhow. We really want to avoid reframing when showing DevTools in order to avoid papering over bugs. Allow the SVG code to deal with it the way it also deals with ::backdrop (which has the same issue), and fix the frame construction code to don't even probe for <svg>::before / ::after. It took forever to come up with a reproducer because we turn on the AccessibleCaret pref on tests, which paper over this... :/ Differential Revision: https://phabricator.services.mozilla.com/D310633