From db44012fc439ea60baeb6228e7b1129b66e47f6d Mon Sep 17 00:00:00 2001 From: "waterson%netscape.com" Date: Tue, 7 Aug 2001 04:11:09 +0000 Subject: [PATCH] Fix gcc-2.7.2.3 bustage. --- content/build/nsContentDLF.cpp | 9 +++++---- content/build/nsContentDLF.h | 2 ++ layout/build/nsContentDLF.cpp | 9 +++++---- layout/build/nsContentDLF.h | 2 ++ 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/content/build/nsContentDLF.cpp b/content/build/nsContentDLF.cpp index a29a0e20d80b..15641482361b 100644 --- a/content/build/nsContentDLF.cpp +++ b/content/build/nsContentDLF.cpp @@ -271,12 +271,13 @@ nsContentDLF::CreateInstanceForDocument(nsISupports* aContainer, rv = NS_NewDocumentViewer(getter_AddRefs(docv)); if (NS_FAILED(rv)) break; - docv->SetUAStyleSheet(gUAStyleSheet); + + docv->SetUAStyleSheet(NS_STATIC_CAST(nsIStyleSheet*, gUAStyleSheet)); // Bind the document to the Content Viewer - rv = docv->LoadStart(aDocument); - *aDocViewerResult = docv; - NS_IF_ADDREF(*aDocViewerResult); + nsIContentViewer* cv = NS_STATIC_CAST(nsIContentViewer*, docv.get()); + rv = cv->LoadStart(aDocument); + NS_ADDREF(*aDocViewerResult = cv); } while (PR_FALSE); return rv; diff --git a/content/build/nsContentDLF.h b/content/build/nsContentDLF.h index a62048a6fb4f..82c8a31f8aab 100644 --- a/content/build/nsContentDLF.h +++ b/content/build/nsContentDLF.h @@ -20,6 +20,8 @@ #include "nsIDocumentLoaderFactory.h" #include "nsIDocStreamLoaderFactory.h" +#include "nsIDocumentViewer.h" +#include "nsIDocument.h" class nsICSSStyleSheet; class nsIChannel; diff --git a/layout/build/nsContentDLF.cpp b/layout/build/nsContentDLF.cpp index a29a0e20d80b..15641482361b 100644 --- a/layout/build/nsContentDLF.cpp +++ b/layout/build/nsContentDLF.cpp @@ -271,12 +271,13 @@ nsContentDLF::CreateInstanceForDocument(nsISupports* aContainer, rv = NS_NewDocumentViewer(getter_AddRefs(docv)); if (NS_FAILED(rv)) break; - docv->SetUAStyleSheet(gUAStyleSheet); + + docv->SetUAStyleSheet(NS_STATIC_CAST(nsIStyleSheet*, gUAStyleSheet)); // Bind the document to the Content Viewer - rv = docv->LoadStart(aDocument); - *aDocViewerResult = docv; - NS_IF_ADDREF(*aDocViewerResult); + nsIContentViewer* cv = NS_STATIC_CAST(nsIContentViewer*, docv.get()); + rv = cv->LoadStart(aDocument); + NS_ADDREF(*aDocViewerResult = cv); } while (PR_FALSE); return rv; diff --git a/layout/build/nsContentDLF.h b/layout/build/nsContentDLF.h index a62048a6fb4f..82c8a31f8aab 100644 --- a/layout/build/nsContentDLF.h +++ b/layout/build/nsContentDLF.h @@ -20,6 +20,8 @@ #include "nsIDocumentLoaderFactory.h" #include "nsIDocStreamLoaderFactory.h" +#include "nsIDocumentViewer.h" +#include "nsIDocument.h" class nsICSSStyleSheet; class nsIChannel;