r=danm, sr=dveditz
Extend ConfirmEx to allow setting the default button - change default button for script security to no
This commit is contained in:
mkaply@us.ibm.com
2004-05-24 13:33:51 +00:00
parent 85038f438f
commit b8b7f54ae4
6 changed files with 34 additions and 6 deletions

View File

@@ -287,7 +287,10 @@ nsPromptService::ConfirmEx(nsIDOMWindow *parent,
int buttonIDs[] = { eButton0Text, eButton1Text, eButton2Text };
const PRUnichar* buttonStrings[] = { button0Title, button1Title, button2Title };
#define BUTTON_DEFAULT_MASK 0x03000000
block->SetInt(eDefaultButton, (buttonFlags & BUTTON_DEFAULT_MASK) >> 24);
PRInt32 numberButtons = 0;
for (int i = 0; i < 3; i++) {