mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Remove sources of panic when laying out an iframe without a nested browsing context.
This commit is contained in:
parent
6a791cd7f2
commit
fbfb9a80b4
6 changed files with 58 additions and 30 deletions
|
@ -1021,8 +1021,8 @@ pub trait LayoutNodeHelpers {
|
|||
fn image_url(&self) -> Option<ServoUrl>;
|
||||
fn canvas_data(&self) -> Option<HTMLCanvasData>;
|
||||
fn svg_data(&self) -> Option<SVGSVGData>;
|
||||
fn iframe_browsing_context_id(&self) -> BrowsingContextId;
|
||||
fn iframe_pipeline_id(&self) -> PipelineId;
|
||||
fn iframe_browsing_context_id(&self) -> Option<BrowsingContextId>;
|
||||
fn iframe_pipeline_id(&self) -> Option<PipelineId>;
|
||||
fn opaque(&self) -> OpaqueNode;
|
||||
}
|
||||
|
||||
|
@ -1172,16 +1172,16 @@ impl LayoutNodeHelpers for LayoutJS<Node> {
|
|||
.map(|svg| svg.data())
|
||||
}
|
||||
|
||||
fn iframe_browsing_context_id(&self) -> BrowsingContextId {
|
||||
fn iframe_browsing_context_id(&self) -> Option<BrowsingContextId> {
|
||||
let iframe_element = self.downcast::<HTMLIFrameElement>()
|
||||
.expect("not an iframe element!");
|
||||
iframe_element.browsing_context_id().unwrap()
|
||||
iframe_element.browsing_context_id()
|
||||
}
|
||||
|
||||
fn iframe_pipeline_id(&self) -> PipelineId {
|
||||
fn iframe_pipeline_id(&self) -> Option<PipelineId> {
|
||||
let iframe_element = self.downcast::<HTMLIFrameElement>()
|
||||
.expect("not an iframe element!");
|
||||
iframe_element.pipeline_id().unwrap()
|
||||
iframe_element.pipeline_id()
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue