diff --git a/Tests/LibWeb/Layout/expected/justify-content-flex-start.txt b/Tests/LibWeb/Layout/expected/justify-content-flex-start.txt new file mode 100644 index 00000000000..1b2886c8857 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/justify-content-flex-start.txt @@ -0,0 +1,74 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer at (0,0) content-size 800x216 [BFC] children: not-inline + BlockContainer at (8,8) content-size 784x200 children: not-inline + Box at (8,8) content-size 784x200 [GFC] children: not-inline + BlockContainer <(anonymous)> (not painted) [BFC] children: inline + TextNode <#text> + Box at (8,8) content-size 100x100 flex-container(row) [FFC] children: not-inline + BlockContainer <(anonymous)> at (54.828125,49.5) content-size 6.34375x17 flex-item [BFC] children: inline + frag 0 from TextNode start: 0, length: 1, rect: [54.828125,49.5 6.34375x17] baseline: 13.296875 + "1" + TextNode <#text> + BlockContainer <(anonymous)> (not painted) [BFC] children: inline + TextNode <#text> + Box at (108,8) content-size 100x100 flex-container(row) [FFC] children: not-inline + BlockContainer <(anonymous)> at (153.59375,49.5) content-size 8.8125x17 flex-item [BFC] children: inline + frag 0 from TextNode start: 0, length: 1, rect: [153.59375,49.5 8.8125x17] baseline: 13.296875 + "2" + TextNode <#text> + BlockContainer <(anonymous)> (not painted) [BFC] children: inline + TextNode <#text> + Box at (208,8) content-size 100x100 flex-container(row) [FFC] children: not-inline + BlockContainer <(anonymous)> at (253.453125,49.5) content-size 9.09375x17 flex-item [BFC] children: inline + frag 0 from TextNode start: 0, length: 1, rect: [253.453125,49.5 9.09375x17] baseline: 13.296875 + "3" + TextNode <#text> + BlockContainer <(anonymous)> (not painted) [BFC] children: inline + TextNode <#text> + Box at (8,108) content-size 100x100 flex-container(row) [FFC] children: not-inline + BlockContainer <(anonymous)> at (54.125,149.5) content-size 7.75x17 flex-item [BFC] children: inline + frag 0 from TextNode start: 0, length: 1, rect: [54.125,149.5 7.75x17] baseline: 13.296875 + "4" + TextNode <#text> + BlockContainer <(anonymous)> (not painted) [BFC] children: inline + TextNode <#text> + Box at (108,108) content-size 100x100 flex-container(row) [FFC] children: not-inline + BlockContainer <(anonymous)> at (153.765625,149.5) content-size 8.453125x17 flex-item [BFC] children: inline + frag 0 from TextNode start: 0, length: 1, rect: [153.765625,149.5 8.453125x17] baseline: 13.296875 + "5" + TextNode <#text> + BlockContainer <(anonymous)> (not painted) [BFC] children: inline + TextNode <#text> + Box at (208,108) content-size 100x100 flex-container(row) [FFC] children: not-inline + BlockContainer <(anonymous)> at (253.625,149.5) content-size 8.734375x17 flex-item [BFC] children: inline + frag 0 from TextNode start: 0, length: 1, rect: [253.625,149.5 8.734375x17] baseline: 13.296875 + "6" + TextNode <#text> + BlockContainer <(anonymous)> (not painted) [BFC] children: inline + TextNode <#text> + BlockContainer <(anonymous)> at (8,208) content-size 784x0 children: inline + TextNode <#text> + +ViewportPaintable (Viewport<#document>) [0,0 800x600] + PaintableWithLines (BlockContainer) [0,0 800x216] + PaintableWithLines (BlockContainer) [8,8 784x200] + PaintableBox (Box
.grid-container) [8,8 784x200] + PaintableBox (Box
.grid-item) [8,8 100x100] + PaintableWithLines (BlockContainer(anonymous)) [54.828125,49.5 6.34375x17] + TextPaintable (TextNode<#text>) + PaintableBox (Box
.grid-item) [108,8 100x100] + PaintableWithLines (BlockContainer(anonymous)) [153.59375,49.5 8.8125x17] + TextPaintable (TextNode<#text>) + PaintableBox (Box
.grid-item) [208,8 100x100] + PaintableWithLines (BlockContainer(anonymous)) [253.453125,49.5 9.09375x17] + TextPaintable (TextNode<#text>) + PaintableBox (Box
.grid-item) [8,108 100x100] + PaintableWithLines (BlockContainer(anonymous)) [54.125,149.5 7.75x17] + TextPaintable (TextNode<#text>) + PaintableBox (Box
.grid-item) [108,108 100x100] + PaintableWithLines (BlockContainer(anonymous)) [153.765625,149.5 8.453125x17] + TextPaintable (TextNode<#text>) + PaintableBox (Box
.grid-item) [208,108 100x100] + PaintableWithLines (BlockContainer(anonymous)) [253.625,149.5 8.734375x17] + TextPaintable (TextNode<#text>) + PaintableWithLines (BlockContainer(anonymous)) [8,208 784x0] diff --git a/Tests/LibWeb/Layout/input/justify-content-flex-start.html b/Tests/LibWeb/Layout/input/justify-content-flex-start.html new file mode 100644 index 00000000000..4f32a9a562f --- /dev/null +++ b/Tests/LibWeb/Layout/input/justify-content-flex-start.html @@ -0,0 +1,28 @@ + + +
+
1
+
2
+
3
+
4
+
5
+
6
+
diff --git a/Userland/Libraries/LibWeb/Layout/GridFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/GridFormattingContext.cpp index e2016f0390e..60514e21740 100644 --- a/Userland/Libraries/LibWeb/Layout/GridFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/GridFormattingContext.cpp @@ -19,8 +19,10 @@ static Alignment to_alignment(CSS::JustifyContent value) return Alignment::Start; case CSS::JustifyContent::Right: return Alignment::End; + case CSS::JustifyContent::FlexStart: case CSS::JustifyContent::Start: return Alignment::Start; + case CSS::JustifyContent::FlexEnd: case CSS::JustifyContent::End: return Alignment::End; case CSS::JustifyContent::Center: