mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-05 15:27:04 +00:00
LibWeb: Don't blockify or inlinify boxes with already-correct type
If something is already a block on the outside, we don't want to overwrite its inside display type.
This commit is contained in:
@@ -972,10 +972,12 @@ void StyleComputer::transform_box_type_if_needed(StyleProperties& style, DOM::El
|
||||
case BoxTypeTransformation::None:
|
||||
break;
|
||||
case BoxTypeTransformation::Blockify:
|
||||
style.set_property(CSS::PropertyID::Display, IdentifierStyleValue::create(CSS::ValueID::Block));
|
||||
if (!display.is_block_outside())
|
||||
style.set_property(CSS::PropertyID::Display, IdentifierStyleValue::create(CSS::ValueID::Block));
|
||||
break;
|
||||
case BoxTypeTransformation::Inlinify:
|
||||
style.set_property(CSS::PropertyID::Display, IdentifierStyleValue::create(CSS::ValueID::Inline));
|
||||
if (!display.is_inline_outside())
|
||||
style.set_property(CSS::PropertyID::Display, IdentifierStyleValue::create(CSS::ValueID::Inline));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user