summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorEmil Militzer <emil.militzer@posteo.de>2023-04-26 21:08:48 +0200
committerAndreas Kling <kling@serenityos.org>2023-05-02 20:27:28 +0200
commitfe40a7b664bf8726a0f0ece4cd0c151d6f6dd3fc (patch)
tree78f04423484e04118555d7b41cb585b775168839 /Userland
parent31e1be04380663d4034808f6e83c6a120f47d1bf (diff)
downloadserenity-fe40a7b664bf8726a0f0ece4cd0c151d6f6dd3fc.zip
LibWeb: Only change inside value during blockification
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleComputer.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp
index 5ffa6f072e..301dcedc88 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp
+++ b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp
@@ -1487,18 +1487,12 @@ void StyleComputer::transform_box_type_if_needed(StyleProperties& style, DOM::El
break;
case BoxTypeTransformation::Blockify:
if (!display.is_block_outside()) {
- // FIXME: We only want to change the outer display type here, but we don't have a nice API
- // to do that specifically. For now, we simply check for "inline-flex" and convert
- // that to "flex".
- if (display.is_flex_inside())
- style.set_property(CSS::PropertyID::Display, DisplayStyleValue::create({ CSS::Display::Outside::Block, CSS::Display::Inside::Flex }));
- else
- style.set_property(CSS::PropertyID::Display, DisplayStyleValue::create({ CSS::Display::Outside::Block, CSS::Display::Inside::Block }));
+ style.set_property(CSS::PropertyID::Display, DisplayStyleValue::create({ CSS::Display::Outside::Block, display.inside(), display.list_item() }));
}
break;
case BoxTypeTransformation::Inlinify:
if (!display.is_inline_outside())
- style.set_property(CSS::PropertyID::Display, DisplayStyleValue::create({ CSS::Display::Outside::Inline, CSS::Display::Inside::Flow }));
+ style.set_property(CSS::PropertyID::Display, DisplayStyleValue::create({ CSS::Display::Outside::Inline, display.inside(), display.list_item() }));
break;
}
}