зеркало из https://github.com/mozilla/pjs.git
Within SetupRegistry, intialize the metacharacter service so that the charset field in the http content-type header is recognized and acted upon correctly.
This commit is contained in:
Родитель
db63f7c369
Коммит
c0f1a81582
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче