layout: Add incremental box tree construction for table caption (#37849)

This change extends incremental box tree updates to table captions. In
addition, calls to `LayoutBox::invalidate_cached_fragment()` are moved
to the damage calculation traversal.

Testing: This should not change observable behavior and is thus covered
by existing WPT tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Martin Robinson 2025-07-03 12:32:05 +02:00 committed by GitHub
parent 00472dec8e
commit 82f7f761d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 37 additions and 14 deletions

View file

@ -180,6 +180,10 @@ impl BoxSlot<'_> {
*slot.borrow_mut() = Some(box_);
}
}
pub(crate) fn take_layout_box(&self) -> Option<LayoutBox> {
self.slot.as_ref().and_then(|slot| slot.borrow_mut().take())
}
}
impl Drop for BoxSlot<'_> {