mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Import victor's layout system 🍷
This commit is contained in:
parent
86904757e6
commit
4444c5a2ad
25 changed files with 1270 additions and 712 deletions
|
@ -2,17 +2,21 @@
|
|||
* 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/. */
|
||||
|
||||
use crate::element_data::LayoutDataForElement;
|
||||
use atomic_refcell::AtomicRefCell;
|
||||
use script_layout_interface::StyleData;
|
||||
|
||||
#[repr(C)]
|
||||
pub struct StyleAndLayoutData {
|
||||
pub style_data: StyleData,
|
||||
pub(super) layout_data: AtomicRefCell<LayoutDataForElement>,
|
||||
}
|
||||
|
||||
impl StyleAndLayoutData {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
style_data: StyleData::new(),
|
||||
layout_data: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue