diff --git a/content/base/src/nsDocumentViewer.cpp b/content/base/src/nsDocumentViewer.cpp index a4f208ff3578..52598a9f7e05 100644 --- a/content/base/src/nsDocumentViewer.cpp +++ b/content/base/src/nsDocumentViewer.cpp @@ -86,7 +86,6 @@ #include "nsIPrefLocalizedString.h" #include "nsIPageSequenceFrame.h" #include "nsIURL.h" -#include "nsIWebShell.h" #include "nsIContentViewerEdit.h" #include "nsIContentViewerFile.h" #include "nsIMarkupDocumentViewer.h" diff --git a/content/base/src/nsGenericElement.cpp b/content/base/src/nsGenericElement.cpp index 47d48e9737ab..885fd5dfdcc7 100644 --- a/content/base/src/nsGenericElement.cpp +++ b/content/base/src/nsGenericElement.cpp @@ -2041,7 +2041,7 @@ nsGenericElement::SetContentID(PRUint32 aID) } NS_IMETHODIMP -nsGenericElement::MaybeTriggerAutoLink(nsIWebShell *aShell) +nsGenericElement::MaybeTriggerAutoLink(nsIDocShell *aShell) { return NS_OK; } diff --git a/content/base/src/nsGenericElement.h b/content/base/src/nsGenericElement.h index e9120e84f4f7..cf6de2c36221 100644 --- a/content/base/src/nsGenericElement.h +++ b/content/base/src/nsGenericElement.h @@ -421,7 +421,7 @@ public: PRInt32 aModType, nsChangeHint& aHint) const; // nsIXMLContent interface methods - NS_IMETHOD MaybeTriggerAutoLink(nsIWebShell *aShell); + NS_IMETHOD MaybeTriggerAutoLink(nsIDocShell *aShell); NS_IMETHOD GetXMLBaseURI(nsIURI **aURI); // nsIHTMLContent interface methods diff --git a/content/base/src/nsPrintEngine.cpp b/content/base/src/nsPrintEngine.cpp index f09c8040c0a4..a54ab26b0945 100644 --- a/content/base/src/nsPrintEngine.cpp +++ b/content/base/src/nsPrintEngine.cpp @@ -147,7 +147,6 @@ static const char* kPrintingPromptService = "@mozilla.org/embedcomp/printingprom #include "nsIPrefBranch.h" #include "nsIPageSequenceFrame.h" #include "nsIURL.h" -#include "nsIWebShell.h" #include "nsIContentViewerEdit.h" #include "nsIContentViewerFile.h" #include "nsIMarkupDocumentViewer.h" diff --git a/content/base/src/nsSyncLoadService.cpp b/content/base/src/nsSyncLoadService.cpp index f5716c6c785a..f3fe06a9016a 100644 --- a/content/base/src/nsSyncLoadService.cpp +++ b/content/base/src/nsSyncLoadService.cpp @@ -76,7 +76,7 @@ nsresult NS_NewXBLContentSink(nsIXMLContentSink** aResult, nsIDocument* aDoc, nsIURI* aURL, - nsIWebShell* aWebShell); + nsISupports* aContainer); class nsSyncLoadService : public nsISyncLoadDOMService { diff --git a/content/events/src/Makefile.in b/content/events/src/Makefile.in index f1274f844d68..bdfada15fa63 100644 --- a/content/events/src/Makefile.in +++ b/content/events/src/Makefile.in @@ -39,7 +39,6 @@ REQUIRES = xpcom \ caps \ xpconnect \ docshell \ - webshell \ pref \ htmlparser \ view \ diff --git a/content/events/src/nsEventStateManager.cpp b/content/events/src/nsEventStateManager.cpp index aeb8626a50e7..035fa753f582 100644 --- a/content/events/src/nsEventStateManager.cpp +++ b/content/events/src/nsEventStateManager.cpp @@ -63,7 +63,6 @@ #include "nsImageMapUtils.h" #include "nsIHTMLDocument.h" #include "nsINameSpaceManager.h" -#include "nsIWebShell.h" #include "nsIBaseWindow.h" #include "nsIScrollableView.h" #include "nsISelection.h" diff --git a/content/html/content/src/nsHTMLBodyElement.cpp b/content/html/content/src/nsHTMLBodyElement.cpp index 1901f7c29b0c..83cc45166ec0 100644 --- a/content/html/content/src/nsHTMLBodyElement.cpp +++ b/content/html/content/src/nsHTMLBodyElement.cpp @@ -51,7 +51,6 @@ #include "nsIHTMLStyleSheet.h" #include "nsIHTMLCSSStyleSheet.h" #include "nsICSSStyleRule.h" -#include "nsIWebShell.h" #include "nsIContentViewer.h" #include "nsIMarkupDocumentViewer.h" #include "nsHTMLAttributes.h" diff --git a/content/html/content/src/nsHTMLImageElement.cpp b/content/html/content/src/nsHTMLImageElement.cpp index 10dcc57fc212..bb8834f02653 100644 --- a/content/html/content/src/nsHTMLImageElement.cpp +++ b/content/html/content/src/nsHTMLImageElement.cpp @@ -59,7 +59,6 @@ #include "nsIServiceManager.h" #include "nsNetUtil.h" #include "nsContentUtils.h" -#include "nsIWebShell.h" #include "nsIFrame.h" #include "nsIImageFrame.h" #include "nsLayoutAtoms.h" diff --git a/content/shared/src/Makefile.in b/content/shared/src/Makefile.in index 6cc8b8fcad15..c9296a329c74 100644 --- a/content/shared/src/Makefile.in +++ b/content/shared/src/Makefile.in @@ -35,7 +35,6 @@ REQUIRES = xpcom \ widget \ locale \ dom \ - webshell \ necko \ htmlparser \ unicharutil \ diff --git a/content/svg/content/src/Makefile.in b/content/svg/content/src/Makefile.in index 517cde76cf1e..219aa36dee37 100644 --- a/content/svg/content/src/Makefile.in +++ b/content/svg/content/src/Makefile.in @@ -38,8 +38,7 @@ REQUIRES = xpcom \ view \ pref \ necko \ - xpconnect \ - webshell + xpconnect CPPSRCS = \ nsSVGAnimatedLength.cpp \ diff --git a/content/svg/content/src/nsSVGElement.h b/content/svg/content/src/nsSVGElement.h index b50aab3fadd0..4b946ca30d3d 100644 --- a/content/svg/content/src/nsSVGElement.h +++ b/content/svg/content/src/nsSVGElement.h @@ -133,7 +133,7 @@ public: // NS_IMETHOD SetBindingParent(nsIContent* aParent); // nsIXMLContent -// NS_IMETHOD MaybeTriggerAutoLink(nsIWebShell *aShell); +// NS_IMETHOD MaybeTriggerAutoLink(nsIDocShell *aShell); // nsIStyledContent NS_IMETHOD GetID(nsIAtom*& aResult) const; diff --git a/content/svg/document/src/Makefile.in b/content/svg/document/src/Makefile.in index f52acd991141..73683b549526 100644 --- a/content/svg/document/src/Makefile.in +++ b/content/svg/document/src/Makefile.in @@ -34,7 +34,6 @@ REQUIRES = content \ string \ gfx \ dom \ - webshell \ htmlparser \ lwbrk \ necko \ diff --git a/content/xbl/src/nsXBLContentSink.cpp b/content/xbl/src/nsXBLContentSink.cpp index 6e5e62104616..38904b564619 100644 --- a/content/xbl/src/nsXBLContentSink.cpp +++ b/content/xbl/src/nsXBLContentSink.cpp @@ -62,7 +62,7 @@ nsresult NS_NewXBLContentSink(nsIXMLContentSink** aResult, nsIDocument* aDoc, nsIURI* aURL, - nsIWebShell* aWebShell) + nsISupports* aContainer) { NS_ENSURE_ARG_POINTER(aResult); @@ -71,7 +71,7 @@ NS_NewXBLContentSink(nsIXMLContentSink** aResult, NS_ENSURE_TRUE(it, NS_ERROR_OUT_OF_MEMORY); nsCOMPtr kungFuDeathGrip = it; - nsresult rv = it->Init(aDoc, aURL, aWebShell); + nsresult rv = it->Init(aDoc, aURL, aContainer); NS_ENSURE_SUCCESS(rv, rv); return CallQueryInterface(it, aResult); @@ -100,7 +100,7 @@ nsXBLContentSink::~nsXBLContentSink() nsresult nsXBLContentSink::Init(nsIDocument* aDoc, nsIURI* aURL, - nsIWebShell* aContainer) + nsISupports* aContainer) { nsresult rv; rv = nsXMLContentSink::Init(aDoc, aURL, aContainer, nsnull); diff --git a/content/xbl/src/nsXBLContentSink.h b/content/xbl/src/nsXBLContentSink.h index 002b5e24047e..75c10297c626 100644 --- a/content/xbl/src/nsXBLContentSink.h +++ b/content/xbl/src/nsXBLContentSink.h @@ -85,7 +85,7 @@ public: nsresult Init(nsIDocument* aDoc, nsIURI* aURL, - nsIWebShell* aContainer); + nsISupports* aContainer); // nsIContentSink overrides NS_IMETHOD HandleStartElement(const PRUnichar *aName, @@ -158,5 +158,5 @@ nsresult NS_NewXBLContentSink(nsIXMLContentSink** aResult, nsIDocument* aDoc, nsIURI* aURL, - nsIWebShell* aWebShell); + nsISupports* aContainer); #endif // nsXBLContentSink_h__ diff --git a/content/xml/content/public/nsIXMLContent.h b/content/xml/content/public/nsIXMLContent.h index 9105733ad013..b93c951ae38e 100644 --- a/content/xml/content/public/nsIXMLContent.h +++ b/content/xml/content/public/nsIXMLContent.h @@ -45,7 +45,7 @@ class nsINameSpace; class nsINodeInfo; -class nsIWebShell; +class nsIDocShell; class nsIURI; #define NS_IXMLCONTENT_IID \ @@ -64,7 +64,7 @@ public: * automatically when loaded. If the element was an autoloading link * and it was succesfully handled, we will throw special nsresult values. * - * @param aShell the current web shell (to possibly load the link on) + * @param aShell the current doc shell (to possibly load the link on) * @throws NS_OK if nothing happened * @throws NS_XML_AUTOLINK_EMBED if the caller is loading the link embedded * @throws NS_XML_AUTOLINK_NEW if the caller is loading the link in a new @@ -74,7 +74,7 @@ public: * @throws NS_XML_AUTOLINK_UNDEFINED if it is loading in any other way--in * which case, the caller should stop parsing as well. */ - NS_IMETHOD MaybeTriggerAutoLink(nsIWebShell *aShell) = 0; + NS_IMETHOD MaybeTriggerAutoLink(nsIDocShell *aShell) = 0; /** * Get the XML Base URI for this element (http://www.w3.org/TR/xmlbase/) diff --git a/content/xml/content/src/nsXMLElement.cpp b/content/xml/content/src/nsXMLElement.cpp index 7b4f05522f52..99b36b3a404e 100644 --- a/content/xml/content/src/nsXMLElement.cpp +++ b/content/xml/content/src/nsXMLElement.cpp @@ -43,7 +43,7 @@ #include "nsIDocument.h" #include "nsIAtom.h" #include "nsIEventListenerManager.h" -#include "nsIWebShell.h" +#include "nsIDocShell.h" #include "nsIEventStateManager.h" #include "nsIDOMEvent.h" #include "nsINameSpace.h" @@ -306,7 +306,7 @@ nsXMLElement::SetAttr(nsINodeInfo *aNodeInfo, return nsGenericContainerElement::SetAttr(aNodeInfo, aValue, aNotify); } -static nsresult WebShellToPresContext(nsIWebShell *aShell, +static nsresult DocShellToPresContext(nsIDocShell *aShell, nsIPresContext **aPresContext) { *aPresContext = nsnull; @@ -368,7 +368,7 @@ static inline nsresult SpecialAutoLoadReturn(nsresult aRv, nsLinkVerb aVerb) } NS_IMETHODIMP -nsXMLElement::MaybeTriggerAutoLink(nsIWebShell *aShell) +nsXMLElement::MaybeTriggerAutoLink(nsIDocShell *aShell) { NS_ENSURE_ARG_POINTER(aShell); @@ -454,7 +454,7 @@ nsXMLElement::MaybeTriggerAutoLink(nsIWebShell *aShell) rv = CheckLoadURI(base,value,getter_AddRefs(uri)); if (NS_SUCCEEDED(rv)) { nsCOMPtr pc; - rv = WebShellToPresContext(aShell,getter_AddRefs(pc)); + rv = DocShellToPresContext(aShell,getter_AddRefs(pc)); if (NS_SUCCEEDED(rv)) { rv = TriggerLink(pc, verb, base, value, NS_LITERAL_STRING(""), PR_TRUE); diff --git a/content/xml/content/src/nsXMLElement.h b/content/xml/content/src/nsXMLElement.h index 771a61b8b078..85dd597169cf 100644 --- a/content/xml/content/src/nsXMLElement.h +++ b/content/xml/content/src/nsXMLElement.h @@ -49,7 +49,7 @@ class nsIEventListenerManager; class nsIURI; -class nsIWebShell; +class nsIDocShell; class nsXMLElement : public nsGenericContainerElement, public nsIDOMElement @@ -68,7 +68,7 @@ public: NS_FORWARD_NSIDOMELEMENT(nsGenericContainerElement::) // nsIXMLContent - NS_IMETHOD MaybeTriggerAutoLink(nsIWebShell *aShell); + NS_IMETHOD MaybeTriggerAutoLink(nsIDocShell *aShell); NS_IMETHOD GetXMLBaseURI(nsIURI **aURI); // nsIStyledContent diff --git a/content/xml/document/public/nsIXMLContentSink.h b/content/xml/document/public/nsIXMLContentSink.h index 13b33d93973c..10f99d63edbe 100644 --- a/content/xml/document/public/nsIXMLContentSink.h +++ b/content/xml/document/public/nsIXMLContentSink.h @@ -44,7 +44,6 @@ class nsIDocument; class nsIURI; -class nsIWebShell; class nsIChannel; #define NS_IXMLCONTENT_SINK_IID \ @@ -83,7 +82,7 @@ public: nsresult NS_NewXMLContentSink(nsIXMLContentSink** aInstancePtrResult, nsIDocument* aDoc, - nsIURI* aURL, nsIWebShell* aWebShell, + nsIURI* aURL, nsISupports* aContainer, nsIChannel *aChannel); #endif // nsIXMLContentSink_h___ diff --git a/content/xml/document/src/nsXMLContentSink.cpp b/content/xml/document/src/nsXMLContentSink.cpp index 049922ba5e41..e965cbe07b56 100644 --- a/content/xml/document/src/nsXMLContentSink.cpp +++ b/content/xml/document/src/nsXMLContentSink.cpp @@ -52,8 +52,6 @@ #include "nsIURL.h" #include "nsIRefreshURI.h" #include "nsNetUtil.h" -#include "nsIWebShell.h" -#include "nsIDocShell.h" #include "nsIDocShellTreeItem.h" #include "nsIContent.h" #include "nsITextContent.h" @@ -187,7 +185,7 @@ nsresult NS_NewXMLContentSink(nsIXMLContentSink** aResult, nsIDocument* aDoc, nsIURI* aURL, - nsIWebShell* aWebShell, + nsISupports* aContainer, nsIChannel* aChannel) { NS_PRECONDITION(nsnull != aResult, "null ptr"); @@ -201,7 +199,7 @@ NS_NewXMLContentSink(nsIXMLContentSink** aResult, } nsCOMPtr kungFuDeathGrip = it; - nsresult rv = it->Init(aDoc, aURL, aWebShell, aChannel); + nsresult rv = it->Init(aDoc, aURL, aContainer, aChannel); NS_ENSURE_SUCCESS(rv, rv); return CallQueryInterface(it, aResult); @@ -213,7 +211,6 @@ nsXMLContentSink::nsXMLContentSink() mDocument = nsnull; mDocumentURL = nsnull; mDocumentBaseURL = nsnull; - mWebShell = nsnull; mParser = nsnull; mDocElement = nsnull; mContentStack = nsnull; @@ -236,7 +233,6 @@ nsXMLContentSink::~nsXMLContentSink() NS_IF_RELEASE(mDocument); NS_IF_RELEASE(mDocumentURL); NS_IF_RELEASE(mDocumentBaseURL); - NS_IF_RELEASE(mWebShell); NS_IF_RELEASE(mParser); NS_IF_RELEASE(mDocElement); if (nsnull != mNameSpaceStack) { @@ -257,7 +253,7 @@ nsXMLContentSink::~nsXMLContentSink() nsresult nsXMLContentSink::Init(nsIDocument* aDoc, nsIURI* aURL, - nsIWebShell* aContainer, + nsISupports* aContainer, nsIChannel* aChannel) { NS_PRECONDITION(nsnull != aDoc, "null ptr"); @@ -272,9 +268,8 @@ nsXMLContentSink::Init(nsIDocument* aDoc, NS_ADDREF(aURL); mDocumentBaseURL = aURL; NS_ADDREF(aURL); - mWebShell = aContainer; - NS_IF_ADDREF(mWebShell); - if (!mWebShell) { + mDocShell = do_QueryInterface(aContainer); + if (!mDocShell) { mPrettyPrintXML = PR_FALSE; } @@ -456,10 +451,9 @@ nsXMLContentSink::DidBuildModel(PRInt32 aQualityLevel) #if 0 /* Disable until this works for XML */ // Scroll to Anchor only if the document was *not* loaded through history means. - nsCOMPtr docShell(do_QueryInterface(mWebShell)); - if (docShell) { + if (mDocShell) { PRUint32 documentLoadType = 0; - docShell->GetLoadType(&documentLoadType); + mDocShell->GetLoadType(&documentLoadType); ScrollToRef(!(documentLoadType & nsIDocShell::LOAD_CMD_HISTORY)); } #else @@ -488,9 +482,8 @@ nsXMLContentSink::OnDocumentCreated(nsIDOMDocument* aResultDocument) { NS_ENSURE_ARG(aResultDocument); - nsCOMPtr docShell(do_QueryInterface(mWebShell)); nsCOMPtr contentViewer; - docShell->GetContentViewer(getter_AddRefs(contentViewer)); + mDocShell->GetContentViewer(getter_AddRefs(contentViewer)); if (contentViewer) { contentViewer->SetDOMDocument(aResultDocument); } @@ -504,9 +497,8 @@ nsXMLContentSink::OnTransformDone(nsresult aResult, NS_ASSERTION(NS_FAILED(aResult) || aResultDocument, "Don't notify about transform success without a document."); - nsCOMPtr docShell(do_QueryInterface(mWebShell)); nsCOMPtr contentViewer; - docShell->GetContentViewer(getter_AddRefs(contentViewer)); + mDocShell->GetContentViewer(getter_AddRefs(contentViewer)); if (NS_FAILED(aResult) && contentViewer) { // Transform failed. @@ -825,8 +817,8 @@ nsXMLContentSink::ProcessStyleLink(nsIContent* aElement, // don't load alternate XSLT return NS_OK; } - // LoadXSLStyleSheet needs a mWebShell. - if (!mWebShell) + // LoadXSLStyleSheet needs a mDocShell. + if (!mDocShell) return NS_OK; nsCOMPtr url; @@ -1092,26 +1084,24 @@ nsXMLContentSink::ProcessHeaderData(nsIAtom* aHeader,const nsAString& aValue,nsI mDocument->SetHeaderData(aHeader, aValue); + if (!mDocShell) return NS_ERROR_FAILURE; + // see if we have a refresh "header". if (aHeader == nsHTMLAtoms::refresh) { // first get our baseURI - nsCOMPtr docShell = do_QueryInterface(mWebShell, &rv); - if (NS_FAILED(rv)) return rv; nsCOMPtr baseURI; - nsCOMPtr webNav = do_QueryInterface(docShell); + nsCOMPtr webNav = do_QueryInterface(mDocShell); rv = webNav->GetCurrentURI(getter_AddRefs(baseURI)); if (NS_FAILED(rv)) return rv; - nsCOMPtr reefer = do_QueryInterface(mWebShell); + nsCOMPtr reefer = do_QueryInterface(mDocShell); if (reefer) { rv = reefer->SetupRefreshURIFromHeader(baseURI, NS_ConvertUCS2toUTF8(aValue)); if (NS_FAILED(rv)) return rv; } } // END refresh else if (aHeader == nsHTMLAtoms::setcookie) { - nsCOMPtr docShell = do_QueryInterface(mWebShell, &rv); - if (NS_FAILED(rv)) return rv; nsCOMPtr cookieServ = do_GetService(NS_COOKIESERVICE_CONTRACTID, &rv); if (NS_FAILED(rv)) return rv; @@ -1367,7 +1357,7 @@ nsXMLContentSink::StartLayout() { // Reset scrolling to default settings for this shell. // This must happen before the initial reflow, when we create the root frame - nsCOMPtr scrollableContainer(do_QueryInterface(mWebShell)); + nsCOMPtr scrollableContainer(do_QueryInterface(mDocShell)); if (scrollableContainer) { scrollableContainer->ResetScrollbarPreferences(); } @@ -1411,7 +1401,7 @@ nsXMLContentSink::StartLayout() } PRBool topLevelFrameset = PR_FALSE; - nsCOMPtr docShellAsItem(do_QueryInterface(mWebShell)); + nsCOMPtr docShellAsItem(do_QueryInterface(mDocShell)); if (docShellAsItem) { nsCOMPtr root; docShellAsItem->GetSameTypeRootTreeItem(getter_AddRefs(root)); @@ -1520,9 +1510,8 @@ nsresult nsXMLContentSink::RefreshIfEnabled(nsIViewManager* vm) { if (vm) { - nsCOMPtr docShell(do_QueryInterface(mWebShell)); nsCOMPtr contentViewer; - nsresult rv = docShell->GetContentViewer(getter_AddRefs(contentViewer)); + nsresult rv = mDocShell->GetContentViewer(getter_AddRefs(contentViewer)); if (NS_SUCCEEDED(rv) && contentViewer) { PRBool enabled; contentViewer->GetEnableRendering(&enabled); @@ -2216,10 +2205,10 @@ nsXMLContentSink::AddAttributes(const PRUnichar** aAtts, } // Give autoloading links a chance to fire - if (mWebShell) { + if (mDocShell) { nsCOMPtr xmlcontent(do_QueryInterface(aContent)); if (xmlcontent) { - nsresult rv = xmlcontent->MaybeTriggerAutoLink(mWebShell); + nsresult rv = xmlcontent->MaybeTriggerAutoLink(mDocShell); if (rv == NS_XML_AUTOLINK_REPLACE || rv == NS_XML_AUTOLINK_UNDEFINED) { // If we do not terminate the parse, we just keep generating link trigger diff --git a/content/xml/document/src/nsXMLContentSink.h b/content/xml/document/src/nsXMLContentSink.h index e4c640d5f55c..3d5b12593b1b 100644 --- a/content/xml/document/src/nsXMLContentSink.h +++ b/content/xml/document/src/nsXMLContentSink.h @@ -56,11 +56,11 @@ #include "nsSupportsArray.h" #include "nsIExpatSink.h" #include "nsIDocumentTransformer.h" +#include "nsIDocShell.h" class nsICSSStyleSheet; class nsIDocument; class nsIURI; -class nsIWebShell; class nsIContent; class nsAutoVoidArray; class nsIXMLDocument; @@ -91,7 +91,7 @@ public: nsresult Init(nsIDocument* aDoc, nsIURI* aURL, - nsIWebShell* aContainer, + nsISupports* aContainer, nsIChannel* aChannel); // nsISupports @@ -176,7 +176,7 @@ protected: nsIDocument* mDocument; nsIURI* mDocumentURL; nsIURI* mDocumentBaseURL; // can be set via HTTP headers - nsIWebShell* mWebShell; + nsCOMPtr mDocShell; nsIParser* mParser; nsIContent* mDocElement; nsAutoVoidArray* mNameSpaceStack; diff --git a/content/xml/document/src/nsXMLDocument.cpp b/content/xml/document/src/nsXMLDocument.cpp index 4ad8b4540ea8..8fb095762b49 100644 --- a/content/xml/document/src/nsXMLDocument.cpp +++ b/content/xml/document/src/nsXMLDocument.cpp @@ -48,7 +48,6 @@ #include "nsIContent.h" #include "nsIContentViewerContainer.h" #include "nsIContentViewer.h" -#include "nsIWebShell.h" #include "nsIDocShell.h" #include "nsIMarkupDocumentViewer.h" #include "nsIDocumentLoader.h" @@ -633,13 +632,12 @@ nsXMLDocument::StartDocumentLoad(const char* aCommand, sink = do_QueryInterface(aSink); } else { - // This is silly, aContainer should be an nsIWebShell - nsCOMPtr webShell; + nsCOMPtr docShell; if (aContainer) { - webShell = do_QueryInterface(aContainer); - NS_ENSURE_TRUE(webShell, NS_ERROR_FAILURE); + docShell = do_QueryInterface(aContainer); + NS_ENSURE_TRUE(docShell, NS_ERROR_FAILURE); } - rv = NS_NewXMLContentSink(getter_AddRefs(sink), this, aUrl, webShell, + rv = NS_NewXMLContentSink(getter_AddRefs(sink), this, aUrl, docShell, aChannel); NS_ENSURE_SUCCESS(rv, rv); } diff --git a/content/xul/content/src/nsXULElement.cpp b/content/xul/content/src/nsXULElement.cpp index 12aa51b8bded..eadd7863d38e 100644 --- a/content/xul/content/src/nsXULElement.cpp +++ b/content/xul/content/src/nsXULElement.cpp @@ -149,7 +149,7 @@ #include "nsITimelineService.h" #include "nsIFrame.h" -class nsIWebShell; +class nsIDocShell; // Global object maintenance nsICSSParser* nsXULPrototypeElement::sCSSParser = nsnull; @@ -1595,7 +1595,7 @@ nsXULElement::GetElementsByAttribute(const nsAString& aAttribute, // nsIXMLContent interface NS_IMETHODIMP -nsXULElement::MaybeTriggerAutoLink(nsIWebShell *aShell) +nsXULElement::MaybeTriggerAutoLink(nsIDocShell *aShell) { return NS_OK; } diff --git a/content/xul/content/src/nsXULElement.h b/content/xul/content/src/nsXULElement.h index 52074148974e..2ed9920f134f 100644 --- a/content/xul/content/src/nsXULElement.h +++ b/content/xul/content/src/nsXULElement.h @@ -91,7 +91,7 @@ class nsRDFDOMNodeList; class nsString; class nsXULAttributes; class nsVoidArray; -class nsIWebShell; +class nsIDocShell; class nsIObjectInputStream; class nsIObjectOutputStream; @@ -460,7 +460,7 @@ public: NS_IMETHOD GetListenerManager(nsIEventListenerManager** aResult); // nsIXMLContent - NS_IMETHOD MaybeTriggerAutoLink(nsIWebShell *aShell); + NS_IMETHOD MaybeTriggerAutoLink(nsIDocShell *aShell); NS_IMETHOD GetXMLBaseURI(nsIURI **aURI); // nsIStyledContent diff --git a/content/xul/document/src/nsXULContentSink.cpp b/content/xul/document/src/nsXULContentSink.cpp index 743d260811e9..e12af232f028 100644 --- a/content/xul/document/src/nsXULContentSink.cpp +++ b/content/xul/document/src/nsXULContentSink.cpp @@ -486,14 +486,14 @@ XULContentSinkImpl::DidBuildModel(PRInt32 aQualityLevel) NS_IMETHODIMP XULContentSinkImpl::WillInterrupt(void) { - // XXX Notify the webshell, if necessary + // XXX Notify the docshell, if necessary return NS_OK; } NS_IMETHODIMP XULContentSinkImpl::WillResume(void) { - // XXX Notify the webshell, if necessary + // XXX Notify the docshell, if necessary return NS_OK; } diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp index a4f208ff3578..52598a9f7e05 100644 --- a/layout/base/nsDocumentViewer.cpp +++ b/layout/base/nsDocumentViewer.cpp @@ -86,7 +86,6 @@ #include "nsIPrefLocalizedString.h" #include "nsIPageSequenceFrame.h" #include "nsIURL.h" -#include "nsIWebShell.h" #include "nsIContentViewerEdit.h" #include "nsIContentViewerFile.h" #include "nsIMarkupDocumentViewer.h" diff --git a/layout/printing/nsPrintEngine.cpp b/layout/printing/nsPrintEngine.cpp index f09c8040c0a4..a54ab26b0945 100644 --- a/layout/printing/nsPrintEngine.cpp +++ b/layout/printing/nsPrintEngine.cpp @@ -147,7 +147,6 @@ static const char* kPrintingPromptService = "@mozilla.org/embedcomp/printingprom #include "nsIPrefBranch.h" #include "nsIPageSequenceFrame.h" #include "nsIURL.h" -#include "nsIWebShell.h" #include "nsIContentViewerEdit.h" #include "nsIContentViewerFile.h" #include "nsIMarkupDocumentViewer.h"