layout: Store shared styles for table backgrounds in SharedBackgroundStyle (#36893)

Table cells share background styles with their track and track group
boxes. When a track and track group style is repaired, this new data
structure will allow reparing the style of the cell `Fragment`s without
having to lay the table out again or walk through `Fragment`s and
individually repair their background styles.

Testing: This doesn't change behavior and is thus tested 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-05-07 13:44:59 +02:00 committed by GitHub
parent 68a76baea3
commit 348eede37b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 38 additions and 10 deletions

View file

@ -1020,7 +1020,7 @@ impl<'a> BuilderForBoxFragment<'a> {
for extra_background in extra_backgrounds {
let positioning_area = extra_background.rect;
let painter = BackgroundPainter {
style: &extra_background.style,
style: &extra_background.style.borrow_mut().0,
painting_area_override: None,
positioning_area_override: Some(
positioning_area