diff --git a/components/script/script_task.rs b/components/script/script_task.rs index 3c54259fc3e..84c9629ff86 100644 --- a/components/script/script_task.rs +++ b/components/script/script_task.rs @@ -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()); } diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index cfa25fec76d..103ccf657ae 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -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", diff --git a/tests/wpt/mozilla/tests/mozilla/iframe_child1.html b/tests/wpt/mozilla/tests/mozilla/iframe_child1.html new file mode 100644 index 00000000000..257cc5642cb --- /dev/null +++ b/tests/wpt/mozilla/tests/mozilla/iframe_child1.html @@ -0,0 +1 @@ +foo diff --git a/tests/wpt/mozilla/tests/mozilla/iframe_hierarchy.html b/tests/wpt/mozilla/tests/mozilla/iframe_hierarchy.html new file mode 100644 index 00000000000..88ec28c229e --- /dev/null +++ b/tests/wpt/mozilla/tests/mozilla/iframe_hierarchy.html @@ -0,0 +1,18 @@ + + + + + + + diff --git a/tests/wpt/mozilla/tests/mozilla/iframe_parent1.html b/tests/wpt/mozilla/tests/mozilla/iframe_parent1.html new file mode 100644 index 00000000000..146f5b7d529 --- /dev/null +++ b/tests/wpt/mozilla/tests/mozilla/iframe_parent1.html @@ -0,0 +1 @@ +