layout: Refactor InlineFormattingContextBuilder::is_empty (#39048)

This method could iterate all the items in the inline formatting context
that was being created. This patch turns it into a field, replacing
`has_uncollapsible_text_content` (so this doesn't increase memory).

Testing: Not needed, no behavior change

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2025-08-31 02:50:00 +02:00 committed by GitHub
parent a586f4b53f
commit ec1b9b2480
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 23 additions and 43 deletions

View file

@ -588,7 +588,7 @@ impl<'dom> BlockContainerBuilder<'dom, '_> {
box_slot: BoxSlot<'dom>,
) {
if let Some(builder) = self.inline_formatting_context_builder.as_mut() {
if !builder.is_empty() {
if !builder.is_empty {
let constructor = || {
ArcRefCell::new(AbsolutelyPositionedBox::construct(
self.context,
@ -625,7 +625,7 @@ impl<'dom> BlockContainerBuilder<'dom, '_> {
box_slot: BoxSlot<'dom>,
) {
if let Some(builder) = self.inline_formatting_context_builder.as_mut() {
if !builder.is_empty() {
if !builder.is_empty {
let constructor = || {
ArcRefCell::new(FloatBox::construct(
self.context,