mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
import changes from rmottola/Arctic-Fox:
- Bug 1129223 - Remove local mozAfterRemotePaint events (a9aec8f51) - override -> MOZ_OVERRIDE (2de5b532c) - Bug 1129223 - Introduce new, more efficient mozLayerTreeReady event (9a363c950) - Bug 963921 - Clients of the JS API should use JS_DefineElement where appropriate (912f064c0) - Bug 1133746. Allow DOMProxyShadows to communicate to the JIT whether the shadowing is done by the expando object or not. (dbe537f12)
This commit is contained in:
@@ -19,6 +19,13 @@ namespace dom {
|
||||
static bool
|
||||
ShouldExposeChildWindow(nsString& aNameBeingResolved, nsIDOMWindow *aChild)
|
||||
{
|
||||
nsCOMPtr<nsPIDOMWindow> piWin = do_QueryInterface(aChild);
|
||||
NS_ENSURE_TRUE(piWin, false);
|
||||
Element* e = piWin->GetFrameElementInternal();
|
||||
if (e && e->IsInShadowTree()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If we're same-origin with the child, go ahead and expose it.
|
||||
nsCOMPtr<nsIScriptObjectPrincipal> sop = do_QueryInterface(aChild);
|
||||
NS_ENSURE_TRUE(sop, false);
|
||||
@@ -63,9 +70,6 @@ ShouldExposeChildWindow(nsString& aNameBeingResolved, nsIDOMWindow *aChild)
|
||||
// allow the child to arbitrarily pollute the parent namespace, and requires
|
||||
// cross-origin communication only in a limited set of cases that can be
|
||||
// computed independently by the parent.
|
||||
nsCOMPtr<nsPIDOMWindow> piWin = do_QueryInterface(aChild);
|
||||
NS_ENSURE_TRUE(piWin, false);
|
||||
Element* e = piWin->GetFrameElementInternal();
|
||||
return e && e->AttrValueIs(kNameSpaceID_None, nsGkAtoms::name,
|
||||
aNameBeingResolved, eCaseMatters);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user