diff --git a/Libraries/LibWeb/Layout/FormattingContext.cpp b/Libraries/LibWeb/Layout/FormattingContext.cpp index d9e1bea4ff9..55d12250007 100644 --- a/Libraries/LibWeb/Layout/FormattingContext.cpp +++ b/Libraries/LibWeb/Layout/FormattingContext.cpp @@ -362,6 +362,10 @@ CSSPixels FormattingContext::compute_auto_height_for_block_formatting_context_ro // If it has block-level children, the height is the distance between // the top margin-edge of the topmost block-level child box // and the bottom margin-edge of the bottommost block-level child box. + + // NOTE: The top margin edge of the topmost block-level child box is the same as the top content edge of the root box. + top = 0; + root.for_each_child_of_type([&](Layout::Box& child_box) { // Absolutely positioned children are ignored, // and relatively positioned boxes are considered without their offset. @@ -375,12 +379,8 @@ CSSPixels FormattingContext::compute_auto_height_for_block_formatting_context_ro auto const& child_box_state = m_state.get(child_box); - CSSPixels child_box_top = child_box_state.offset.y() - child_box_state.margin_box_top(); CSSPixels child_box_bottom = child_box_state.offset.y() + child_box_state.content_height() + child_box_state.margin_box_bottom(); - if (!top.has_value() || child_box_top < top.value()) - top = child_box_top; - if (!bottom.has_value() || child_box_bottom > bottom.value()) bottom = child_box_bottom; diff --git a/Tests/LibWeb/Layout/expected/anonymous-wrappers-continue-to-inherit-style-after-change.txt b/Tests/LibWeb/Layout/expected/anonymous-wrappers-continue-to-inherit-style-after-change.txt index 5bafdbf9004..3f1d4f84afe 100644 --- a/Tests/LibWeb/Layout/expected/anonymous-wrappers-continue-to-inherit-style-after-change.txt +++ b/Tests/LibWeb/Layout/expected/anonymous-wrappers-continue-to-inherit-style-after-change.txt @@ -1,5 +1,5 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline - BlockContainer at (0,0) content-size 800x89.4375 [BFC] children: not-inline + BlockContainer at (0,0) content-size 800x102.875 [BFC] children: not-inline BlockContainer at (8,21.4375) content-size 784x73.4375 children: not-inline BlockContainer

