Open Bug 737845 Opened 8 years ago Updated 8 years ago

nsExternalResourceMap should not QI a stream listener into nsIParser

Categories

(Core :: SVG, defect)

defect
Not set

Tracking

()

People

(Reporter: hsivonen, Unassigned)

References

(Blocks 1 open bug)

Details

nsExternalResourceMap QIs a stream listener into nsIParser in order to check if the stream is being handled by an XML parser.

The plan for bug 363688 involves decoupling the stream listener object from nsIParser (as has already been done for the HTML parser).

Need to figure out a way for nsExternalResourceMap to do what it wants to do without assuming that the object that is the stream listener is also an nsIParser.
The type of the parser depends on the type of document, so the nsExternalResourceMap could obtain the nsIDocument from the content viewer and check that its IsHTML() method returns false. Assuming of course that we really do want to keep excluding HTML docs that have id-addressable SVG islands in them.

bz, do we want to keep excluding HTML docs?
That depends.  Back when I wrote this code, it wasn't clear that we had a safe way or running the HTML parser, content sink, etc outside a docshell.

At this point, assuming that's a safe thing to do, we could probably just allow them.  We certainly do disable script in the resource doc, so that part should be fine even in HTML...  roc, thoughts?
You need to log in before you can comment on or make changes to this bug.