190307 Add MathML support to Camino, adding a non-blocking alert service to handle MathML's missing-font dialog. Patch by Makoto Yamashita <makotoy@ms.u-tokyo.ac.jp>, fixed up for CaminoStatic by me. r=smfr sr=pink a/1.8=rbs a/1.8.0=dveditz

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@190922 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mark%moxienet.com
2006-02-22 23:15:26 +00:00
parent d49855bf3d
commit b079e2ec39
14 changed files with 466 additions and 41 deletions

View File

@@ -950,6 +950,243 @@
//082
//083
//084
//0E0
//0E1
//0E2
//0E3
//0E4
0E6A9882097DFF9A007962C1 = {
isa = PBXFileReference;
lastKnownFileType = "compiled.mach-o.bundle";
name = libucvmath.dylib;
path = ../dist/Embed/components/libucvmath.dylib;
refType = 2;
sourceTree = SOURCE_ROOT;
};
0E6A9883097DFF9A007962C1 = {
fileRef = 0E6A9882097DFF9A007962C1;
isa = PBXBuildFile;
settings = {
};
};
0E6A9886097DFFD4007962C1 = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = text;
name = mathml.css;
path = ../dist/Embed/res/mathml.css;
refType = 2;
sourceTree = SOURCE_ROOT;
};
0E6A9888097DFFF4007962C1 = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = text.xml;
path = mathml.dtd;
refType = 4;
sourceTree = "<group>";
};
0E6A988C097E0007007962C1 = {
children = (
0E6A988D097E0044007962C1,
0E6A988E097E0044007962C1,
0E6A988F097E0044007962C1,
0E6A9890097E0044007962C1,
0E6A9891097E0044007962C1,
0E6A9892097E0044007962C1,
0E6A9893097E0044007962C1,
0E6A9894097E0044007962C1,
0E6A9895097E0044007962C1,
0E6A9896097E0044007962C1,
);
isa = PBXGroup;
name = fonts;
path = ../dist/Embed/res/fonts;
refType = 2;
sourceTree = SOURCE_ROOT;
};
0E6A988D097E0044007962C1 = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = text;
path = fontEncoding.properties;
refType = 4;
sourceTree = "<group>";
};
0E6A988E097E0044007962C1 = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = text;
path = mathfont.properties;
refType = 4;
sourceTree = "<group>";
};
0E6A988F097E0044007962C1 = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = text;
path = mathfontCMEX10.properties;
refType = 4;
sourceTree = "<group>";
};
0E6A9890097E0044007962C1 = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = text;
path = mathfontCMSY10.properties;
refType = 4;
sourceTree = "<group>";
};
0E6A9891097E0044007962C1 = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = text;
path = mathfontMath1.properties;
refType = 4;
sourceTree = "<group>";
};
0E6A9892097E0044007962C1 = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = text;
path = mathfontMath2.properties;
refType = 4;
sourceTree = "<group>";
};
0E6A9893097E0044007962C1 = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = text;
path = mathfontMath4.properties;
refType = 4;
sourceTree = "<group>";
};
0E6A9894097E0044007962C1 = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = text;
path = mathfontMTExtra.properties;
refType = 4;
sourceTree = "<group>";
};
0E6A9895097E0044007962C1 = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = text;
path = mathfontPUA.properties;
refType = 4;
sourceTree = "<group>";
};
0E6A9896097E0044007962C1 = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = text;
path = mathfontSymbol.properties;
refType = 4;
sourceTree = "<group>";
};
0E6A98A1097E0091007962C1 = {
fileRef = 0E6A9882097DFF9A007962C1;
isa = PBXBuildFile;
settings = {
};
};
0E6A98A2097E00A6007962C1 = {
fileRef = 0E6A9886097DFFD4007962C1;
isa = PBXBuildFile;
settings = {
};
};
0E6A98A3097E00BB007962C1 = {
fileRef = 0E6A9888097DFFF4007962C1;
isa = PBXBuildFile;
settings = {
};
};
0E6A98A6097E00CD007962C1 = {
buildActionMask = 2147483647;
dstPath = res/fonts;
dstSubfolderSpec = 6;
files = (
0E6A98A8097E010C007962C1,
0E6A98A9097E010C007962C1,
0E6A98AA097E010C007962C1,
0E6A98AB097E010C007962C1,
0E6A98AC097E010C007962C1,
0E6A98AD097E010C007962C1,
0E6A98AE097E010C007962C1,
0E6A98AF097E010C007962C1,
0E6A98B0097E010C007962C1,
0E6A98B1097E010C007962C1,
);
isa = PBXCopyFilesBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
};
0E6A98A8097E010C007962C1 = {
fileRef = 0E6A988D097E0044007962C1;
isa = PBXBuildFile;
settings = {
};
};
0E6A98A9097E010C007962C1 = {
fileRef = 0E6A988E097E0044007962C1;
isa = PBXBuildFile;
settings = {
};
};
0E6A98AA097E010C007962C1 = {
fileRef = 0E6A988F097E0044007962C1;
isa = PBXBuildFile;
settings = {
};
};
0E6A98AB097E010C007962C1 = {
fileRef = 0E6A9890097E0044007962C1;
isa = PBXBuildFile;
settings = {
};
};
0E6A98AC097E010C007962C1 = {
fileRef = 0E6A9891097E0044007962C1;
isa = PBXBuildFile;
settings = {
};
};
0E6A98AD097E010C007962C1 = {
fileRef = 0E6A9892097E0044007962C1;
isa = PBXBuildFile;
settings = {
};
};
0E6A98AE097E010C007962C1 = {
fileRef = 0E6A9893097E0044007962C1;
isa = PBXBuildFile;
settings = {
};
};
0E6A98AF097E010C007962C1 = {
fileRef = 0E6A9894097E0044007962C1;
isa = PBXBuildFile;
settings = {
};
};
0E6A98B0097E010C007962C1 = {
fileRef = 0E6A9895097E0044007962C1;
isa = PBXBuildFile;
settings = {
};
};
0E6A98B1097E010C007962C1 = {
fileRef = 0E6A9896097E0044007962C1;
isa = PBXBuildFile;
settings = {
};
};
//0E0
//0E1
//0E2
//0E3
//0E4
//0F0
//0F1
//0F2
@@ -1501,6 +1738,7 @@
dstPath = components;
dstSubfolderSpec = 6;
files = (
0E6A98A1097E0091007962C1,
82180ACB07368BF2002EFA6D,
82AC0D64065A601500776B02,
3F44ACD005BDFB9F00CB4B08,
@@ -3633,6 +3871,7 @@
0F66E4AC07D6D9B000444E2A,
3F44AD2D05BDFB9F00CB4B08,
3F44AD3E05BDFB9F00CB4B08,
0E6A98A6097E00CD007962C1,
3F44AD4005BDFB9F00CB4B08,
3F44AD4605BDFB9F00CB4B08,
3F44AD5105BDFB9F00CB4B08,
@@ -4414,6 +4653,7 @@
0F01117408F2FE7C00423C02,
0F2100800926FC99001130FA,
0F557E5B09438AEC00EF68F6,
0E6A9883097DFF9A007962C1,
);
isa = PBXResourcesBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@@ -5975,6 +6215,7 @@
dstPath = res;
dstSubfolderSpec = 6;
files = (
0E6A98A2097E00A6007962C1,
82180AC807368B21002EFA6D,
3F44AD2E05BDFB9F00CB4B08,
3F44AD2F05BDFB9F00CB4B08,
@@ -6076,6 +6317,7 @@
dstPath = res/dtd;
dstSubfolderSpec = 6;
files = (
0E6A98A3097E00BB007962C1,
3F44AD3F05BDFB9F00CB4B08,
);
isa = PBXCopyFilesBuildPhase;
@@ -7559,6 +7801,7 @@
3F44AF0905BDFBA000CB4B08,
3F44AF4805BDFBA000CB4B08,
3F44AF5905BDFBA000CB4B08,
4DD0EFFA09918BE100B6BBFD,
3F44AF5B05BDFBA000CB4B08,
3F44AF6105BDFBA000CB4B08,
3F44AF6C05BDFBA000CB4B08,
@@ -9764,6 +10007,7 @@
3F44AF5305BDFBA000CB4C08,
3F44AF5405BDFBA000CB4B08,
3F44AF5505BDFBA000CB4B08,
4DD0EFF709918B3200B6BBFD,
);
isa = PBXCopyFilesBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@@ -9852,6 +10096,7 @@
dstSubfolderSpec = 6;
files = (
3F44AF5A05BDFBA000CB4B08,
4DD0EFF809918BCF00B6BBFD,
);
isa = PBXCopyFilesBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@@ -10315,6 +10560,7 @@
82CE286E0736605800B4DE07,
34884A37074F7C5D000EA76B,
0F518835088593F30091F3FB,
4DC28F5E099184B80081939B,
);
isa = PBXFrameworksBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@@ -12593,6 +12839,20 @@
settings = {
};
};
4DC28F5D099184B80081939B = {
isa = PBXFileReference;
lastKnownFileType = archive.ar;
name = libucvmath.a;
path = ../dist/lib/components/libucvmath.a;
refType = 2;
sourceTree = SOURCE_ROOT;
};
4DC28F5E099184B80081939B = {
fileRef = 4DC28F5D099184B80081939B;
isa = PBXBuildFile;
settings = {
};
};
4DC41D3C0869D7A400947044 = {
isa = PBXFileReference;
lastKnownFileType = archive.ar;
@@ -12668,6 +12928,97 @@
//4D2
//4D3
//4D4
4DD0EFF709918B3200B6BBFD = {
fileRef = 0E6A9886097DFFD4007962C1;
isa = PBXBuildFile;
settings = {
};
};
4DD0EFF809918BCF00B6BBFD = {
fileRef = 0E6A9888097DFFF4007962C1;
isa = PBXBuildFile;
settings = {
};
};
4DD0EFFA09918BE100B6BBFD = {
buildActionMask = 2147483647;
dstPath = res/fonts;
dstSubfolderSpec = 6;
files = (
4DD0F00009918C2300B6BBFD,
4DD0F00109918C2300B6BBFD,
4DD0F00209918C2300B6BBFD,
4DD0F00309918C2300B6BBFD,
4DD0F00409918C2300B6BBFD,
4DD0F00509918C2300B6BBFD,
4DD0F00609918C2300B6BBFD,
4DD0F00709918C2300B6BBFD,
4DD0F00809918C2300B6BBFD,
4DD0F00909918C2300B6BBFD,
);
isa = PBXCopyFilesBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
};
4DD0F00009918C2300B6BBFD = {
fileRef = 0E6A988D097E0044007962C1;
isa = PBXBuildFile;
settings = {
};
};
4DD0F00109918C2300B6BBFD = {
fileRef = 0E6A988E097E0044007962C1;
isa = PBXBuildFile;
settings = {
};
};
4DD0F00209918C2300B6BBFD = {
fileRef = 0E6A988F097E0044007962C1;
isa = PBXBuildFile;
settings = {
};
};
4DD0F00309918C2300B6BBFD = {
fileRef = 0E6A9890097E0044007962C1;
isa = PBXBuildFile;
settings = {
};
};
4DD0F00409918C2300B6BBFD = {
fileRef = 0E6A9891097E0044007962C1;
isa = PBXBuildFile;
settings = {
};
};
4DD0F00509918C2300B6BBFD = {
fileRef = 0E6A9892097E0044007962C1;
isa = PBXBuildFile;
settings = {
};
};
4DD0F00609918C2300B6BBFD = {
fileRef = 0E6A9893097E0044007962C1;
isa = PBXBuildFile;
settings = {
};
};
4DD0F00709918C2300B6BBFD = {
fileRef = 0E6A9894097E0044007962C1;
isa = PBXBuildFile;
settings = {
};
};
4DD0F00809918C2300B6BBFD = {
fileRef = 0E6A9895097E0044007962C1;
isa = PBXBuildFile;
settings = {
};
};
4DD0F00909918C2300B6BBFD = {
fileRef = 0E6A9896097E0044007962C1;
isa = PBXBuildFile;
settings = {
};
};
4DD988E708EB7D3700AD0788 = {
fileRef = 34D112DD08E9B17400989FD5;
isa = PBXBuildFile;
@@ -15789,6 +16140,7 @@
4DC41D3E0869D7A400947044,
4DC41D3E0869D7A400947045,
4DC41D3E0869D7A400947046,
4DC28F5D099184B80081939B,
);
isa = PBXGroup;
name = "Gecko Static Components";
@@ -16259,6 +16611,7 @@
};
F5949A46030D58A1014E8430 = {
children = (
0E6A9888097DFFF4007962C1,
F5949A47030D58A1014E8430,
);
isa = PBXGroup;
@@ -17147,6 +17500,7 @@
F6BD638201B30EA301A962F7,
F50DCB4302C2856001A967F3,
F6BD638701B30F5301A962F7,
0E6A9882097DFF9A007962C1,
3FE5B9FC068A090F0001CECD,
F5F14E9602A5A43A01A967F3,
F5461CBB03AAC25C01A96660,
@@ -17809,9 +18163,11 @@
F6BD64BC01B316DA01A962F7,
F5949A46030D58A1014E8430,
F6BD64D701B3172601A962F7,
0E6A988C097E0007007962C1,
F6BD64DD01B3172601A962F7,
F5A70906036DB46201202892,
F6BD64DE01B3172601A962F7,
0E6A9886097DFFD4007962C1,
F6BD64DF01B3172601A962F7,
F6BD64DF01B3172601A963F7,
F6BD64E001B3172601A962F7,

View File

@@ -4,7 +4,6 @@ ac_add_options --enable-default-toolkit=cocoa
ac_add_options --disable-tests
ac_add_options --disable-accessibility
ac_add_options --disable-jsd
ac_add_options --disable-mathml
ac_add_options --enable-single-profile
ac_add_options --enable-canvas
ac_add_options --enable-svg

View File

@@ -60,6 +60,10 @@
#define NS_PROMPTSERVICE_CID \
{0xa2112d6a, 0x0e28, 0x421f, {0xb4, 0x6a, 0x25, 0xc0, 0xb3, 0x8, 0xcb, 0xd0}}
// {7F47B9CB-7091-11DA-B9A4-00039386357A}
#define NS_NONBLOCKINGALERTSERVICE_CID \
{0x7F47B9CB, 0x7091, 0x11DA,{0xB9, 0xA4, 0x00, 0x03, 0x93, 0x86, 0x35, 0x7A}}
#define NS_KEYCHAINPROMPT_CID \
{ 0x64997e60, 0x17fe, 0x11d4, {0x8c, 0xee, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3}}
@@ -186,6 +190,12 @@ static const nsModuleComponentInfo gAppComponents[] = {
"@mozilla.org/embedcomp/prompt-service;1",
CocoaPromptServiceConstructor
},
{
"Nonblocking Alert Service",
NS_NONBLOCKINGALERTSERVICE_CID,
"@mozilla.org/embedcomp/nbalert-service;1",
CocoaPromptServiceConstructor
},
{
"Keychain Prompt",
NS_KEYCHAINPROMPT_CID,

View File

@@ -55,6 +55,7 @@
MODULE(xpcomObsoleteModule) \
MODULE(nsI18nModule) \
MODULE(nsUConvModule) \
MODULE(nsUCvMathModule) \
MODULE(nsJarModule) \
MODULE(xpconnect) \
MODULE(necko_core_and_primary_protocols) \

View File

@@ -41,11 +41,12 @@
#include "nsIStringBundle.h"
#include "nsIPromptService.h"
#include "nsINonBlockingAlertService.h"
#include "nsICookiePromptService.h"
#include "nsCOMPtr.h"
#import <Cocoa/Cocoa.h>
class CocoaPromptService : public nsIPromptService, public nsICookiePromptService
class CocoaPromptService : public nsIPromptService, public nsICookiePromptService, public nsINonBlockingAlertService
{
public:
CocoaPromptService();
@@ -54,6 +55,7 @@ public:
NS_DECL_ISUPPORTS;
NS_DECL_NSIPROMPTSERVICE;
NS_DECL_NSICOOKIEPROMPTSERVICE;
NS_DECL_NSINONBLOCKINGALERTSERVICE;
private:
NSString *GetCommonDialogLocaleString(const char *s);

View File

@@ -54,7 +54,7 @@ CocoaPromptService::~CocoaPromptService()
{
}
NS_IMPL_ISUPPORTS2(CocoaPromptService, nsIPromptService, nsICookiePromptService)
NS_IMPL_ISUPPORTS3(CocoaPromptService, nsIPromptService, nsINonBlockingAlertService, nsICookiePromptService)
/* void alert (in nsIDOMWindow parent, in wstring dialogTitle, in wstring text); */
NS_IMETHODIMP
@@ -86,6 +86,31 @@ CocoaPromptService::Alert(nsIDOMWindow *parent,
return rv;
}
// nsINonBlockingService implementation
/* void showNonBlockingAlert (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText); */
NS_IMETHODIMP
CocoaPromptService::ShowNonBlockingAlert(nsIDOMWindow *aParent,
const PRUnichar *aDialogTitle,
const PRUnichar *aText)
{
NSString* titleStr = [NSString stringWithPRUnichars:aDialogTitle];
NSString* msgStr = [NSString stringWithPRUnichars:aText];
NSWindow* parentWindow =
[[CHBrowserView browserViewFromDOMWindow:aParent] getNativeWindow];
if (!parentWindow) {
NS_WARNING("ShowNonBlockingAlert: failed to get the parent window.");
return NS_ERROR_FAILURE;
}
NSBeginInformationalAlertSheet(titleStr,
@"OK", nil, nil, // only one button
parentWindow,
nil, // no delegate
NULL, NULL, nil, // no delegate selectors
msgStr);
return NS_OK;
}
/* void alertCheck (in nsIDOMWindow parent, in wstring dialogTitle, in wstring text, in wstring checkMsg, inout boolean checkValue); */
NS_IMETHODIMP
CocoaPromptService::AlertCheck(nsIDOMWindow *parent,

View File

@@ -75,4 +75,16 @@
#define NS_PROMPTSERVICE_CONTRACTID \
"@mozilla.org/embedcomp/prompt-service;1"
/**
* Non Blocking Alert Service ContractID
* This service is for posing non blocking alerts to the user.
*
* This contract implements the following interfaces:
* nsINonBlockingAlertService
*
* Embedders may override this ContractID with their own implementation.
*/
#define NS_NONBLOCKINGALERTSERVICE_CONTRACTID \
"@mozilla.org/embedcomp/nbalert-service;1"
#endif // NSEMBEDCID_H

View File

@@ -134,6 +134,7 @@ static const nsModuleComponentInfo gComponents[] = {
#ifdef MOZ_XUL
{ "Dialog ParamBlock", NS_DIALOGPARAMBLOCK_CID, NS_DIALOGPARAMBLOCK_CONTRACTID, nsDialogParamBlockConstructor },
{ "Prompt Service", NS_PROMPTSERVICE_CID, NS_PROMPTSERVICE_CONTRACTID, nsPromptServiceConstructor },
{ "Nonblocking Alert Service", NS_PROMPTSERVICE_CID, NS_NONBLOCKINGALERTSERVICE_CONTRACTID, nsPromptServiceConstructor },
{ "JS Console Service", NS_JSCONSOLESERVICE_CID, NS_JSCONSOLESERVICE_CONTRACTID, nsJSConsoleServiceConstructor },
#ifndef WINCE
{ "Printing Prompt Service", NS_PRINTINGPROMPTSERVICE_CID, NS_PRINTINGPROMPTSERVICE_CONTRACTID, nsPrintingPromptServiceConstructor },

View File

@@ -49,6 +49,7 @@ GRE_MODULE = 1
SDK_XPIDLSRCS = nsIWindowWatcher.idl \
nsIPromptService.idl \
nsINonBlockingAlertService.idl \
$(NULL)
XPIDLSRCS = nsIDialogParamBlock.idl \

View File

@@ -85,7 +85,8 @@ private:
************************ nsPromptService ***********************
****************************************************************/
NS_IMPL_ISUPPORTS2(nsPromptService, nsIPromptService, nsPIPromptService)
NS_IMPL_ISUPPORTS3(nsPromptService, nsIPromptService,
nsPIPromptService, nsINonBlockingAlertService)
nsPromptService::nsPromptService() {
}
@@ -605,6 +606,32 @@ nsPromptService::Select(nsIDOMWindow *parent, const PRUnichar *dialogTitle,
return rv;
}
/* void showNonBlockingAlert (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText); */
NS_IMETHODIMP
nsPromptService::ShowNonBlockingAlert(nsIDOMWindow *aParent,
const PRUnichar *aDialogTitle,
const PRUnichar *aText)
{
NS_ENSURE_ARG(aParent);
if (!mWatcher)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIDialogParamBlock> paramBlock(do_CreateInstance(NS_DIALOGPARAMBLOCK_CONTRACTID));
if (!paramBlock)
return NS_ERROR_FAILURE;
paramBlock->SetInt(nsPIPromptService::eNumberButtons, 1);
paramBlock->SetString(nsPIPromptService::eIconClass, NS_LITERAL_STRING("alert-icon").get());
paramBlock->SetString(nsPIPromptService::eDialogTitle, aDialogTitle);
paramBlock->SetString(nsPIPromptService::eMsg, aText);
nsCOMPtr<nsIDOMWindow> dialog;
mWatcher->OpenWindow(aParent, "chrome://global/content/commonDialog.xul",
"_blank", "dependent,centerscreen,chrome,titlebar",
paramBlock, getter_AddRefs(dialog));
return NS_OK;
}
nsresult
nsPromptService::DoDialog(nsIDOMWindow *aParent,
nsIDialogParamBlock *aParamBlock, const char *aChromeURL)

View File

@@ -41,17 +41,22 @@
// {A2112D6A-0E28-421f-B46A-25C0B308CBD0}
#define NS_PROMPTSERVICE_CID \
{0xa2112d6a, 0x0e28, 0x421f, {0xb4, 0x6a, 0x25, 0xc0, 0xb3, 0x8, 0xcb, 0xd0}}
// {150E7415-72D7-11DA-A924-00039386357A}
#define NS_NONBLOCKINGALERTSERVICE_CID \
{0x150e7415, 0x72d7, 0x11da, {0xa9, 0x24, 0x00, 0x03, 0x93, 0x86, 0x35, 0x7a}}
#include "nsCOMPtr.h"
#include "nsIPromptService.h"
#include "nsPIPromptService.h"
#include "nsINonBlockingAlertService.h"
#include "nsIWindowWatcher.h"
class nsIDOMWindow;
class nsIDialogParamBlock;
class nsPromptService: public nsIPromptService,
public nsPIPromptService {
public nsPIPromptService,
public nsINonBlockingAlertService {
public:
@@ -62,6 +67,7 @@ public:
NS_DECL_NSIPROMPTSERVICE
NS_DECL_NSPIPROMPTSERVICE
NS_DECL_NSINONBLOCKINGALERTSERVICE
NS_DECL_ISUPPORTS
private:

View File

@@ -1116,7 +1116,7 @@ nsWindowWatcher::FindWindowEntry(nsIDOMWindow *aWindow)
found = PR_FALSE;
while (info != listEnd && NS_SUCCEEDED(rv)) {
nsCOMPtr<nsIDOMWindow> infoWindow(do_QueryReferent(info->mWindow));
if (!infoWindow) // clean up dangling reference, while we're here
if (!infoWindow) { // clean up dangling reference, while we're here
rv = RemoveWindow(info);
}
else if (infoWindow.get() == aWindow)

View File

@@ -252,19 +252,19 @@ res/fonts/fontEncoding.properties
;
; Optional for MathML
;
;res/mathml.css
;res/dtd/mathml.dtd
;res/entityTables/mathml20.properties
;res/fonts/mathfont.properties
;res/fonts/mathfontCMEX10.properties
;res/fonts/mathfontCMSY10.properties
;res/fonts/mathfontMath1.properties
;res/fonts/mathfontMath2.properties
;res/fonts/mathfontMath4.properties
;res/fonts/mathfontMTExtra.properties
;res/fonts/mathfontPUA.properties
;res/fonts/mathfontSymbol.properties
;Components/ucvmath.dylib
res/mathml.css
res/dtd/mathml.dtd
res/entityTables/mathml20.properties
res/fonts/mathfont.properties
res/fonts/mathfontCMEX10.properties
res/fonts/mathfontCMSY10.properties
res/fonts/mathfontMath1.properties
res/fonts/mathfontMath2.properties
res/fonts/mathfontMath4.properties
res/fonts/mathfontMTExtra.properties
res/fonts/mathfontPUA.properties
res/fonts/mathfontSymbol.properties
components/libucvmath.dylib
; p3p
components/libp3p.dylib

View File

@@ -63,7 +63,7 @@
#include "prprf.h" // For PR_snprintf()
#include "nsIDOMWindow.h"
#include "nsIDialogParamBlock.h"
#include "nsINonBlockingAlertService.h"
#include "nsIWindowWatcher.h"
#include "nsIStringBundle.h"
#include "nsDoubleHashtable.h"
@@ -168,30 +168,15 @@ AlertMissingFonts(nsString& aMissingFonts)
if (!wwatch)
return;
nsCOMPtr<nsIDialogParamBlock> paramBlock(do_CreateInstance(NS_DIALOGPARAMBLOCK_CONTRACTID));
if (!paramBlock)
return;
// copied from nsICommonDialogs.idl which curiously isn't part of the build
// (mozilla/xpfe/appshell/public/nsICommonDialogs.idl)
enum {eMsg=0, eCheckboxMsg=1, eIconClass=2, eTitleMessage=3, eEditfield1Msg=4,
eEditfield2Msg=5, eEditfield1Value=6, eEditfield2Value=7, eButton0Text=8,
eButton1Text=9, eButton2Text=10, eButton3Text=11,eDialogTitle=12};
enum {eButtonPressed=0, eCheckboxState=1, eNumberButtons=2, eNumberEditfields=3,
eEditField1Password=4};
paramBlock->SetInt(eNumberButtons, 1);
paramBlock->SetString(eIconClass, NS_LITERAL_STRING("alert-icon").get());
paramBlock->SetString(eDialogTitle, title.get());
paramBlock->SetString(eMsg, message.get());
nsCOMPtr<nsIDOMWindow> parent;
wwatch->GetActiveWindow(getter_AddRefs(parent));
nsresult rv;
nsCOMPtr<nsINonBlockingAlertService> prompter =
do_GetService("@mozilla.org/embedcomp/nbalert-service;1", &rv);
nsCOMPtr<nsIDOMWindow> dialog;
wwatch->OpenWindow(parent, "chrome://global/content/commonDialog.xul", "_blank",
"dependent,centerscreen,chrome,titlebar", paramBlock,
getter_AddRefs(dialog));
if (prompter && parent) {
prompter->ShowNonBlockingAlert(parent, title.get(), message.get());
}
}
// helper to trim off comments from data in a MathFont Property File