mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 06:35:42 +00:00
cce2e96e58
This patch is bigger than I'd like it to be, but there are a lot of interlocked dependencies and I eventually decided it was easier to just lump it together. The semantics of |showModalDialog|/|window.dialogArguments| (an web-exposed HTML5 feature) and |openDialog|/|window.arguments| (a XUL-proprietary feature) are quite different. The former is essentially a security-checked JSVal, while the latter gets converted into an array. We handled them together in the old world, which led to a lot of confusion and muddled semantics. This patch separates them. This patch also eschews the roundabout resolve hook for dialogArguments in favor of returning them directly from the XPIDL getter. This better matches the behavior in the spec, especially because it allows dialogArguments to live on the outer as they're supposed to, rather than the first inner that happens to end up in the docshell. All in all, this should make this all very straightforward to convert WebIDL when the time comes. The current spec on the origin checks here is pretty fictional, so I've filed https://www.w3.org/Bugs/Public/show_bug.cgi?id=21932 to fix it. This patch should more or less preserve the current security behavior.
27 lines
890 B
Plaintext
27 lines
890 B
Plaintext
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
interface nsIVariant;
|
|
interface nsIArray;
|
|
|
|
[scriptable, uuid(3f4cb2d0-5f7e-44a9-9f4f-370945f8db08)]
|
|
interface nsIDOMModalContentWindow : nsISupports
|
|
{
|
|
/**
|
|
* Readonly attribute containing an arbitrary JS value passed by the
|
|
* code that opened the modal content window. A security check is
|
|
* performed at access time, per spec.
|
|
*/
|
|
readonly attribute nsIVariant dialogArguments;
|
|
|
|
/**
|
|
* The return value that will be returned to the function that
|
|
* opened the modal content window.
|
|
*/
|
|
attribute nsIVariant returnValue;
|
|
};
|