Within SetupRegistry, intialize the metacharacter service so that the charset field in the http content-type header is recognized and acted upon correctly.
git-svn-id: svn://10.0.0.236/trunk@41071 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
47c7b936c8
commit
6b1734f2e9
@ -54,6 +54,10 @@
|
||||
#include "nsUnitConversion.h"
|
||||
#include "nsIDeviceContext.h"
|
||||
|
||||
// Charset converter
|
||||
#include "nsMetaCharsetCID.h"
|
||||
#include "nsIMetaCharsetService.h"
|
||||
|
||||
#define DIALOG_FONT "Helvetica"
|
||||
#define DIALOG_FONT_SIZE 10
|
||||
|
||||
@ -89,6 +93,8 @@ static NS_DEFINE_IID(kIBrowserWindowIID, NS_IBROWSER_WINDOW_IID);
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
static NS_DEFINE_IID(kIXPBaseWindowIID, NS_IXPBASE_WINDOW_IID);
|
||||
|
||||
static NS_DEFINE_IID(kMetaCharsetCID, NS_META_CHARSET_CID);
|
||||
static NS_DEFINE_IID(kIMetaCharsetServiceIID, NS_IMETA_CHARSET_SERVICE_IID);
|
||||
|
||||
#define DEFAULT_WIDTH 620
|
||||
#define DEFAULT_HEIGHT 400
|
||||
@ -181,10 +187,23 @@ nsViewerApp::AutoregisterComponents()
|
||||
nsresult
|
||||
nsViewerApp::SetupRegistry()
|
||||
{
|
||||
nsresult rv;
|
||||
AutoregisterComponents();
|
||||
|
||||
NS_SetupRegistry();
|
||||
|
||||
nsIMetaCharsetService* metacharset;
|
||||
rv = nsServiceManager::GetService(kMetaCharsetCID,
|
||||
kIMetaCharsetServiceIID,
|
||||
(nsISupports **) &metacharset);
|
||||
if(!NS_FAILED(rv)) {
|
||||
rv = metacharset->Start();
|
||||
}
|
||||
|
||||
if(!NS_FAILED(rv)) {
|
||||
rv = nsServiceManager::ReleaseService(kMetaCharsetCID, metacharset);
|
||||
}
|
||||
|
||||
// Register our browser window factory
|
||||
nsIFactory* bwf;
|
||||
NS_NewBrowserWindowFactory(&bwf);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user