layout: Cache content block size contributions (#33964)

This is the first part of caching intermediary layout during flexbox
layout. A later change will try to reuse these layouts, when possible,
for actual item layout and re-layout due to stretching.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Martin Robinson 2024-10-22 07:43:53 -07:00 committed by GitHub
parent 7015e0fb5f
commit 01c9ecfe01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 57 additions and 10 deletions

View file

@ -181,6 +181,7 @@ where
independent_formatting_context: IndependentFormattingContext::NonReplaced(
non_replaced,
),
cached_layout: Default::default(),
})))
},
FlexLevelJob::Element {
@ -212,6 +213,7 @@ where
contents,
self.text_decoration_line,
),
cached_layout: Default::default(),
}))
};
box_slot.set(LayoutBox::FlexLevel(box_.clone()));