diff options
author | Martin Robinson <mrobinson@igalia.com> | 2023-05-08 11:46:17 +0200 |
---|---|---|
committer | Martin Robinson <mrobinson@igalia.com> | 2023-05-13 11:52:59 +0200 |
commit | 72b5fcd0b69201bd5cda125821dd90555490b45d (patch) | |
tree | 0adae6d50cdbb3f7bb7a4d2780267525fc42e2ff /components/layout_2020/wrapper.rs | |
parent | ab4bd2a13347819210728e48cefb1e8c194d9138 (diff) | |
download | servo-72b5fcd0b69201bd5cda125821dd90555490b45d.tar.gz servo-72b5fcd0b69201bd5cda125821dd90555490b45d.zip |
Combine DOM-related concepts in Layout 2020 into dom.rs
Diffstat (limited to 'components/layout_2020/wrapper.rs')
-rw-r--r-- | components/layout_2020/wrapper.rs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/components/layout_2020/wrapper.rs b/components/layout_2020/wrapper.rs deleted file mode 100644 index 635889dc92e..00000000000 --- a/components/layout_2020/wrapper.rs +++ /dev/null @@ -1,25 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ - -#![allow(unsafe_code)] - -use crate::data::StyleAndLayoutData; -use script_layout_interface::wrapper_traits::GetStyleAndOpaqueLayoutData; - -pub trait GetStyleAndLayoutData<'dom> { - fn get_style_and_layout_data(self) -> Option<StyleAndLayoutData<'dom>>; -} - -impl<'dom, T> GetStyleAndLayoutData<'dom> for T -where - T: GetStyleAndOpaqueLayoutData<'dom>, -{ - fn get_style_and_layout_data(self) -> Option<StyleAndLayoutData<'dom>> { - self.get_style_and_opaque_layout_data() - .map(|data| StyleAndLayoutData { - style_data: &data.style_data, - layout_data: data.generic_data.downcast_ref().unwrap(), - }) - } -} |