Closed GoogleCodeExporter closed 9 years ago
Actually, we do have it in nsIDOMDocument.idl, and this does work:
javascript:alert(window.document.createDocumentFragment()); // object
DocumentFragment
So does
javascript:alert((undefined || window.document).createDocumentFragment())
This is important because the offending line in
https://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.js is
var fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(),
Either we're passing bad objects, or we can't figure out what document to ask to
create the fragment. This hits Twitter, the Register and quite a few other
sites, so
we should still try to fix it.
Original comment by classi...@floodgap.com
on 17 May 2010 at 11:56
Venkman demonstrates on Twitter that this[0] is an HTMLDivElement, which is
correct,
but it has no ownerDocument (and it itself does not implement
createDocumentFragment,
because it is not a document).
Original comment by classi...@floodgap.com
on 18 May 2010 at 12:03
M211634 looks right up our alley. Let's implement that.
Original comment by classi...@floodgap.com
on 18 May 2010 at 12:09
M211440 isn't really a dependency but it looks like something we should support
as well.
Original comment by classi...@floodgap.com
on 18 May 2010 at 12:13
... however, it only partially applies to a few elements in Clecko. It's not
worth
debugging to find out why the other ones won't apply since we'll get it in 9.3.
Original comment by classi...@floodgap.com
on 18 May 2010 at 12:28
211634 made no difference. Upping to Critical, more sites seem affected than I
thought.
Original comment by classi...@floodgap.com
on 18 May 2010 at 4:11
This was rather complicated to implement. It appears that elements made
dynamically
were basically owned by no document at all, because they were being added to a
new
node info manager that had no awareness of the document they descended from.
Analysis
of Mozilla code shows this was a very early change, possibly around 1.4 or 1.5.
I
implemented a new function based on 1.7's
nsHTMLFragmentContentSink::SetTargetDocument, which correctly makes (or uses)
the
proper node info manager with the right document, and then used patches from
1.7 to
hook it up to nsRange when the node is created.
Now jQuery appears to work 100% and so does Twitter (albeit very slowly).
Original comment by classi...@floodgap.com
on 22 May 2010 at 4:43
Original issue reported on code.google.com by
classi...@floodgap.com
on 17 May 2010 at 11:23