Auto merge of #7925 - Ms2ger:iframe-pipeline-layout, r=glennw

Implement HTMLIFrameElement::pipeline_id on LayoutJS<HTMLIFrameElement>.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7925)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-10-09 09:49:08 -06:00
commit 12139f73ef
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()
}
}
}