Implement HTMLIFrameElement::pipeline_id on LayoutJS<HTMLIFrameElement>.

This commit is contained in:
Ms2ger 2015-10-08 11:00:56 +02:00
parent 26dd123310
commit 25c19f77af
2 changed files with 14 additions and 4 deletions

View file

@ -1014,10 +1014,11 @@ impl<'ln> ThreadSafeLayoutNode<'ln> {
/// If this node is an iframe element, returns its pipeline ID. If this node is
/// not an iframe element, fails.
pub fn iframe_pipeline_id(&self) -> PipelineId {
use script::dom::htmliframeelement::HTMLIFrameElementLayoutMethods;
unsafe {
let iframe_element = HTMLIFrameElementCast::to_layout_js(self.get_jsmanaged())
.expect("not an iframe element!");
(*iframe_element.unsafe_get()).pipeline_id().unwrap()
iframe_element.pipeline_id().unwrap()
}
}
}