mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:47:47 +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:
parent
c9ab9e2c64
commit
ee50a4e060
1 changed files with 4 additions and 2 deletions
|
@ -972,9 +972,11 @@ void StyleComputer::transform_box_type_if_needed(StyleProperties& style, DOM::El
|
||||||
case BoxTypeTransformation::None:
|
case BoxTypeTransformation::None:
|
||||||
break;
|
break;
|
||||||
case BoxTypeTransformation::Blockify:
|
case BoxTypeTransformation::Blockify:
|
||||||
|
if (!display.is_block_outside())
|
||||||
style.set_property(CSS::PropertyID::Display, IdentifierStyleValue::create(CSS::ValueID::Block));
|
style.set_property(CSS::PropertyID::Display, IdentifierStyleValue::create(CSS::ValueID::Block));
|
||||||
break;
|
break;
|
||||||
case BoxTypeTransformation::Inlinify:
|
case BoxTypeTransformation::Inlinify:
|
||||||
|
if (!display.is_inline_outside())
|
||||||
style.set_property(CSS::PropertyID::Display, IdentifierStyleValue::create(CSS::ValueID::Inline));
|
style.set_property(CSS::PropertyID::Display, IdentifierStyleValue::create(CSS::ValueID::Inline));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue