Closed Bug 1031945 Opened 10 years ago Closed 10 years ago

The "dom.disable_window_showModalDialog" preference should hide window.showModalDialog

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: emk, Assigned: bzbarsky)

References

Details

Attachments

(2 files)

See bug 981796 comment #4.
This bug should be trivial because bug 789261 is alreay fixed.
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Comment on attachment 8460749 [details] [diff] [review]
Don't expose showModalDialog on Window if it's preffed off


>-  if (Preferences::GetBool("dom.disable_window_showModalDialog", false)) {
>+  if (Preferences::GetBool(sShowModalDialogPref, false)) {
Why not use !IsShowModalDialogEnabled(nullptr, nullptr) here
Attachment #8460749 - Flags: review?(bugs) → review+
> Why not use !IsShowModalDialogEnabled(nullptr, nullptr) here

Good idea,  Done, but I made the args default to nullptr, so:

  if (!IsShowModalDialogEnabled()) {
https://hg.mozilla.org/integration/mozilla-inbound/rev/f1224e8676b1
Flags: in-testsuite?
Target Milestone: --- → mozilla34
And backed out: https://hg.mozilla.org/integration/mozilla-inbound/rev/c1354624b6fe

Android and b2g set this pref.  This causes two test failures:

Two issues:

1) js/src/tests/js1_5/Regress/regress-328897.js is a broken-ass test that uses showModalDialog to trigger an exception, and now it's getting the wrong exception.  It's also almost certainly no longer testing what it meant to be testing; I'll look into just removing it.

2) dom/imptests/html/html/browsers/the-window-object/test_window-properties.html expects this method to be there.  Can we just fix that?  ;)
Flags: needinfo?(Ms2ger)
Whiteboard: [leave open]
Flags: needinfo?(bzbarsky)
Flags: needinfo?(Ms2ger)
Whiteboard: [leave open]
https://hg.mozilla.org/mozilla-central/rev/3631c6245ed4
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: