From c318e40ecec9ea5fc1e1196a0f8d2ddcec15d20d Mon Sep 17 00:00:00 2001 From: "danm%netscape.com" Date: Fri, 16 Jun 2000 14:54:57 +0000 Subject: [PATCH] supply nsIPrompt to streamloader created when processing a script tag. bugs 25684,28594. r=nisheeth@netscape.com git-svn-id: svn://10.0.0.236/trunk@72391 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/html/document/src/nsHTMLContentSink.cpp | 8 +++++++- mozilla/layout/html/document/src/nsHTMLContentSink.cpp | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/mozilla/content/html/document/src/nsHTMLContentSink.cpp b/mozilla/content/html/document/src/nsHTMLContentSink.cpp index 5afdde578c3..1df5517d919 100644 --- a/mozilla/content/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/content/html/document/src/nsHTMLContentSink.cpp @@ -23,6 +23,7 @@ #include "nsCOMPtr.h" #include "nsXPIDLString.h" #include "nsIHTMLContentSink.h" +#include "nsIInterfaceRequestor.h" #include "nsIParser.h" #include "nsICSSStyleSheet.h" #include "nsICSSLoader.h" @@ -4752,8 +4753,13 @@ HTMLContentSink::ProcessSCRIPTTag(const nsIParserNode& aNode) nsIStreamLoader* loader; mDocument->GetDocumentLoadGroup(getter_AddRefs(loadGroup)); + + // supply a prompter if you have one. this allows modal dialogs put up + // from within this new stream loader to have proper parenting. but it's + // not fatal if there isn't a prompter. + nsCOMPtr promptcall(do_QueryInterface(mWebShell)); rv = NS_NewStreamLoader(&loader, mScriptURI, this, nsnull, loadGroup, - nsnull, nsIChannel::FORCE_RELOAD); + promptcall, nsIChannel::FORCE_RELOAD); if (NS_OK == rv) { rv = NS_ERROR_HTMLPARSER_BLOCK; } diff --git a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp index 5afdde578c3..1df5517d919 100644 --- a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp @@ -23,6 +23,7 @@ #include "nsCOMPtr.h" #include "nsXPIDLString.h" #include "nsIHTMLContentSink.h" +#include "nsIInterfaceRequestor.h" #include "nsIParser.h" #include "nsICSSStyleSheet.h" #include "nsICSSLoader.h" @@ -4752,8 +4753,13 @@ HTMLContentSink::ProcessSCRIPTTag(const nsIParserNode& aNode) nsIStreamLoader* loader; mDocument->GetDocumentLoadGroup(getter_AddRefs(loadGroup)); + + // supply a prompter if you have one. this allows modal dialogs put up + // from within this new stream loader to have proper parenting. but it's + // not fatal if there isn't a prompter. + nsCOMPtr promptcall(do_QueryInterface(mWebShell)); rv = NS_NewStreamLoader(&loader, mScriptURI, this, nsnull, loadGroup, - nsnull, nsIChannel::FORCE_RELOAD); + promptcall, nsIChannel::FORCE_RELOAD); if (NS_OK == rv) { rv = NS_ERROR_HTMLPARSER_BLOCK; }