Remove sources of panic when laying out an iframe without a nested browsing context.

This commit is contained in:
Alan Jeffrey 2017-09-14 15:53:12 -05:00
parent 6a791cd7f2
commit fbfb9a80b4
6 changed files with 58 additions and 30 deletions

View file

@ -979,12 +979,14 @@ impl<'ln> ThreadSafeLayoutNode for ServoThreadSafeLayoutNode<'ln> {
this.svg_data()
}
fn iframe_browsing_context_id(&self) -> BrowsingContextId {
// Can return None if the iframe has no nested browsing context
fn iframe_browsing_context_id(&self) -> Option<BrowsingContextId> {
let this = unsafe { self.get_jsmanaged() };
this.iframe_browsing_context_id()
}
fn iframe_pipeline_id(&self) -> PipelineId {
// Can return None if the iframe has no nested browsing context
fn iframe_pipeline_id(&self) -> Option<PipelineId> {
let this = unsafe { self.get_jsmanaged() };
this.iframe_pipeline_id()
}