Rewrite handling of pointers to boxes in the DOM tree

This commit is contained in:
Simon Sapin 2020-05-07 08:31:45 +02:00
parent c43ab0c267
commit 3e8623332b
3 changed files with 33 additions and 73 deletions

View file

@ -9,13 +9,8 @@ use crate::flow::BlockLevelBox;
#[derive(Default)]
pub struct LayoutDataForElement {
pub(super) self_box: ArcRefCell<Option<LayoutBox>>,
pub(super) pseudo_elements: Option<Box<PseudoElementBoxes>>,
}
#[derive(Default)]
pub(super) struct PseudoElementBoxes {
pub before: ArcRefCell<Option<LayoutBox>>,
pub after: ArcRefCell<Option<LayoutBox>>,
pub(super) pseudo_before_box: ArcRefCell<Option<LayoutBox>>,
pub(super) pseudo_after_box: ArcRefCell<Option<LayoutBox>>,
}
pub(super) enum LayoutBox {