mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:08:11 +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,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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue