Closed
Bug 304879
Opened 19 years ago
Closed 19 years ago
regression: commonDialog's default button code doesn't work anymore
Categories
(Core :: XUL, defect, P1)
Core
XUL
Tracking
()
RESOLVED
FIXED
mozilla1.8beta4
People
(Reporter: asaf, Assigned: asaf)
References
Details
(Keywords: fixed1.8, regression)
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
Details | Diff | Splinter Review |
commonDialog's default button code doesn't seem to work anymore.
see bug 300227 comment 3
Assignee | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → mozilla1.8beta4
Updated•19 years ago
|
Flags: blocking1.8b4?
Assignee | ||
Comment 1•19 years ago
|
||
Attachment #192861 -
Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #192861 -
Flags: review?(mconnor)
Comment 2•19 years ago
|
||
Should this be "accept"?
if (dButton != "accpet")
Assignee | ||
Comment 3•19 years ago
|
||
yeah, typo.
Comment 4•19 years ago
|
||
Comment on attachment 192861 [details] [diff] [review]
patch (toolkit & xpfe)
> switch (defaultButton) {
> case 3:
>- dButton = document.documentElement.getButton("extra2");
>+ dButton = "extra2";
> break;
> case 2:
>- dButton = document.documentElement.getButton("extra1");
>+ dButton = "extra1";
> break;
> case 1:
>- dButton = document.documentElement.getButton("cancel");
>+ dButton = "cancel";
> break;
> default:
> case 0:
>- dButton = document.documentElement.getButton("accept");
>+ dButton = "accept";
> break;
> }
This switch could probably be simplified into an array lookup
(nsPromptService.cpp only passes values of 0 to 3).
>+ // Set the default button if necessary
>+ if (dButton != "accpet")
I don't see the point of this extra condition, are we really going to affect
the performance of launching a dialog by that much?
Attachment #192861 -
Flags: superreview?(neil.parkwaycc.co.uk) → superreview+
Comment 5•19 years ago
|
||
Comment on attachment 192861 [details] [diff] [review]
patch (toolkit & xpfe)
leaving it as a switch is fine, but the second part should be addressed
Attachment #192861 -
Flags: review?(mconnor) → review+
Assignee | ||
Updated•19 years ago
|
Attachment #192861 -
Flags: approval1.8b4?
Comment 6•19 years ago
|
||
plussing, has patch with r+sr, just needs review, and is a regression
Flags: blocking1.8b4? → blocking1.8b4+
Updated•19 years ago
|
Attachment #192861 -
Flags: approval1.8b4? → approval1.8b4+
Assignee | ||
Comment 7•19 years ago
|
||
Attachment #192861 -
Attachment is obsolete: true
Assignee | ||
Comment 8•19 years ago
|
||
Trunk:
Checking in toolkit/content/commonDialog.js;
/cvsroot/mozilla/toolkit/content/commonDialog.js,v <-- commonDialog.js
new revision: 1.10; previous revision: 1.9
done
Checking in xpfe/global/resources/content/commonDialog.js;
/cvsroot/mozilla/xpfe/global/resources/content/commonDialog.js,v <--
commonDialog.js
new revision: 1.57; previous revision: 1.56
done
1.8 Branch:
Checking in toolkit/content/commonDialog.js;
/cvsroot/mozilla/toolkit/content/commonDialog.js,v <-- commonDialog.js
new revision: 1.9.2.1; previous revision: 1.9
done
Checking in xpfe/global/resources/content/commonDialog.js;
/cvsroot/mozilla/xpfe/global/resources/content/commonDialog.js,v <--
commonDialog.js
new revision: 1.56.8.1; previous revision: 1.56
done
You need to log in
before you can comment on or make changes to this bug.
Description
•