Bug 755320 - Make <iframe remote=true> work (the remote part should be ignored; it's just a normal iframe). r=smaug

This commit is contained in:
Justin Lebar 2012-05-16 01:28:57 -04:00
parent b2be544813
commit 4630305068
3 changed files with 36 additions and 1 deletions

View File

@ -1408,7 +1408,11 @@ nsFrameLoader::ShouldUseRemoteProcess()
return Preferences::GetBool("dom.ipc.browser_frames.oop_by_default", false);
}
return mOwnerContent->AttrValueIs(kNameSpaceID_None,
// Otherwise, we're remote if we have "remote=true" and we're either a
// browser frame or a XUL element.
return (OwnerIsBrowserFrame() ||
mOwnerContent->GetNameSpaceID() == kNameSpaceID_XUL) &&
mOwnerContent->AttrValueIs(kNameSpaceID_None,
nsGkAtoms::Remote,
nsGkAtoms::_true,
eCaseMatters);

View File

@ -161,6 +161,7 @@ _TEST_FILES = \
utils_bug743615.js \
worker_bug743615.js \
test_bug750051.html \
test_bug755320.html \
$(NULL)
libs:: $(_TEST_FILES)

View File

@ -0,0 +1,30 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=755320
-->
<head>
<title>Test for Bug 755320</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=755320">Mozilla Bug 755320</a>
<script type="text/javascript">
/** Test for Bug 755320 **/
SimpleTest.waitForExplicitFinish();
function finish() {
ok(true, "Got onload for iframe.");
SimpleTest.finish();
}
</script>
<!-- remote="true" should be ignored on vanilla iframes. -->
<iframe remote="true" onload='finish()' src="data:text/html,It worked."></iframe>
</body>
</html>