mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-31 19:10:36 +00:00
Fixing bug 101492. Making self.close() do nothing when called from within a frame in a frameset (or from an iframe) for backwards compatibility. r=peterv@netscape.com, sr=brendan@mozilla.org
This commit is contained in:
parent
26446d9b36
commit
7e92fb61be
@ -2416,6 +2416,16 @@ GlobalWindowImpl::GetFrames(nsIDOMWindow** aFrames)
|
||||
NS_IMETHODIMP
|
||||
GlobalWindowImpl::Close()
|
||||
{
|
||||
nsCOMPtr<nsIDOMWindow> parent;
|
||||
GetParent(getter_AddRefs(parent));
|
||||
|
||||
if (parent != NS_STATIC_CAST(nsIDOMWindow *, this)) {
|
||||
// window.close() is called on a frame in a frameset, such calls
|
||||
// are ignored.
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Note: the basic security check, rejecting windows not opened through JS,
|
||||
// has been removed. This was approved long ago by ...you're going to call me
|
||||
// on this, aren't you... well it was. And anyway, a better means is coming.
|
||||
|
Loading…
x
Reference in New Issue
Block a user