diff options
Diffstat (limited to 'components/script/dom/htmliframeelement.rs')
-rw-r--r-- | components/script/dom/htmliframeelement.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs index 42f5a8e17e7..59dc8673418 100644 --- a/components/script/dom/htmliframeelement.rs +++ b/components/script/dom/htmliframeelement.rs @@ -36,7 +36,6 @@ use layout_interface::ReflowQueryType; use msg::constellation_msg::{ConstellationChan, LoadData}; use msg::constellation_msg::{NavigationDirection, PipelineId, SubpageId}; use net_traits::response::HttpsState; -use page::IterablePage; use script_traits::IFrameSandboxState::{IFrameSandboxed, IFrameUnsandboxed}; use script_traits::{IFrameLoadInfo, MozBrowserEvent, ScriptMsg as ConstellationMsg}; use std::ascii::AsciiExt; @@ -418,11 +417,8 @@ impl HTMLIFrameElementMethods for HTMLIFrameElement { self.subpage_id.get().and_then(|subpage_id| { let window = window_from_node(self); let window = window.r(); - let children = window.page().children.borrow(); - children.iter().find(|page| { - let window = page.window(); - window.subpage() == Some(subpage_id) - }).map(|page| page.window()) + let browsing_context = window.browsing_context(); + browsing_context.find_child_by_subpage(subpage_id) }) } |