mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Add support for <iframe> elements for Layout 2020
This change adds support for the <iframe> element to Layout 2020. In addition, certain aspects of the implementation are made the same between both layout systems.
This commit is contained in:
parent
e09acf88f4
commit
9e0b41ebc4
38 changed files with 281 additions and 164 deletions
|
@ -1541,17 +1541,13 @@ impl<'dom> LayoutNodeHelpers<'dom> for LayoutDom<'dom, Node> {
|
|||
}
|
||||
|
||||
fn iframe_browsing_context_id(self) -> Option<BrowsingContextId> {
|
||||
let iframe_element = self
|
||||
.downcast::<HTMLIFrameElement>()
|
||||
.expect("not an iframe element!");
|
||||
iframe_element.browsing_context_id()
|
||||
self.downcast::<HTMLIFrameElement>()
|
||||
.map_or(None, |iframe_element| iframe_element.browsing_context_id())
|
||||
}
|
||||
|
||||
fn iframe_pipeline_id(self) -> Option<PipelineId> {
|
||||
let iframe_element = self
|
||||
.downcast::<HTMLIFrameElement>()
|
||||
.expect("not an iframe element!");
|
||||
iframe_element.pipeline_id()
|
||||
self.downcast::<HTMLIFrameElement>()
|
||||
.map_or(None, |iframe_element| iframe_element.pipeline_id())
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue