summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAliaksandr Kalenik <kalenik.aliaksandr@gmail.com>2023-05-28 21:22:48 +0300
committerAndreas Kling <kling@serenityos.org>2023-05-28 21:12:04 +0200
commit94fd17a4678f977218c23f0e9a23897952c1597b (patch)
treeda8a5b0775384fec72ad1871bc00eadb6d286c5a /Userland
parent537256fae2df8df70d0b7df54ee4f3678edb8cf7 (diff)
downloadserenity-94fd17a4678f977218c23f0e9a23897952c1597b.zip
LibWeb: Wrap child text sequences of grid container in anonymous blocks
From spec https://drafts.csswg.org/css-grid/#grid-items: "Each in-flow child of a grid container becomes a grid item, and each child text sequence is wrapped in an anonymous block container grid item." Fixes the problem that text sequences inside grid containers are ignored and not displayed.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp b/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp
index 9b3d88bc7d..21a897269b 100644
--- a/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp
+++ b/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp
@@ -69,7 +69,7 @@ static Layout::Node& insertion_parent_for_inline_node(Layout::NodeWithStyle& lay
if (layout_parent.display().is_inline_outside() && layout_parent.display().is_flow_inside())
return layout_parent;
- if (layout_parent.display().is_flex_inside()) {
+ if (layout_parent.display().is_flex_inside() || layout_parent.display().is_grid_inside()) {
layout_parent.append_child(layout_parent.create_anonymous_wrapper());
return *layout_parent.last_child();
}