mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
layout: Add incremental box tree construction for table cell (#37850)
This change extends incremental box tree updates to table cells. In addition, for simplicity this refactors `BoxSlot::take_layout_box()` into `BoxSlot::take_layout_box_if_undamaged()`. Testing: This should not change observable behavior and is thus covered by existing WPT tests. Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
06cc4bdae7
commit
d33d057763
2 changed files with 54 additions and 45 deletions
|
@ -181,7 +181,10 @@ impl BoxSlot<'_> {
|
|||
}
|
||||
}
|
||||
|
||||
pub(crate) fn take_layout_box(&self) -> Option<LayoutBox> {
|
||||
pub(crate) fn take_layout_box_if_undamaged(&self, damage: LayoutDamage) -> Option<LayoutBox> {
|
||||
if damage.has_box_damage() {
|
||||
return None;
|
||||
}
|
||||
self.slot.as_ref().and_then(|slot| slot.borrow_mut().take())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue