зеркало из https://github.com/mozilla/gecko-dev.git
Back out bug 1031945 for now because we have silly pref settings on mobile and dumb tests. a=orange
This commit is contained in:
Родитель
d8c0b17d7d
Коммит
153c7d3082
|
@ -4365,21 +4365,6 @@ nsGlobalWindow::IsChromeWindow(JSContext* aCx, JSObject* aObj)
|
|||
return xpc::WindowOrNull(aObj)->IsChromeWindow();
|
||||
}
|
||||
|
||||
/* static */ bool
|
||||
nsGlobalWindow::IsShowModalDialogEnabled(JSContext*, JSObject*)
|
||||
{
|
||||
static bool sAddedPrefCache = false;
|
||||
static bool sIsDisabled;
|
||||
static const char sShowModalDialogPref[] = "dom.disable_window_showModalDialog";
|
||||
|
||||
if (!sAddedPrefCache) {
|
||||
Preferences::AddBoolVarCache(&sIsDisabled, sShowModalDialogPref, false);
|
||||
sAddedPrefCache = true;
|
||||
}
|
||||
|
||||
return !sIsDisabled;
|
||||
}
|
||||
|
||||
nsIDOMOfflineResourceList*
|
||||
nsGlobalWindow::GetApplicationCache(ErrorResult& aError)
|
||||
{
|
||||
|
@ -9136,7 +9121,7 @@ nsGlobalWindow::ShowModalDialog(const nsAString& aUrl, nsIVariant* aArgument,
|
|||
(aUrl, aArgument, aOptions, aError), aError,
|
||||
nullptr);
|
||||
|
||||
if (!IsShowModalDialogEnabled()) {
|
||||
if (Preferences::GetBool("dom.disable_window_showModalDialog", false)) {
|
||||
aError.Throw(NS_ERROR_NOT_AVAILABLE);
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -512,9 +512,6 @@ public:
|
|||
|
||||
static bool IsChromeWindow(JSContext* /* unused */, JSObject* aObj);
|
||||
|
||||
static bool IsShowModalDialogEnabled(JSContext* /* unused */ = nullptr,
|
||||
JSObject* /* unused */ = nullptr);
|
||||
|
||||
bool DoNewResolve(JSContext* aCx, JS::Handle<JSObject*> aObj,
|
||||
JS::Handle<jsid> aId,
|
||||
JS::MutableHandle<JSPropertyDescriptor> aDesc);
|
||||
|
|
|
@ -79,8 +79,7 @@ typedef any Transferable;
|
|||
[Throws] DOMString? prompt(optional DOMString message = "", optional DOMString default = "");
|
||||
[Throws] void print();
|
||||
//[Throws] any showModalDialog(DOMString url, optional any argument);
|
||||
[Throws, Func="nsGlobalWindow::IsShowModalDialogEnabled"]
|
||||
any showModalDialog(DOMString url, optional any argument, optional DOMString options = "");
|
||||
[Throws] any showModalDialog(DOMString url, optional any argument, optional DOMString options = "");
|
||||
|
||||
[Throws, CrossOriginCallable] void postMessage(any message, DOMString targetOrigin, optional sequence<Transferable> transfer);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче