diff --git a/Base/res/html/misc/display-grid.html b/Base/res/html/misc/display-grid.html index eb7a33af17..fcf9c9d116 100644 --- a/Base/res/html/misc/display-grid.html +++ b/Base/res/html/misc/display-grid.html @@ -46,15 +46,18 @@
1
2
3
+
6
- +

If you can see this message then the test passed.

-
1
-
2
-
3
-
4
+
2
+
3
+
4
+
5
+
1
+
6
diff --git a/Userland/Libraries/LibWeb/Layout/GridFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/GridFormattingContext.cpp index 7b607cd0fd..f41e0ecf5c 100644 --- a/Userland/Libraries/LibWeb/Layout/GridFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/GridFormattingContext.cpp @@ -251,6 +251,9 @@ void GridFormattingContext::run(Box const& box, LayoutMode, AvailableSpace const if (row_start != row_end) row_span = row_end - row_start; } + // FIXME: Have yet to find the spec for this. + if (!child_box.computed_values().grid_row_start().is_position() && child_box.computed_values().grid_row_end().is_position() && row_end == 1) + row_start = 1; // If the placement contains two spans, remove the one contributed by the end grid-placement // property. @@ -361,6 +364,9 @@ void GridFormattingContext::run(Box const& box, LayoutMode, AvailableSpace const if (column_start < 0) column_start = 1; } + // FIXME: Have yet to find the spec for this. + if (!child_box.computed_values().grid_column_start().is_position() && child_box.computed_values().grid_column_end().is_position() && column_end == 1) + column_start = 1; // If a name is given as a , only lines with that name are counted. If not enough // lines with that name exist, all implicit grid lines on the side of the explicit grid