diff --git a/mozilla/content/base/src/nsDocumentViewer.cpp b/mozilla/content/base/src/nsDocumentViewer.cpp index 780485490ac..fd2043c708d 100644 --- a/mozilla/content/base/src/nsDocumentViewer.cpp +++ b/mozilla/content/base/src/nsDocumentViewer.cpp @@ -37,6 +37,7 @@ #include "nsIPresShell.h" #include "nsIStyleSet.h" #include "nsIStyleSheet.h" +#include "nsICSSStyleSheet.h" #include "nsIStyleContext.h" #include "nsIFrame.h" @@ -73,6 +74,7 @@ #include "nsIDocShell.h" #include "nsIFrameDebug.h" +#include "nsIChromeRegistry.h" #include "nsIServiceManager.h" #include "nsIEventQueueService.h" @@ -950,6 +952,21 @@ DocumentViewerImpl::CreateStyleSet(nsIDocument* aDocument, if (mUAStyleSheet) { (*aStyleSet)->AppendBackstopStyleSheet(mUAStyleSheet); } + + NS_WITH_SERVICE(nsIChromeRegistry, chromeRegistry, "component://netscape/chrome/chrome-registry", &rv); + if (NS_SUCCEEDED(rv) && chromeRegistry) { + nsCOMPtr sheets; + chromeRegistry->GetBackstopSheets(getter_AddRefs(sheets)); + if(sheets){ + nsCOMPtr sheet; + PRUint32 count; + sheets->Count(&count); + for(PRUint32 i=0; iGetElementAt(i, getter_AddRefs(sheet)); + (*aStyleSet)->AppendBackstopStyleSheet(sheet); + } + } + } } return rv; } diff --git a/mozilla/layout/base/nsDocumentViewer.cpp b/mozilla/layout/base/nsDocumentViewer.cpp index 780485490ac..fd2043c708d 100644 --- a/mozilla/layout/base/nsDocumentViewer.cpp +++ b/mozilla/layout/base/nsDocumentViewer.cpp @@ -37,6 +37,7 @@ #include "nsIPresShell.h" #include "nsIStyleSet.h" #include "nsIStyleSheet.h" +#include "nsICSSStyleSheet.h" #include "nsIStyleContext.h" #include "nsIFrame.h" @@ -73,6 +74,7 @@ #include "nsIDocShell.h" #include "nsIFrameDebug.h" +#include "nsIChromeRegistry.h" #include "nsIServiceManager.h" #include "nsIEventQueueService.h" @@ -950,6 +952,21 @@ DocumentViewerImpl::CreateStyleSet(nsIDocument* aDocument, if (mUAStyleSheet) { (*aStyleSet)->AppendBackstopStyleSheet(mUAStyleSheet); } + + NS_WITH_SERVICE(nsIChromeRegistry, chromeRegistry, "component://netscape/chrome/chrome-registry", &rv); + if (NS_SUCCEEDED(rv) && chromeRegistry) { + nsCOMPtr sheets; + chromeRegistry->GetBackstopSheets(getter_AddRefs(sheets)); + if(sheets){ + nsCOMPtr sheet; + PRUint32 count; + sheets->Count(&count); + for(PRUint32 i=0; iGetElementAt(i, getter_AddRefs(sheet)); + (*aStyleSet)->AppendBackstopStyleSheet(sheet); + } + } + } } return rv; } diff --git a/mozilla/layout/base/src/nsDocumentViewer.cpp b/mozilla/layout/base/src/nsDocumentViewer.cpp index 780485490ac..fd2043c708d 100644 --- a/mozilla/layout/base/src/nsDocumentViewer.cpp +++ b/mozilla/layout/base/src/nsDocumentViewer.cpp @@ -37,6 +37,7 @@ #include "nsIPresShell.h" #include "nsIStyleSet.h" #include "nsIStyleSheet.h" +#include "nsICSSStyleSheet.h" #include "nsIStyleContext.h" #include "nsIFrame.h" @@ -73,6 +74,7 @@ #include "nsIDocShell.h" #include "nsIFrameDebug.h" +#include "nsIChromeRegistry.h" #include "nsIServiceManager.h" #include "nsIEventQueueService.h" @@ -950,6 +952,21 @@ DocumentViewerImpl::CreateStyleSet(nsIDocument* aDocument, if (mUAStyleSheet) { (*aStyleSet)->AppendBackstopStyleSheet(mUAStyleSheet); } + + NS_WITH_SERVICE(nsIChromeRegistry, chromeRegistry, "component://netscape/chrome/chrome-registry", &rv); + if (NS_SUCCEEDED(rv) && chromeRegistry) { + nsCOMPtr sheets; + chromeRegistry->GetBackstopSheets(getter_AddRefs(sheets)); + if(sheets){ + nsCOMPtr sheet; + PRUint32 count; + sheets->Count(&count); + for(PRUint32 i=0; iGetElementAt(i, getter_AddRefs(sheet)); + (*aStyleSet)->AppendBackstopStyleSheet(sheet); + } + } + } } return rv; }