Maybe the answer is "this should never happen", but right now it can happen pretty easily: adopting between HTML and SVG documents, applying an XBL document with inline styles to an HTML document (hello, <marquee>), etc. If the long-term plan is to have this not happen, great; we can probably just wait for now. If we plan to be shipping something while not all documents are on the same style backend, then we need to do something like serialize/reparse during adoption.
Once we make stylo support xul and svg, we shouldn't have a need to dynamically determine the style backend from the document type. We will ship stylo as prefable, but I think we can probably get away with the pref being read at startup only. That would let us eliminate the per-document-ness of the style backend, and make this a non-issue. Let's leave this on file to make sure we're actually doing that by the time we ship to nightly users.
Chris, how do you want to track bugs that block enabling on nightly? A metabug or a whiteboard tag?
(In reply to Bobby Holley (:bholley) (busy with Stylo) from comment #2) > Chris, how do you want to track bugs that block enabling on nightly? A > metabug or a whiteboard tag? I have been meaning to create some meta bugs.
After talking with some people today, I think it's probably best to keep our options open for shipping stylo content-only. Given that, it seems worth fixing the adopt bug. IIRC, Manish and Boris were talking about doing this today. Manish, is this bug where that work is happening, or somewhere else?
That work is just part 6 of bug 1329093. That involves a very specific case of moving an associated entry in a hashmap across documents, I don't think that generalizes.
I suspect we need to do this anyway, I was having trouble with adopting relative URIs across documents.