Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that grandchild same-origin iframes are added to the children … #8978

Merged
merged 1 commit into from Dec 15, 2015
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Ensure that grandchild same-origin iframes are added to the children …

…of the child iframe of the root. Resolves #8973.
  • Loading branch information
jdm committed Dec 14, 2015
commit 397d748f9d2c8f8b132dd7a922307ae92c2cc557
@@ -1594,7 +1594,8 @@ impl ScriptTask {
let parent_page = self.root_page();
// TODO(gw): This find will fail when we are sharing script tasks
// between cross origin iframes in the same TLD.
parent_page.find(parent).expect("received load for subpage with missing parent");
let parent_page = parent_page.find(parent)
.expect("received load for subpage with missing parent");
parent_page.children.borrow_mut().push(page.clone());
}

@@ -5637,6 +5637,12 @@
"url": "/_mozilla/mozilla/iframe_contentDocument.html"
}
],
"mozilla/iframe_hierarchy.html": [
{
"path": "mozilla/iframe_hierarchy.html",
"url": "/_mozilla/mozilla/iframe_hierarchy.html"
}
],
"mozilla/img_width_height.html": [
{
"path": "mozilla/img_width_height.html",
@@ -0,0 +1 @@
foo
@@ -0,0 +1,18 @@
<!doctype html>
<meta charset="utf-8">
<title></title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<iframe src="iframe_parent1.html"></iframe>
<script>
var t = async_test("iframe content hierarchy is correct");
function do_test() {
console.log("whee");
t.step(function() {
var doc = document.getElementsByTagName("iframe")[0].contentDocument;
doc = doc.getElementsByTagName("iframe")[0].contentDocument;
assert_equals(doc.body.firstChild.textContent, "foo");
t.done();
});
}
</script>
@@ -0,0 +1 @@
<iframe src="iframe_child1.html" onload="parent.do_test()"></iframe>
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.