diff --git a/extensions/transformiix/source/xslt/txMozillaXMLOutput.cpp b/extensions/transformiix/source/xslt/txMozillaXMLOutput.cpp index 80d33b96e38..db961014b15 100644 --- a/extensions/transformiix/source/xslt/txMozillaXMLOutput.cpp +++ b/extensions/transformiix/source/xslt/txMozillaXMLOutput.cpp @@ -758,6 +758,13 @@ txMozillaXMLOutput::createResultDocument(const nsAString& aName, PRInt32 aNsID, mObserver->OnDocumentCreated(mDocument); } + // Do this after calling OnDocumentCreated to ensure that the + // PresShell/PresContext has been hooked up and get notified. + nsCOMPtr htmlDoc = do_QueryInterface(doc); + if (htmlDoc) { + htmlDoc->SetCompatibilityMode(eCompatibility_FullStandards); + } + // Add a doc-type if requested if (!mOutputFormat.mSystemId.IsEmpty()) { nsCOMPtr implementation;