diff options
author | Anthony Ramine <nox@nox.paris> | 2020-03-26 13:17:46 +0100 |
---|---|---|
committer | Anthony Ramine <nox@nox.paris> | 2020-03-26 13:17:46 +0100 |
commit | 04af32128c10f8a67e8c012e68359169bbb8ef5e (patch) | |
tree | 2091f392710a4a36389b0e98edaf792f5a3e71e9 /components/layout/fragment.rs | |
parent | 2d055cbf6b8114bcc4f941b6f206f8e8014cc31a (diff) | |
download | servo-04af32128c10f8a67e8c012e68359169bbb8ef5e.tar.gz servo-04af32128c10f8a67e8c012e68359169bbb8ef5e.zip |
Add a 'dom lifetime to GetLayoutData
Diffstat (limited to 'components/layout/fragment.rs')
-rw-r--r-- | components/layout/fragment.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/components/layout/fragment.rs b/components/layout/fragment.rs index d074c300e2f..289dc3f3094 100644 --- a/components/layout/fragment.rs +++ b/components/layout/fragment.rs @@ -411,10 +411,10 @@ impl ImageFragmentInfo { /// /// FIXME(pcwalton): The fact that image fragments store the cache in the fragment makes little /// sense to me. - pub fn new<N: ThreadSafeLayoutNode>( + pub fn new<'dom>( url: Option<ServoUrl>, density: Option<f64>, - node: &N, + node: &impl ThreadSafeLayoutNode<'dom>, layout_context: &LayoutContext, ) -> ImageFragmentInfo { // First use any image data present in the element... @@ -488,7 +488,7 @@ pub struct IframeFragmentInfo { impl IframeFragmentInfo { /// Creates the information specific to an iframe fragment. - pub fn new<N: ThreadSafeLayoutNode>(node: &N) -> IframeFragmentInfo { + pub fn new<'dom>(node: &impl ThreadSafeLayoutNode<'dom>) -> IframeFragmentInfo { let browsing_context_id = node.iframe_browsing_context_id(); let pipeline_id = node.iframe_pipeline_id(); IframeFragmentInfo { @@ -642,7 +642,7 @@ pub struct TableColumnFragmentInfo { impl TableColumnFragmentInfo { /// Create the information specific to an table column fragment. - pub fn new<N: ThreadSafeLayoutNode>(node: &N) -> TableColumnFragmentInfo { + pub fn new<'dom>(node: &impl ThreadSafeLayoutNode<'dom>) -> TableColumnFragmentInfo { let element = node.as_element().unwrap(); let span = element .get_attr(&ns!(), &local_name!("span")) @@ -663,8 +663,8 @@ pub struct TruncatedFragmentInfo { impl Fragment { /// Constructs a new `Fragment` instance. - pub fn new<N: ThreadSafeLayoutNode>( - node: &N, + pub fn new<'dom>( + node: &impl ThreadSafeLayoutNode<'dom>, specific: SpecificFragmentInfo, ctx: &LayoutContext, ) -> Fragment { |