at (8,21.4375) content-size 784x35 children: inline frag 0 from TextNode start: 0, length: 6, rect: [8,21.4375 105.53125x35] baseline: 27.09375 @@ -11,7 +11,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline TextNode <#text> ViewportPaintable (Viewport<#document>) [0,0 800x600] - PaintableWithLines (BlockContainer) [0,0 800x89.4375] overflow: [0,0 800x94.875] + PaintableWithLines (BlockContainer) [0,0 800x102.875] PaintableWithLines (BlockContainer) [8,21.4375 784x73.4375] PaintableWithLines (BlockContainer

) [8,21.4375 784x35] TextPaintable (TextNode<#text>) diff --git a/Tests/LibWeb/Layout/expected/block-and-inline/bfc-root-auto-height-expands-for-descendants-with-margin-top.txt b/Tests/LibWeb/Layout/expected/block-and-inline/bfc-root-auto-height-expands-for-descendants-with-margin-top.txt new file mode 100644 index 00000000000..30a2a521763 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/block-and-inline/bfc-root-auto-height-expands-for-descendants-with-margin-top.txt @@ -0,0 +1,15 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer at (0,0) content-size 100x308 [BFC] children: not-inline + BlockContainer at (8,200) content-size 100x100 children: not-inline + BlockContainer at (8,200) content-size 100x100 children: not-inline + BlockContainer at (8,200) content-size 50x17 children: inline + frag 0 from TextNode start: 0, length: 3, rect: [8,200 18.828125x17] baseline: 13.296875 + "lol" + TextNode <#text> + +ViewportPaintable (Viewport<#document>) [0,0 800x600] + PaintableWithLines (BlockContainer) [0,0 100x308] overflow: [0,0 108x308] + PaintableWithLines (BlockContainer) [8,200 100x100] + PaintableWithLines (BlockContainer
#pink) [8,200 100x100] + PaintableWithLines (BlockContainer
#orange) [8,200 50x17] + TextPaintable (TextNode<#text>) diff --git a/Tests/LibWeb/Layout/expected/block-and-inline/list-markers-intruded-by-float.txt b/Tests/LibWeb/Layout/expected/block-and-inline/list-markers-intruded-by-float.txt index 719cddd7237..4fb1dfe7b26 100644 --- a/Tests/LibWeb/Layout/expected/block-and-inline/list-markers-intruded-by-float.txt +++ b/Tests/LibWeb/Layout/expected/block-and-inline/list-markers-intruded-by-float.txt @@ -1,5 +1,5 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline - BlockContainer at (0,0) content-size 800x128 [BFC] children: not-inline + BlockContainer at (0,0) content-size 800x136 [BFC] children: not-inline BlockContainer at (8,16) content-size 784x102 children: not-inline BlockContainer at (18,26) content-size 200x100 floating [BFC] children: not-inline BlockContainer
    at (48,16) content-size 744x102 children: not-inline @@ -35,7 +35,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline ListItemMarkerBox <(anonymous)> at (304,101) content-size 12x17 children: not-inline ViewportPaintable (Viewport<#document>) [0,0 800x600] - PaintableWithLines (BlockContainer) [0,0 800x128] overflow: [0,0 800x136] + PaintableWithLines (BlockContainer) [0,0 800x136] PaintableWithLines (BlockContainer) [8,16 784x102] overflow: [8,16 784x120] PaintableWithLines (BlockContainer
    .box) [8,16 220x120] PaintableWithLines (BlockContainer
      ) [8,16 784x102] diff --git a/Tests/LibWeb/Layout/expected/block-and-inline/margin-must-not-collapse-across-nested-bfc.txt b/Tests/LibWeb/Layout/expected/block-and-inline/margin-must-not-collapse-across-nested-bfc.txt index 5cc623b7430..a4e10be97a8 100644 --- a/Tests/LibWeb/Layout/expected/block-and-inline/margin-must-not-collapse-across-nested-bfc.txt +++ b/Tests/LibWeb/Layout/expected/block-and-inline/margin-must-not-collapse-across-nested-bfc.txt @@ -1,12 +1,12 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline - BlockContainer at (0,0) content-size 800x116 [BFC] children: not-inline + BlockContainer at (0,0) content-size 800x138 [BFC] children: not-inline BlockContainer at (8,30) content-size 784x100 children: not-inline BlockContainer at (8,30) content-size 784x20 children: not-inline BlockContainer at (8,80) content-size 784x0 [BFC] children: not-inline BlockContainer at (8,110) content-size 784x20 children: not-inline ViewportPaintable (Viewport<#document>) [0,0 800x600] - PaintableWithLines (BlockContainer) [0,0 800x116] overflow: [0,0 800x130] + PaintableWithLines (BlockContainer) [0,0 800x138] PaintableWithLines (BlockContainer) [8,30 784x100] PaintableWithLines (BlockContainer
      .not-bfc) [8,30 784x20] PaintableWithLines (BlockContainer
      .bfc) [8,80 784x0] diff --git a/Tests/LibWeb/Layout/expected/block-size.txt b/Tests/LibWeb/Layout/expected/block-size.txt index 52d5e48fb1d..fd3dee56415 100644 --- a/Tests/LibWeb/Layout/expected/block-size.txt +++ b/Tests/LibWeb/Layout/expected/block-size.txt @@ -1,5 +1,5 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline - BlockContainer at (0,0) content-size 800x1710 [BFC] children: not-inline + BlockContainer at (0,0) content-size 800x1772 [BFC] children: not-inline BlockContainer at (8,70) content-size 784x1632 children: not-inline BlockContainer at (8,70) content-size 784x700 children: inline frag 0 from TextNode start: 0, length: 2, rect: [8,70 85.875x76] baseline: 58.984375 @@ -24,8 +24,8 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline BlockContainer <(anonymous)> at (8,1772) content-size 784x0 children: inline TextNode <#text> -ViewportPaintable (Viewport<#document>) [0,0 800x600] overflow: [0,0 800x1710] - PaintableWithLines (BlockContainer) [0,0 800x1710] +ViewportPaintable (Viewport<#document>) [0,0 800x600] overflow: [0,0 800x1772] + PaintableWithLines (BlockContainer) [0,0 800x1772] PaintableWithLines (BlockContainer) [8,70 784x1632] PaintableWithLines (BlockContainer

      .min-block-test) [8,70 784x700] TextPaintable (TextNode<#text>) diff --git a/Tests/LibWeb/Layout/expected/br-should-not-generate-pseudo-before.txt b/Tests/LibWeb/Layout/expected/br-should-not-generate-pseudo-before.txt index 355b6076aa6..30e9af3f8a8 100644 --- a/Tests/LibWeb/Layout/expected/br-should-not-generate-pseudo-before.txt +++ b/Tests/LibWeb/Layout/expected/br-should-not-generate-pseudo-before.txt @@ -1,5 +1,5 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline - BlockContainer at (0,0) content-size 800x83 [BFC] children: not-inline + BlockContainer at (0,0) content-size 800x91 [BFC] children: not-inline BlockContainer at (8,16) content-size 784x67 children: not-inline BlockContainer

      at (8,16) content-size 784x17 children: inline frag 0 from TextNode start: 0, length: 36, rect: [18.625,16 300x17] baseline: 13.296875 @@ -16,7 +16,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline TextNode <#text> ViewportPaintable (Viewport<#document>) [0,0 800x600] - PaintableWithLines (BlockContainer) [0,0 800x83] + PaintableWithLines (BlockContainer) [0,0 800x91] PaintableWithLines (BlockContainer) [8,16 784x67] PaintableWithLines (BlockContainer

      ) [8,16 784x17] PaintableWithLines (InlineNode(anonymous)) diff --git a/Tests/LibWeb/Layout/expected/fieldset-with-rendered-legend.txt b/Tests/LibWeb/Layout/expected/fieldset-with-rendered-legend.txt index 8390c0c650d..157d63b88be 100644 --- a/Tests/LibWeb/Layout/expected/fieldset-with-rendered-legend.txt +++ b/Tests/LibWeb/Layout/expected/fieldset-with-rendered-legend.txt @@ -1,18 +1,18 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline BlockContainer at (0,0) content-size 800x600 [BFC] children: not-inline - BlockContainer at (8,8) content-size 784x36.59375 children: not-inline - FieldSetBox

      at (24,15.59375) content-size 752x17 [BFC] children: not-inline + BlockContainer at (8,8) content-size 784x22.5 children: not-inline + FieldSetBox
      at (24,15.59375) content-size 752x2.90625 [BFC] children: not-inline LegendBox at (26,1.5) content-size 36.328125x17 children: inline frag 0 from TextNode start: 0, length: 5, rect: [26,1.5 36.328125x17] baseline: 13.296875 "login" TextNode <#text> - BlockContainer <(anonymous)> at (8,44.59375) content-size 784x0 children: inline + BlockContainer <(anonymous)> at (8,30.5) content-size 784x0 children: inline TextNode <#text> ViewportPaintable (Viewport<#document>) [0,0 800x600] PaintableWithLines (BlockContainer) [0,0 800x600] - PaintableWithLines (BlockContainer) [8,8 784x36.59375] overflow: [8,1.5 784x51.09375] - FieldSetPaintable (FieldSetBox
      ) [10,8 780x36.59375] overflow: [12,1.5 776x51.09375] + PaintableWithLines (BlockContainer) [8,8 784x22.5] overflow: [8,1.5 784x37] + FieldSetPaintable (FieldSetBox
      ) [10,8 780x22.5] overflow: [12,1.5 776x37] PaintableWithLines (LegendBox) [24,1.5 40.328125x17] TextPaintable (TextNode<#text>) - PaintableWithLines (BlockContainer(anonymous)) [8,44.59375 784x0] + PaintableWithLines (BlockContainer(anonymous)) [8,30.5 784x0] diff --git a/Tests/LibWeb/Layout/expected/flex/list-container-display-contents.txt b/Tests/LibWeb/Layout/expected/flex/list-container-display-contents.txt index ad174504c0e..258a7ecb3a7 100644 --- a/Tests/LibWeb/Layout/expected/flex/list-container-display-contents.txt +++ b/Tests/LibWeb/Layout/expected/flex/list-container-display-contents.txt @@ -1,5 +1,5 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline - BlockContainer at (0,0) content-size 800x41 [BFC] children: not-inline + BlockContainer at (0,0) content-size 800x49 [BFC] children: not-inline BlockContainer at (8,16) content-size 784x17 children: not-inline Box at (48,16) content-size 744x17 flex-container(row) [FFC] children: not-inline BlockContainer at (48,16) content-size 46.734375x17 flex-item [BFC] children: inline @@ -12,7 +12,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline TextNode <#text> ViewportPaintable (Viewport<#document>) [0,0 800x600] - PaintableWithLines (BlockContainer) [0,0 800x41] + PaintableWithLines (BlockContainer) [0,0 800x49] PaintableWithLines (BlockContainer) [8,16 784x17] PaintableBox (Box
        .globalnav-list) [8,16 784x17] PaintableWithLines (BlockContainer
        #item-1) [48,16 46.734375x17] diff --git a/Tests/LibWeb/Layout/expected/grid/fit-content-3.txt b/Tests/LibWeb/Layout/expected/grid/fit-content-3.txt index 23490518119..71c3f508103 100644 --- a/Tests/LibWeb/Layout/expected/grid/fit-content-3.txt +++ b/Tests/LibWeb/Layout/expected/grid/fit-content-3.txt @@ -1,5 +1,5 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline - BlockContainer at (0,0) content-size 800x120 [BFC] children: not-inline + BlockContainer at (0,0) content-size 800x122 [BFC] children: not-inline BlockContainer at (8,10) content-size 784x104 children: not-inline BlockContainer at (8,10) content-size 200x104 children: inline frag 0 from Box start: 0, length: 0, rect: [8,10 104x104] baseline: 104 @@ -19,7 +19,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline TextNode <#text> ViewportPaintable (Viewport<#document>) [0,0 800x600] - PaintableWithLines (BlockContainer) [0,0 800x120] + PaintableWithLines (BlockContainer) [0,0 800x122] PaintableWithLines (BlockContainer) [8,10 784x104] PaintableWithLines (BlockContainer
        .container) [8,10 200x104] PaintableBox (Box
        .grid) [8,10 104x104] diff --git a/Tests/LibWeb/Layout/expected/inline-size.txt b/Tests/LibWeb/Layout/expected/inline-size.txt index 8c2baf741c7..4b5e0593505 100644 --- a/Tests/LibWeb/Layout/expected/inline-size.txt +++ b/Tests/LibWeb/Layout/expected/inline-size.txt @@ -1,5 +1,5 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline - BlockContainer at (0,0) content-size 800x986 [BFC] children: not-inline + BlockContainer at (0,0) content-size 800x1048 [BFC] children: not-inline BlockContainer at (8,70) content-size 784x908 children: not-inline BlockContainer at (8,70) content-size 784x200 children: inline frag 0 from TextNode start: 0, length: 2, rect: [8,70 85.875x76] baseline: 58.984375 @@ -24,8 +24,8 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline BlockContainer <(anonymous)> at (8,1048) content-size 784x0 children: inline TextNode <#text> -ViewportPaintable (Viewport<#document>) [0,0 800x600] overflow: [0,0 800x986] - PaintableWithLines (BlockContainer) [0,0 800x986] +ViewportPaintable (Viewport<#document>) [0,0 800x600] overflow: [0,0 800x1048] + PaintableWithLines (BlockContainer) [0,0 800x1048] PaintableWithLines (BlockContainer) [8,70 784x908] PaintableWithLines (BlockContainer

        .min-inline-test) [8,70 784x200] TextPaintable (TextNode<#text>) diff --git a/Tests/LibWeb/Layout/expected/position-empty-pseudo-elements.txt b/Tests/LibWeb/Layout/expected/position-empty-pseudo-elements.txt index 237234e7ce4..76ce65dceb8 100644 --- a/Tests/LibWeb/Layout/expected/position-empty-pseudo-elements.txt +++ b/Tests/LibWeb/Layout/expected/position-empty-pseudo-elements.txt @@ -1,5 +1,5 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline - BlockContainer at (0,0) content-size 800x158 [BFC] children: not-inline + BlockContainer at (0,0) content-size 800x175 [BFC] children: not-inline BlockContainer at (8,25) content-size 784x125 children: not-inline BlockContainer at (33,25) content-size 50x50 children: not-inline BlockContainer <(anonymous)> at (33,75) content-size 50x0 children: inline @@ -11,7 +11,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline TextNode <#text> ViewportPaintable (Viewport<#document>) [0,0 800x600] - PaintableWithLines (BlockContainer) [0,0 800x158] + PaintableWithLines (BlockContainer) [0,0 800x175] PaintableWithLines (BlockContainer) [8,25 784x125] PaintableWithLines (BlockContainer

        .empty_content) [33,25 50x50] PaintableWithLines (BlockContainer(anonymous)) [33,25 50x50] diff --git a/Tests/LibWeb/Layout/expected/table/basic.txt b/Tests/LibWeb/Layout/expected/table/basic.txt index 002e413ffed..ebf75508eb2 100644 --- a/Tests/LibWeb/Layout/expected/table/basic.txt +++ b/Tests/LibWeb/Layout/expected/table/basic.txt @@ -1,12 +1,12 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline BlockContainer at (0,0) content-size 800x600 [BFC] children: not-inline - BlockContainer at (8,8) content-size 784x84 children: not-inline + BlockContainer at (8,8) content-size 784x101 children: not-inline TableWrapper <(anonymous)> at (8,8) content-size 2x2 [BFC] children: not-inline Box at (8,8) content-size 2x2 table-box [TFC] children: not-inline BlockContainer <(anonymous)> at (8,10) content-size 784x0 children: inline TextNode <#text> TextNode <#text> - TableWrapper <(anonymous)> at (8,10) content-size 99.171875x82 [BFC] children: not-inline + TableWrapper <(anonymous)> at (8,10) content-size 99.171875x99 [BFC] children: not-inline Box at (8,27) content-size 99.171875x65 table-box [TFC] children: not-inline BlockContainer <(anonymous)> (not painted) children: inline TextNode <#text> @@ -64,16 +64,16 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline TextNode <#text> BlockContainer <(anonymous)> (not painted) children: inline TextNode <#text> - BlockContainer <(anonymous)> at (8,92) content-size 784x0 children: inline + BlockContainer <(anonymous)> at (8,109) content-size 784x0 children: inline TextNode <#text> ViewportPaintable (Viewport<#document>) [0,0 800x600] PaintableWithLines (BlockContainer) [0,0 800x600] - PaintableWithLines (BlockContainer) [8,8 784x84] + PaintableWithLines (BlockContainer) [8,8 784x101] PaintableWithLines (TableWrapper(anonymous)) [8,8 2x2] PaintableBox (Box#empty-table) [8,8 2x2] PaintableWithLines (BlockContainer(anonymous)) [8,10 784x0] - PaintableWithLines (TableWrapper(anonymous)) [8,10 99.171875x82] + PaintableWithLines (TableWrapper(anonymous)) [8,10 99.171875x99] PaintableBox (Box
        #full-table) [8,27 99.171875x65] PaintableWithLines (BlockContainer) [10,71 95.171875x19] PaintableWithLines (BlockContainer
        ) [8,10 82.734375x17] overflow: [8,10 90.953125x17] TextPaintable (TextNode<#text>) @@ -89,4 +89,4 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600] PaintableBox (Box
        ) [10,71 95.171875x19] TextPaintable (TextNode<#text>) - PaintableWithLines (BlockContainer(anonymous)) [8,92 784x0] + PaintableWithLines (BlockContainer(anonymous)) [8,109 784x0] diff --git a/Tests/LibWeb/Layout/expected/table/long-caption-increases-width.txt b/Tests/LibWeb/Layout/expected/table/long-caption-increases-width.txt index bed99f235a0..485e6b4be88 100644 --- a/Tests/LibWeb/Layout/expected/table/long-caption-increases-width.txt +++ b/Tests/LibWeb/Layout/expected/table/long-caption-increases-width.txt @@ -1,9 +1,9 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline - BlockContainer at (0,0) content-size 800x125 [BFC] children: not-inline + BlockContainer at (0,0) content-size 800x157 [BFC] children: not-inline BlockContainer <(anonymous)> at (0,0) content-size 800x0 children: inline TextNode <#text> - BlockContainer at (8,8) content-size 784x109 children: not-inline - TableWrapper <(anonymous)> at (8,8) content-size 63.046875x109 [BFC] children: not-inline + BlockContainer at (8,8) content-size 784x141 children: not-inline + TableWrapper <(anonymous)> at (8,8) content-size 63.046875x141 [BFC] children: not-inline Box at (10,42) content-size 59.046875x71 table-box [TFC] children: not-inline BlockContainer <(anonymous)> (not painted) children: inline TextNode <#text> @@ -81,14 +81,14 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline TextNode <#text> BlockContainer <(anonymous)> (not painted) children: inline TextNode <#text> - BlockContainer <(anonymous)> at (8,117) content-size 784x0 children: inline + BlockContainer <(anonymous)> at (8,149) content-size 784x0 children: inline TextNode <#text> ViewportPaintable (Viewport<#document>) [0,0 800x600] - PaintableWithLines (BlockContainer) [0,0 800x125] + PaintableWithLines (BlockContainer) [0,0 800x157] PaintableWithLines (BlockContainer(anonymous)) [0,0 800x0] - PaintableWithLines (BlockContainer) [8,8 784x109] - PaintableWithLines (TableWrapper(anonymous)) [8,8 63.046875x109] + PaintableWithLines (BlockContainer) [8,8 784x141] + PaintableWithLines (TableWrapper(anonymous)) [8,8 63.046875x141] PaintableBox (Box#full-table) [8,40 63.046875x75] PaintableWithLines (BlockContainer
        ) [8,8 59.046875x34] TextPaintable (TextNode<#text>) @@ -110,4 +110,4 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer
        ) [39.25,90 27.796875x21] TextPaintable (TextNode<#text>) - PaintableWithLines (BlockContainer(anonymous)) [8,117 784x0] + PaintableWithLines (BlockContainer(anonymous)) [8,149 784x0] diff --git a/Tests/LibWeb/Layout/expected/table/table-align-center-with-margin.txt b/Tests/LibWeb/Layout/expected/table/table-align-center-with-margin.txt index c97001c01a6..80d192936d6 100644 --- a/Tests/LibWeb/Layout/expected/table/table-align-center-with-margin.txt +++ b/Tests/LibWeb/Layout/expected/table/table-align-center-with-margin.txt @@ -1,5 +1,5 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline - BlockContainer at (0,0) content-size 800x312 [BFC] children: not-inline + BlockContainer at (0,0) content-size 800x404 [BFC] children: not-inline BlockContainer at (8,100) content-size 784x204 children: not-inline TableWrapper <(anonymous)> at (108,100) content-size 89.34375x204 [BFC] children: not-inline Box at (109,101) content-size 87.34375x202 table-box [TFC] children: not-inline @@ -13,7 +13,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline TextNode <#text> ViewportPaintable (Viewport<#document>) [0,0 800x600] - PaintableWithLines (BlockContainer) [0,0 800x312] + PaintableWithLines (BlockContainer) [0,0 800x404] PaintableWithLines (BlockContainer) [8,100 784x204] PaintableWithLines (TableWrapper(anonymous)) [108,100 89.34375x204] PaintableBox (Box
        ) [108,100 89.34375x204] diff --git a/Tests/LibWeb/Layout/expected/table/top-caption-with-padding.txt b/Tests/LibWeb/Layout/expected/table/top-caption-with-padding.txt index e0c0580adc5..ddf76351024 100644 --- a/Tests/LibWeb/Layout/expected/table/top-caption-with-padding.txt +++ b/Tests/LibWeb/Layout/expected/table/top-caption-with-padding.txt @@ -1,7 +1,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline BlockContainer at (0,0) content-size 800x600 [BFC] children: not-inline - BlockContainer at (8,8) content-size 784x60 children: not-inline - TableWrapper <(anonymous)> at (8,8) content-size 60.46875x60 [BFC] children: not-inline + BlockContainer at (8,8) content-size 784x87 children: not-inline + TableWrapper <(anonymous)> at (8,8) content-size 60.46875x87 [BFC] children: not-inline Box
        at (8,35) content-size 60.46875x23 table-box [TFC] children: not-inline BlockContainer <(anonymous)> (not painted) children: inline TextNode <#text> @@ -26,8 +26,8 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline ViewportPaintable (Viewport<#document>) [0,0 800x600] overflow: [0,-2 800x602] PaintableWithLines (BlockContainer) [0,0 800x600] overflow: [0,-2 800x602] - PaintableWithLines (BlockContainer) [8,8 784x60] overflow: [8,-2 784x70] - PaintableWithLines (TableWrapper(anonymous)) [8,8 60.46875x60] overflow: [8,-2 60.46875x70] + PaintableWithLines (BlockContainer) [8,8 784x87] overflow: [8,-2 784x97] + PaintableWithLines (TableWrapper(anonymous)) [8,8 60.46875x87] overflow: [8,-2 60.46875x97] PaintableBox (Box
        ) [8,35 60.46875x23] PaintableWithLines (BlockContainer
        ) [8,-2 60.46875x37] TextPaintable (TextNode<#text>) diff --git a/Tests/LibWeb/Layout/expected/utf-16-be-xhtml-file-should-decode-correctly.txt b/Tests/LibWeb/Layout/expected/utf-16-be-xhtml-file-should-decode-correctly.txt index 040336f157e..1c5d2de90fd 100644 --- a/Tests/LibWeb/Layout/expected/utf-16-be-xhtml-file-should-decode-correctly.txt +++ b/Tests/LibWeb/Layout/expected/utf-16-be-xhtml-file-should-decode-correctly.txt @@ -1,5 +1,5 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline - BlockContainer at (0,0) content-size 800x41 [BFC] children: not-inline + BlockContainer at (0,0) content-size 800x49 [BFC] children: not-inline BlockContainer at (8,16) content-size 784x17 children: not-inline BlockContainer <(anonymous)> at (8,16) content-size 784x0 children: inline TextNode <#text> @@ -11,7 +11,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline TextNode <#text> ViewportPaintable (Viewport<#document>) [0,0 800x600] - PaintableWithLines (BlockContainer) [0,0 800x41] + PaintableWithLines (BlockContainer) [0,0 800x49] PaintableWithLines (BlockContainer) [8,16 784x17] PaintableWithLines (BlockContainer(anonymous)) [8,16 784x0] PaintableWithLines (BlockContainer

        ) [8,16 784x17] diff --git a/Tests/LibWeb/Layout/input/block-and-inline/bfc-root-auto-height-expands-for-descendants-with-margin-top.html b/Tests/LibWeb/Layout/input/block-and-inline/bfc-root-auto-height-expands-for-descendants-with-margin-top.html new file mode 100644 index 00000000000..ffd0b28af0f --- /dev/null +++ b/Tests/LibWeb/Layout/input/block-and-inline/bfc-root-auto-height-expands-for-descendants-with-margin-top.html @@ -0,0 +1,25 @@ +

        lol diff --git a/Tests/LibWeb/Screenshot/images/css-color-functions-ref.png b/Tests/LibWeb/Screenshot/images/css-color-functions-ref.png index ca30f4caa82..9905fa30fa1 100644 Binary files a/Tests/LibWeb/Screenshot/images/css-color-functions-ref.png and b/Tests/LibWeb/Screenshot/images/css-color-functions-ref.png differ diff --git a/Tests/LibWeb/Screenshot/images/css-gradients-ref.png b/Tests/LibWeb/Screenshot/images/css-gradients-ref.png index a09e2499c82..25ffc802c4c 100644 Binary files a/Tests/LibWeb/Screenshot/images/css-gradients-ref.png and b/Tests/LibWeb/Screenshot/images/css-gradients-ref.png differ diff --git a/Tests/LibWeb/Screenshot/images/css-transform-box-ref.png b/Tests/LibWeb/Screenshot/images/css-transform-box-ref.png index fe943be7ed9..d68ca694bdf 100644 Binary files a/Tests/LibWeb/Screenshot/images/css-transform-box-ref.png and b/Tests/LibWeb/Screenshot/images/css-transform-box-ref.png differ diff --git a/Tests/LibWeb/Screenshot/images/object-fit-position.png b/Tests/LibWeb/Screenshot/images/object-fit-position.png index 77e5ca692c6..ede3411daed 100644 Binary files a/Tests/LibWeb/Screenshot/images/object-fit-position.png and b/Tests/LibWeb/Screenshot/images/object-fit-position.png differ