diff --git a/Libraries/LibWeb/Layout/BlockFormattingContext.cpp b/Libraries/LibWeb/Layout/BlockFormattingContext.cpp index 8600bb25349..db67a08519f 100644 --- a/Libraries/LibWeb/Layout/BlockFormattingContext.cpp +++ b/Libraries/LibWeb/Layout/BlockFormattingContext.cpp @@ -831,9 +831,8 @@ void BlockFormattingContext::layout_block_level_box(Box const& box, BlockContain compute_inset(box, content_box_rect(block_container_state).size()); // Now that our children are formatted we place the ListItemBox with the left space we remembered. - if (is(box)) { + if (is(box)) layout_list_item_marker(static_cast(box), left_space_before_children_formatted); - } bottom_of_lowest_margin_box = max(bottom_of_lowest_margin_box, box_state.offset.y() + box_state.content_height() + box_state.margin_box_bottom()); @@ -1192,24 +1191,26 @@ void BlockFormattingContext::ensure_sizes_correct_for_left_offset_calculation(Li auto& marker = *list_item_box.marker(); auto& marker_state = m_state.get_mutable(marker); - CSSPixels image_width = 0; - CSSPixels image_height = 0; + // If an image is used, the marker's dimensions are the same as the image. if (auto const* list_style_image = marker.list_style_image()) { - image_width = list_style_image->natural_width().value_or(0); - image_height = list_style_image->natural_height().value_or(0); + marker_state.set_content_width(list_style_image->natural_width().value_or(0)); + marker_state.set_content_height(list_style_image->natural_height().value_or(0)); + return; } + CSSPixels marker_size = marker.relative_size(); + marker_state.set_content_height(marker_size); + + // Text markers use text metrics to determine their width; other markers use square dimensions. + auto const& marker_font = marker.first_available_font(); auto marker_text = marker.text(); - if (!marker_text.has_value()) { - auto default_marker_width = max(4, marker.first_available_font().pixel_size() - 4); - marker_state.set_content_width(image_width + default_marker_width); - } else { + if (marker_text.has_value()) { // FIXME: Use per-code-point fonts to measure text. - auto text_width = marker.first_available_font().width(marker_text.value().code_points()); - marker_state.set_content_width(image_width + CSSPixels::nearest_value_for(text_width)); + auto text_width = marker_font.width(marker_text.value().code_points()); + marker_state.set_content_width(CSSPixels::nearest_value_for(text_width)); + } else { + marker_state.set_content_width(marker_size); } - - marker_state.set_content_height(max(image_height, CSSPixels { marker.first_available_font().pixel_size() })); } void BlockFormattingContext::layout_list_item_marker(ListItemBox const& list_item_box, CSSPixels const& left_space_before_list_item_elements_formatted) @@ -1222,20 +1223,26 @@ void BlockFormattingContext::layout_list_item_marker(ListItemBox const& list_ite auto& list_item_state = m_state.get_mutable(list_item_box); auto marker_text = marker.text(); - auto default_marker_width = marker_text.has_value() ? 0 : max(4, marker.first_available_font().pixel_size() - 4); - auto final_marker_width = marker_state.content_width() + default_marker_width; + + // Text markers fit snug against the list item; non-text position themselves at 50% of the font size. + CSSPixels marker_distance = 0; + if (!marker_text.has_value()) + marker_distance = CSSPixels::nearest_value_for(.5f * marker.first_available_font().pixel_size()); + + auto marker_height = marker_state.content_height(); + auto marker_width = marker_state.content_width(); if (marker.list_style_position() == CSS::ListStylePosition::Inside) { - list_item_state.set_content_x(list_item_state.offset.x() + final_marker_width); - list_item_state.set_content_width(list_item_state.content_width() - final_marker_width); + list_item_state.set_content_x(list_item_state.offset.x() + marker_width + marker_distance); + list_item_state.set_content_width(list_item_state.content_width() - marker_width); } - auto offset_y = max(CSSPixels(0), (marker.computed_values().line_height() - marker_state.content_height()) / 2); + auto offset_x = round(left_space_before_list_item_elements_formatted - marker_distance - marker_width); + auto offset_y = round(max(CSSPixels(0), (marker.computed_values().line_height() - marker_height) / 2)); + marker_state.set_content_offset({ offset_x, offset_y }); - marker_state.set_content_offset({ left_space_before_list_item_elements_formatted - final_marker_width, round(offset_y) }); - - if (marker_state.content_height() > list_item_state.content_height()) - list_item_state.set_content_height(marker_state.content_height()); + if (marker_height > list_item_state.content_height()) + list_item_state.set_content_height(marker_height); } BlockFormattingContext::SpaceUsedAndContainingMarginForFloats BlockFormattingContext::space_used_and_containing_margin_for_floats(CSSPixels y) const diff --git a/Libraries/LibWeb/Layout/ListItemMarkerBox.cpp b/Libraries/LibWeb/Layout/ListItemMarkerBox.cpp index 2ece586ea52..ca97961ffb4 100644 --- a/Libraries/LibWeb/Layout/ListItemMarkerBox.cpp +++ b/Libraries/LibWeb/Layout/ListItemMarkerBox.cpp @@ -73,6 +73,23 @@ GC::Ptr ListItemMarkerBox::create_paintable() const return Painting::MarkerPaintable::create(*this); } +CSSPixels ListItemMarkerBox::relative_size() const +{ + auto font_size = first_available_font().pixel_size(); + auto marker_text = text(); + if (marker_text.has_value()) + return CSSPixels::nearest_value_for(font_size); + + // Scale the marker box relative to the used font's pixel size. + switch (m_list_style_type.get()) { + case CSS::CounterStyleNameKeyword::DisclosureClosed: + case CSS::CounterStyleNameKeyword::DisclosureOpen: + return CSSPixels::nearest_value_for(ceilf(font_size * .5f)); + default: + return CSSPixels::nearest_value_for(ceilf(font_size * .35f)); + } +} + void ListItemMarkerBox::visit_edges(Cell::Visitor& visitor) { Base::visit_edges(visitor); diff --git a/Libraries/LibWeb/Layout/ListItemMarkerBox.h b/Libraries/LibWeb/Layout/ListItemMarkerBox.h index dcaa29882ef..f7752235540 100644 --- a/Libraries/LibWeb/Layout/ListItemMarkerBox.h +++ b/Libraries/LibWeb/Layout/ListItemMarkerBox.h @@ -27,6 +27,8 @@ public: CSS::ListStyleType const& list_style_type() const { return m_list_style_type; } CSS::ListStylePosition list_style_position() const { return m_list_style_position; } + CSSPixels relative_size() const; + private: virtual void visit_edges(Cell::Visitor&) override; diff --git a/Libraries/LibWeb/Painting/MarkerPaintable.cpp b/Libraries/LibWeb/Painting/MarkerPaintable.cpp index 5eb0680f6ef..4d5bbd55a1b 100644 --- a/Libraries/LibWeb/Painting/MarkerPaintable.cpp +++ b/Libraries/LibWeb/Painting/MarkerPaintable.cpp @@ -40,55 +40,43 @@ void MarkerPaintable::paint(PaintContext& context, PaintPhase phase) const if (phase != PaintPhase::Foreground) return; - CSSPixelRect enclosing = absolute_rect().to_rounded(); - auto device_enclosing = context.enclosing_device_rect(enclosing); - - CSSPixels marker_width = enclosing.height() / 2; + auto marker_rect = absolute_rect().to_rounded(); + auto device_rect = context.enclosing_device_rect(marker_rect); if (auto const* list_style_image = layout_box().list_style_image()) { - CSSPixelRect image_rect { - 0, 0, - list_style_image->natural_width().value_or(marker_width), - list_style_image->natural_height().value_or(marker_width) - }; - image_rect.center_within(enclosing); - - auto device_image_rect = context.enclosing_device_rect(image_rect); - list_style_image->resolve_for_size(layout_box(), image_rect.size()); - list_style_image->paint(context, device_image_rect, computed_values().image_rendering()); + list_style_image->resolve_for_size(layout_box(), marker_rect.size()); + list_style_image->paint(context, device_rect, computed_values().image_rendering()); return; } - CSSPixelRect marker_rect { 0, 0, marker_width, marker_width }; - marker_rect.center_within(enclosing); - auto device_marker_rect = context.enclosing_device_rect(marker_rect); - - float left = device_marker_rect.x().value(); - float right = left + device_marker_rect.width().value(); - float top = device_marker_rect.y().value(); - float bottom = top + device_marker_rect.height().value(); + float left = device_rect.x().value(); + float right = left + device_rect.width().value(); + float top = device_rect.y().value(); + float bottom = top + device_rect.height().value(); auto color = computed_values().color(); if (auto text = layout_box().text(); text.has_value()) { // FIXME: This should use proper text layout logic! // This does not line up with the text in the
  • element which looks very sad :( - context.display_list_recorder().draw_text(device_enclosing.to_type(), *text, layout_box().font(context), Gfx::TextAlignment::Center, color); + context.display_list_recorder().draw_text(device_rect.to_type(), *text, layout_box().font(context), Gfx::TextAlignment::Center, color); } else if (auto const* counter_style = layout_box().list_style_type().get_pointer()) { switch (*counter_style) { case CSS::CounterStyleNameKeyword::Square: - context.display_list_recorder().fill_rect(device_marker_rect.to_type(), color); + context.display_list_recorder().fill_rect(device_rect.to_type(), color); break; case CSS::CounterStyleNameKeyword::Circle: - context.display_list_recorder().draw_ellipse(device_marker_rect.to_type(), color, 1); + context.display_list_recorder().draw_ellipse(device_rect.to_type(), color, 1); break; case CSS::CounterStyleNameKeyword::Disc: - context.display_list_recorder().fill_ellipse(device_marker_rect.to_type(), color); + context.display_list_recorder().fill_ellipse(device_rect.to_type(), color); break; case CSS::CounterStyleNameKeyword::DisclosureClosed: { // https://drafts.csswg.org/css-counter-styles-3/#disclosure-closed - // For the disclosure-open and disclosure-closed counter styles, the marker must be an image or character suitable for indicating the open and closed states of a disclosure widget, such as HTML’s details element. - // FIXME: If the image is directional, it must respond to the writing mode of the element, similar to the bidi-sensitive images feature of the Images 4 module. + // For the disclosure-open and disclosure-closed counter styles, the marker must be an image or character + // suitable for indicating the open and closed states of a disclosure widget, such as HTML’s details element. + // FIXME: If the image is directional, it must respond to the writing mode of the element, similar to the + // bidi-sensitive images feature of the Images 4 module. // Draw an equilateral triangle pointing right. auto path = Gfx::Path(); @@ -101,8 +89,10 @@ void MarkerPaintable::paint(PaintContext& context, PaintPhase phase) const } case CSS::CounterStyleNameKeyword::DisclosureOpen: { // https://drafts.csswg.org/css-counter-styles-3/#disclosure-open - // For the disclosure-open and disclosure-closed counter styles, the marker must be an image or character suitable for indicating the open and closed states of a disclosure widget, such as HTML’s details element. - // FIXME: If the image is directional, it must respond to the writing mode of the element, similar to the bidi-sensitive images feature of the Images 4 module. + // For the disclosure-open and disclosure-closed counter styles, the marker must be an image or character + // suitable for indicating the open and closed states of a disclosure widget, such as HTML’s details element. + // FIXME: If the image is directional, it must respond to the writing mode of the element, similar to the + // bidi-sensitive images feature of the Images 4 module. // Draw an equilateral triangle pointing down. auto path = Gfx::Path(); 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 a0e769f9668..b1cbd82a362 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 @@ -6,32 +6,32 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline ListItemBox
  • at (48,16) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 1, rect: [328,16 9.34375x18] baseline: 13.796875 "a" - ListItemMarkerBox <(anonymous)> at (304,17) content-size 12x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (314,22) content-size 6x6 children: not-inline TextNode <#text> ListItemBox
  • at (48,34) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 1, rect: [328,34 9.34375x18] baseline: 13.796875 "a" - ListItemMarkerBox <(anonymous)> at (304,35) content-size 12x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (314,40) content-size 6x6 children: not-inline TextNode <#text> ListItemBox
  • at (48,52) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 1, rect: [328,52 9.34375x18] baseline: 13.796875 "a" - ListItemMarkerBox <(anonymous)> at (304,53) content-size 12x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (314,58) content-size 6x6 children: not-inline TextNode <#text> ListItemBox
  • at (48,70) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 1, rect: [328,70 9.34375x18] baseline: 13.796875 "a" - ListItemMarkerBox <(anonymous)> at (304,71) content-size 12x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (314,76) content-size 6x6 children: not-inline TextNode <#text> ListItemBox
  • at (48,88) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 1, rect: [328,88 9.34375x18] baseline: 13.796875 "a" - ListItemMarkerBox <(anonymous)> at (304,89) content-size 12x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (314,94) content-size 6x6 children: not-inline TextNode <#text> ListItemBox
  • at (48,106) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 1, rect: [328,106 9.34375x18] baseline: 13.796875 "a" - ListItemMarkerBox <(anonymous)> at (304,107) content-size 12x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (314,112) content-size 6x6 children: not-inline TextNode <#text> ViewportPaintable (Viewport<#document>) [0,0 800x600] @@ -40,22 +40,22 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600] PaintableWithLines (BlockContainer
    .box) [8,16 220x120] PaintableWithLines (BlockContainer
      ) [8,16 784x108] PaintableWithLines (ListItemBox
    • ) [48,16 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [304,17 12x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [314,22 6x6] TextPaintable (TextNode<#text>) PaintableWithLines (ListItemBox
    • ) [48,34 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [304,35 12x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [314,40 6x6] TextPaintable (TextNode<#text>) PaintableWithLines (ListItemBox
    • ) [48,52 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [304,53 12x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [314,58 6x6] TextPaintable (TextNode<#text>) PaintableWithLines (ListItemBox
    • ) [48,70 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [304,71 12x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [314,76 6x6] TextPaintable (TextNode<#text>) PaintableWithLines (ListItemBox
    • ) [48,88 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [304,89 12x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [314,94 6x6] TextPaintable (TextNode<#text>) PaintableWithLines (ListItemBox
    • ) [48,106 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [304,107 12x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [314,112 6x6] TextPaintable (TextNode<#text>) SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto) diff --git a/Tests/LibWeb/Layout/expected/css-pseudo-element-display-list-item.txt b/Tests/LibWeb/Layout/expected/css-pseudo-element-display-list-item.txt index 8a1182bb71c..f2666b985ab 100644 --- a/Tests/LibWeb/Layout/expected/css-pseudo-element-display-list-item.txt +++ b/Tests/LibWeb/Layout/expected/css-pseudo-element-display-list-item.txt @@ -9,7 +9,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline ListItemBox <(anonymous)> at (24,26) content-size 768x18 children: inline frag 0 from TextNode start: 0, length: 11, rect: [24,26 88.703125x18] baseline: 13.796875 "Filler Text" - ListItemMarkerBox <(anonymous)> at (0,27) content-size 12x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (10,32) content-size 6x6 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (8,44) content-size 784x0 children: inline TextNode <#text> @@ -21,7 +21,7 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600] PaintableWithLines (BlockContainer(anonymous)) [8,8 784x18] TextPaintable (TextNode<#text>) PaintableWithLines (ListItemBox(anonymous)) [24,26 768x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [0,27 12x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [10,32 6x6] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [8,44 784x0] diff --git a/Tests/LibWeb/Layout/expected/details-closed.txt b/Tests/LibWeb/Layout/expected/details-closed.txt index bb7bb9b63a8..365e3f15ce7 100644 --- a/Tests/LibWeb/Layout/expected/details-closed.txt +++ b/Tests/LibWeb/Layout/expected/details-closed.txt @@ -2,10 +2,10 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline BlockContainer at (0,0) content-size 800x34 [BFC] children: not-inline BlockContainer at (8,8) content-size 784x18 children: not-inline BlockContainer
      at (8,8) content-size 784x18 children: not-inline - ListItemBox at (32,8) content-size 760x18 children: inline - frag 0 from TextNode start: 0, length: 13, rect: [32,8 114.625x18] baseline: 13.796875 + ListItemBox at (24,8) content-size 776x18 children: inline + frag 0 from TextNode start: 0, length: 13, rect: [24,8 114.625x18] baseline: 13.796875 "I'm a summary" - ListItemMarkerBox <(anonymous)> at (8,9) content-size 12x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (8,13) content-size 8x8 children: not-inline TextNode <#text> BlockContainer at (8,26) content-size 784x0 children: not-inline BlockContainer <(anonymous)> at (8,26) content-size 784x0 children: inline @@ -13,10 +13,10 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline ViewportPaintable (Viewport<#document>) [0,0 800x600] PaintableWithLines (BlockContainer) [0,0 800x34] - PaintableWithLines (BlockContainer) [8,8 784x18] - PaintableWithLines (BlockContainer
      ) [8,8 784x18] - PaintableWithLines (ListItemBox) [32,8 760x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [8,9 12x16] + PaintableWithLines (BlockContainer) [8,8 784x18] overflow: [8,8 792x18] + PaintableWithLines (BlockContainer
      ) [8,8 784x18] overflow: [8,8 792x18] + PaintableWithLines (ListItemBox) [24,8 776x18] + MarkerPaintable (ListItemMarkerBox(anonymous)) [8,13 8x8] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer) [8,26 784x0] PaintableWithLines (BlockContainer(anonymous)) [8,26 784x0] diff --git a/Tests/LibWeb/Layout/expected/details-open.txt b/Tests/LibWeb/Layout/expected/details-open.txt index 58dcded5432..e85f28a33d9 100644 --- a/Tests/LibWeb/Layout/expected/details-open.txt +++ b/Tests/LibWeb/Layout/expected/details-open.txt @@ -2,10 +2,10 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline BlockContainer at (0,0) content-size 800x52 [BFC] children: not-inline BlockContainer at (8,8) content-size 784x36 children: not-inline BlockContainer
      at (8,8) content-size 784x36 children: not-inline - ListItemBox at (32,8) content-size 760x18 children: inline - frag 0 from TextNode start: 0, length: 13, rect: [32,8 114.625x18] baseline: 13.796875 + ListItemBox at (24,8) content-size 776x18 children: inline + frag 0 from TextNode start: 0, length: 13, rect: [24,8 114.625x18] baseline: 13.796875 "I'm a summary" - ListItemMarkerBox <(anonymous)> at (8,9) content-size 12x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (8,13) content-size 8x8 children: not-inline TextNode <#text> BlockContainer at (8,26) content-size 784x18 children: inline TextNode <#text> @@ -20,10 +20,10 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline ViewportPaintable (Viewport<#document>) [0,0 800x600] PaintableWithLines (BlockContainer) [0,0 800x52] - PaintableWithLines (BlockContainer) [8,8 784x36] - PaintableWithLines (BlockContainer
      ) [8,8 784x36] - PaintableWithLines (ListItemBox) [32,8 760x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [8,9 12x16] + PaintableWithLines (BlockContainer) [8,8 784x36] overflow: [8,8 792x36] + PaintableWithLines (BlockContainer
      ) [8,8 784x36] overflow: [8,8 792x36] + PaintableWithLines (ListItemBox) [24,8 776x18] + MarkerPaintable (ListItemMarkerBox(anonymous)) [8,13 8x8] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer) [8,26 784x18] PaintableWithLines (InlineNode) [8,26 82.3125x18] diff --git a/Tests/LibWeb/Layout/expected/details-summary-default-ua-style.txt b/Tests/LibWeb/Layout/expected/details-summary-default-ua-style.txt index bcb14560292..0ea7fdb0606 100644 --- a/Tests/LibWeb/Layout/expected/details-summary-default-ua-style.txt +++ b/Tests/LibWeb/Layout/expected/details-summary-default-ua-style.txt @@ -2,10 +2,10 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline BlockContainer at (0,0) content-size 800x154 [BFC] children: not-inline BlockContainer at (8,8) content-size 784x138 children: not-inline BlockContainer
      at (68,68) content-size 664x18 children: not-inline - ListItemBox at (92,68) content-size 640x18 children: inline - frag 0 from TextNode start: 0, length: 5, rect: [92,68 36.84375x18] baseline: 13.796875 + ListItemBox at (84,68) content-size 656x18 children: inline + frag 0 from TextNode start: 0, length: 5, rect: [84,68 36.84375x18] baseline: 13.796875 "hello" - ListItemMarkerBox <(anonymous)> at (68,69) content-size 12x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (68,73) content-size 8x8 children: not-inline TextNode <#text> BlockContainer at (68,86) content-size 664x0 children: not-inline @@ -13,8 +13,8 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600] PaintableWithLines (BlockContainer) [0,0 800x154] PaintableWithLines (BlockContainer) [8,8 784x138] PaintableWithLines (BlockContainer
      ) [8,8 784x138] - PaintableWithLines (ListItemBox) [92,68 640x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [68,69 12x16] + PaintableWithLines (ListItemBox) [84,68 656x18] + MarkerPaintable (ListItemMarkerBox(anonymous)) [68,73 8x8] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer) [68,86 664x0] diff --git a/Tests/LibWeb/Layout/expected/inside-list-item-content-offset.txt b/Tests/LibWeb/Layout/expected/inside-list-item-content-offset.txt index c892562e50f..4afcc87a649 100644 --- a/Tests/LibWeb/Layout/expected/inside-list-item-content-offset.txt +++ b/Tests/LibWeb/Layout/expected/inside-list-item-content-offset.txt @@ -1,17 +1,17 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline - BlockContainer at (0,0) content-size 800x416 [BFC] children: not-inline - BlockContainer at (8,200) content-size 784x16 children: not-inline - ListItemBox at (232,200) content-size 360x16 children: not-inline - ListItemMarkerBox <(anonymous)> at (208,201) content-size 12x16 children: not-inline + BlockContainer at (0,0) content-size 800x406 [BFC] children: not-inline + BlockContainer at (8,200) content-size 784x6 children: not-inline + ListItemBox at (222,200) content-size 378x6 children: not-inline + ListItemMarkerBox <(anonymous)> at (208,206) content-size 6x6 children: not-inline BlockContainer <(anonymous)> at (8,400) content-size 784x0 children: inline TextNode <#text> ViewportPaintable (Viewport<#document>) [0,0 800x600] - PaintableWithLines (BlockContainer) [0,0 800x416] - PaintableWithLines (BlockContainer) [8,200 784x16] overflow: [8,200 784x17] - PaintableWithLines (ListItemBox) [232,200 360x16] overflow: [232,200 360x17] - MarkerPaintable (ListItemMarkerBox(anonymous)) [208,201 12x16] + PaintableWithLines (BlockContainer) [0,0 800x406] + PaintableWithLines (BlockContainer) [8,200 784x6] overflow: [8,200 784x12] + PaintableWithLines (ListItemBox) [222,200 378x6] overflow: [222,200 378x12] + MarkerPaintable (ListItemMarkerBox(anonymous)) [208,206 6x6] PaintableWithLines (BlockContainer(anonymous)) [8,400 784x0] SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto) - SC for BlockContainer [0,0 800x416] [children: 0] (z-index: auto) + SC for BlockContainer [0,0 800x406] [children: 0] (z-index: auto) diff --git a/Tests/LibWeb/Layout/expected/list-item-marker-pseudo-placement.txt b/Tests/LibWeb/Layout/expected/list-item-marker-pseudo-placement.txt index 83df5dc682f..c28fbbe8537 100644 --- a/Tests/LibWeb/Layout/expected/list-item-marker-pseudo-placement.txt +++ b/Tests/LibWeb/Layout/expected/list-item-marker-pseudo-placement.txt @@ -2,7 +2,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline BlockContainer at (0,0) content-size 800x52 [BFC] children: not-inline BlockContainer at (8,8) content-size 784x36 children: not-inline ListItemBox at (8,8) content-size 784x36 children: not-inline - ListItemMarkerBox <(anonymous)> at (-16,9) content-size 12x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (-6,14) content-size 6x6 children: not-inline BlockContainer <(anonymous)> at (8,8) content-size 784x18 children: inline InlineNode <(anonymous)> frag 0 from TextNode start: 0, length: 6, rect: [8,8 52.53125x18] baseline: 13.796875 @@ -21,7 +21,7 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600] PaintableWithLines (BlockContainer) [0,0 800x52] PaintableWithLines (BlockContainer) [8,8 784x36] PaintableWithLines (ListItemBox) [8,8 784x36] - MarkerPaintable (ListItemMarkerBox(anonymous)) [-16,9 12x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [-6,14 6x6] PaintableWithLines (BlockContainer(anonymous)) [8,8 784x18] PaintableWithLines (InlineNode(anonymous)) [8,8 52.53125x18] TextPaintable (TextNode<#text>) diff --git a/Tests/LibWeb/Layout/expected/list-render-list-owner-is-document.txt b/Tests/LibWeb/Layout/expected/list-render-list-owner-is-document.txt index 3b41e095db5..d050222e859 100644 --- a/Tests/LibWeb/Layout/expected/list-render-list-owner-is-document.txt +++ b/Tests/LibWeb/Layout/expected/list-render-list-owner-is-document.txt @@ -8,14 +8,14 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline ListItemBox
    • at (8,8) content-size 784x18 children: inline frag 0 from TextNode start: 0, length: 3, rect: [8,8 29.8125x18] baseline: 13.796875 "One" - ListItemMarkerBox <(anonymous)> at (-10.6875,9) content-size 18.6875x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (-11,9) content-size 18.6875x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (8,26) content-size 784x0 children: inline TextNode <#text> ListItemBox
    • at (8,26) content-size 784x18 children: inline frag 0 from TextNode start: 0, length: 3, rect: [8,26 33.875x18] baseline: 13.796875 "Two" - ListItemMarkerBox <(anonymous)> at (-13.15625,27) content-size 21.15625x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (-13,27) content-size 21.15625x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (8,44) content-size 784x0 children: inline TextNode <#text> @@ -26,11 +26,11 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600] PaintableWithLines (BlockContainer) [8,8 784x36] PaintableWithLines (BlockContainer(anonymous)) [8,8 784x0] PaintableWithLines (ListItemBox
    • ) [8,8 784x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [-10.6875,9 18.6875x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [-11,9 18.6875x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [8,26 784x0] PaintableWithLines (ListItemBox
    • ) [8,26 784x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [-13.15625,27 21.15625x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [-13,27 21.15625x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [8,44 784x0] diff --git a/Tests/LibWeb/Layout/expected/list-render-list-owner-not-ol.txt b/Tests/LibWeb/Layout/expected/list-render-list-owner-not-ol.txt index 522dc14b7be..abb2c7e014b 100644 --- a/Tests/LibWeb/Layout/expected/list-render-list-owner-not-ol.txt +++ b/Tests/LibWeb/Layout/expected/list-render-list-owner-not-ol.txt @@ -9,14 +9,14 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline ListItemBox
    • at (8,8) content-size 784x18 children: inline frag 0 from TextNode start: 0, length: 3, rect: [8,8 29.8125x18] baseline: 13.796875 "One" - ListItemMarkerBox <(anonymous)> at (-10.6875,9) content-size 18.6875x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (-11,9) content-size 18.6875x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (8,26) content-size 784x0 children: inline TextNode <#text> ListItemBox
    • at (8,26) content-size 784x18 children: inline frag 0 from TextNode start: 0, length: 3, rect: [8,26 33.875x18] baseline: 13.796875 "Two" - ListItemMarkerBox <(anonymous)> at (-13.15625,27) content-size 21.15625x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (-13,27) content-size 21.15625x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (8,44) content-size 784x0 children: inline TextNode <#text> @@ -30,11 +30,11 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600] PaintableWithLines (BlockContainer
      #list-item-owner) [8,8 784x36] PaintableWithLines (BlockContainer(anonymous)) [8,8 784x0] PaintableWithLines (ListItemBox
    • ) [8,8 784x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [-10.6875,9 18.6875x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [-11,9 18.6875x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [8,26 784x0] PaintableWithLines (ListItemBox
    • ) [8,26 784x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [-13.15625,27 21.15625x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [-13,27 21.15625x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [8,44 784x0] PaintableWithLines (BlockContainer(anonymous)) [8,44 784x0] diff --git a/Tests/LibWeb/Layout/expected/list-render-no-list.txt b/Tests/LibWeb/Layout/expected/list-render-no-list.txt index 09f405d55a3..feb7ea2cfd9 100644 --- a/Tests/LibWeb/Layout/expected/list-render-no-list.txt +++ b/Tests/LibWeb/Layout/expected/list-render-no-list.txt @@ -6,12 +6,12 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline ListItemBox
    • at (8,8) content-size 784x18 children: inline frag 0 from TextNode start: 0, length: 3, rect: [8,8 29.8125x18] baseline: 13.796875 "One" - ListItemMarkerBox <(anonymous)> at (-16,9) content-size 12x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (-6,14) content-size 6x6 children: not-inline TextNode <#text> ListItemBox
    • at (8,26) content-size 784x18 children: inline frag 0 from TextNode start: 0, length: 3, rect: [8,26 33.875x18] baseline: 13.796875 "Two" - ListItemMarkerBox <(anonymous)> at (-16,27) content-size 12x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (-6,32) content-size 6x6 children: not-inline TextNode <#text> ViewportPaintable (Viewport<#document>) [0,0 800x600] @@ -19,10 +19,10 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600] PaintableWithLines (BlockContainer) [8,8 784x36] PaintableWithLines (BlockContainer(anonymous)) [8,8 784x0] PaintableWithLines (ListItemBox
    • ) [8,8 784x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [-16,9 12x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [-6,14 6x6] TextPaintable (TextNode<#text>) PaintableWithLines (ListItemBox
    • ) [8,26 784x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [-16,27 12x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [-6,32 6x6] TextPaintable (TextNode<#text>) SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto) diff --git a/Tests/LibWeb/Layout/expected/ol-render-deep-hybrid-list-item-list.txt b/Tests/LibWeb/Layout/expected/ol-render-deep-hybrid-list-item-list.txt index 64034a0fd9e..6f5c2815f38 100644 --- a/Tests/LibWeb/Layout/expected/ol-render-deep-hybrid-list-item-list.txt +++ b/Tests/LibWeb/Layout/expected/ol-render-deep-hybrid-list-item-list.txt @@ -7,14 +7,14 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline ListItemBox
    • at (48,16) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 3, rect: [48,16 29.8125x18] baseline: 13.796875 "One" - ListItemMarkerBox <(anonymous)> at (29.3125,17) content-size 18.6875x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (29,17) content-size 18.6875x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,34) content-size 744x0 children: inline TextNode <#text> ListItemBox
    • at (48,34) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 10, rect: [48,34 90.796875x18] baseline: 13.796875 "Twenty-two" - ListItemMarkerBox <(anonymous)> at (18.03125,35) content-size 29.96875x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (18,35) content-size 29.96875x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,52) content-size 744x0 children: inline TextNode <#text> @@ -42,7 +42,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline ListItemBox
      at (48,124) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 12, rect: [48,124 104.78125x18] baseline: 13.796875 "Twenty-three" - ListItemMarkerBox <(anonymous)> at (17.75,125) content-size 30.25x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (18,125) content-size 30.25x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,142) content-size 744x0 children: inline TextNode <#text> @@ -70,7 +70,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline ListItemBox
    • at (48,226) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 11, rect: [48,226 97.75x18] baseline: 13.796875 "Twenty-four" - ListItemMarkerBox <(anonymous)> at (19.09375,227) content-size 28.90625x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (19,227) content-size 28.90625x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,244) content-size 744x0 children: inline TextNode <#text> @@ -87,7 +87,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline ListItemBox

      at (48,296) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 11, rect: [48,296 90.28125x18] baseline: 13.796875 "Twenty-five" - ListItemMarkerBox <(anonymous)> at (18.390625,297) content-size 29.609375x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (18,297) content-size 29.609375x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,330) content-size 744x0 children: inline TextNode <#text> @@ -96,21 +96,21 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline ListItemBox

    • at (48,330) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 10, rect: [48,330 85.96875x18] baseline: 13.796875 "Twenty-six" - ListItemMarkerBox <(anonymous)> at (18.109375,331) content-size 29.890625x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (18,331) content-size 29.890625x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,348) content-size 744x0 children: inline TextNode <#text> ListItemBox at (48,348) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 12, rect: [48,348 106.953125x18] baseline: 13.796875 "Twenty-seven" - ListItemMarkerBox <(anonymous)> at (18.125,349) content-size 29.875x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (18,349) content-size 29.875x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,366) content-size 744x0 children: inline TextNode <#text> ListItemBox
    • at (48,366) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 12, rect: [48,366 99.359375x18] baseline: 13.796875 "Twenty-eight" - ListItemMarkerBox <(anonymous)> at (17.359375,367) content-size 30.640625x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (17,367) content-size 30.640625x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,384) content-size 744x0 children: inline TextNode <#text> @@ -123,11 +123,11 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600] PaintableWithLines (BlockContainer
        ) [8,16 784x368] PaintableWithLines (BlockContainer(anonymous)) [48,16 744x0] PaintableWithLines (ListItemBox
      1. ) [48,16 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [29.3125,17 18.6875x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [29,17 18.6875x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,34 744x0] PaintableWithLines (ListItemBox
      2. ) [48,34 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [18.03125,35 29.96875x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [18,35 29.96875x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,52 744x0] PaintableWithLines (BlockContainer
        ) [48,52 744x18] @@ -143,7 +143,7 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600] PaintableWithLines (BlockContainer(anonymous)) [48,106 744x18] TextPaintable (TextNode<#text>) PaintableWithLines (ListItemBox
        ) [48,124 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [17.75,125 30.25x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [18,125 30.25x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,142 744x0] PaintableWithLines (BlockContainer(anonymous)) [48,142 744x0] @@ -158,7 +158,7 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600] PaintableWithLines (InlineNode) [70.65625,192 12.609375x18] TextPaintable (TextNode<#text>) PaintableWithLines (ListItemBox
      3. ) [48,226 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [19.09375,227 28.90625x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [19,227 28.90625x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,244 744x0] PaintableWithLines (BlockContainer
        ) [48,244 744x70] @@ -168,20 +168,20 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600] PaintableWithLines (BlockContainer(anonymous)) [48,262 744x18] TextPaintable (TextNode<#text>) PaintableWithLines (ListItemBox

        ) [48,296 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [18.390625,297 29.609375x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [18,297 29.609375x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,330 744x0] PaintableWithLines (BlockContainer(anonymous)) [48,330 744x0] PaintableWithLines (ListItemBox

      4. ) [48,330 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [18.109375,331 29.890625x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [18,331 29.890625x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,348 744x0] PaintableWithLines (ListItemBox) [48,348 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [18.125,349 29.875x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [18,349 29.875x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,366 744x0] PaintableWithLines (ListItemBox
      5. ) [48,366 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [17.359375,367 30.640625x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [17,367 30.640625x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,384 744x0] PaintableWithLines (BlockContainer(anonymous)) [8,400 784x0] diff --git a/Tests/LibWeb/Layout/expected/ol-render-item-values.txt b/Tests/LibWeb/Layout/expected/ol-render-item-values.txt index c052e3b4d82..40155204cc8 100644 --- a/Tests/LibWeb/Layout/expected/ol-render-item-values.txt +++ b/Tests/LibWeb/Layout/expected/ol-render-item-values.txt @@ -9,14 +9,14 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline ListItemBox
      6. at (48,16) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 5, rect: [48,16 47.21875x18] baseline: 13.796875 "Seven" - ListItemMarkerBox <(anonymous)> at (26.9375,17) content-size 21.0625x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (27,17) content-size 21.0625x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,34) content-size 744x0 children: inline TextNode <#text> ListItemBox
      7. at (48,34) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 28, rect: [48,34 242.4375x18] baseline: 13.796875 "Minus one hundred and twelve" - ListItemMarkerBox <(anonymous)> at (7.671875,35) content-size 40.328125x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (8,35) content-size 40.328125x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,52) content-size 744x0 children: inline TextNode <#text> @@ -24,14 +24,14 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline ListItemBox
      8. at (48,52) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 23, rect: [48,52 206.5x18] baseline: 13.796875 "Two to the power of ten" - ListItemMarkerBox <(anonymous)> at (3.15625,53) content-size 44.84375x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (3,53) content-size 44.84375x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,70) content-size 744x0 children: inline TextNode <#text> ListItemBox
      9. at (48,70) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 6, rect: [48,70 51.34375x18] baseline: 13.796875 "Eleven" - ListItemMarkerBox <(anonymous)> at (22.96875,71) content-size 25.03125x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (23,71) content-size 25.03125x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,88) content-size 744x0 children: inline TextNode <#text> @@ -45,19 +45,19 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600] PaintableWithLines (BlockContainer
          ) [8,16 784x72] PaintableWithLines (BlockContainer(anonymous)) [48,16 744x0] PaintableWithLines (ListItemBox
        1. ) [48,16 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [26.9375,17 21.0625x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [27,17 21.0625x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,34 744x0] PaintableWithLines (ListItemBox
        2. ) [48,34 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [7.671875,35 40.328125x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [8,35 40.328125x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,52 744x0] PaintableWithLines (ListItemBox
        3. ) [48,52 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [3.15625,53 44.84375x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [3,53 44.84375x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,70 744x0] PaintableWithLines (ListItemBox
        4. ) [48,70 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [22.96875,71 25.03125x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [23,71 25.03125x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,88 744x0] PaintableWithLines (BlockContainer(anonymous)) [8,104 784x0] diff --git a/Tests/LibWeb/Layout/expected/ol-render-style-list-item.txt b/Tests/LibWeb/Layout/expected/ol-render-style-list-item.txt index 418bea2a7bd..1d423c1597c 100644 --- a/Tests/LibWeb/Layout/expected/ol-render-style-list-item.txt +++ b/Tests/LibWeb/Layout/expected/ol-render-style-list-item.txt @@ -7,56 +7,56 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline ListItemBox
        5. at (48,16) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 3, rect: [48,16 29.8125x18] baseline: 13.796875 "One" - ListItemMarkerBox <(anonymous)> at (29.3125,17) content-size 18.6875x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (29,17) content-size 18.6875x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,34) content-size 744x0 children: inline TextNode <#text> ListItemBox
        6. at (48,34) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 10, rect: [48,34 90.796875x18] baseline: 13.796875 "Twenty-two" - ListItemMarkerBox <(anonymous)> at (18.03125,35) content-size 29.96875x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (18,35) content-size 29.96875x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,52) content-size 744x0 children: inline TextNode <#text> ListItemBox
          at (48,52) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 12, rect: [48,52 104.78125x18] baseline: 13.796875 "Twenty-three" - ListItemMarkerBox <(anonymous)> at (17.75,53) content-size 30.25x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (18,53) content-size 30.25x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,70) content-size 744x0 children: inline TextNode <#text> ListItemBox
        7. at (48,70) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 11, rect: [48,70 97.75x18] baseline: 13.796875 "Twenty-four" - ListItemMarkerBox <(anonymous)> at (19.09375,71) content-size 28.90625x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (19,71) content-size 28.90625x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,88) content-size 744x0 children: inline TextNode <#text> ListItemBox

          at (48,104) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 11, rect: [48,104 90.28125x18] baseline: 13.796875 "Twenty-five" - ListItemMarkerBox <(anonymous)> at (18.390625,105) content-size 29.609375x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (18,105) content-size 29.609375x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,138) content-size 744x0 children: inline TextNode <#text> ListItemBox

        8. at (48,138) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 10, rect: [48,138 85.96875x18] baseline: 13.796875 "Twenty-six" - ListItemMarkerBox <(anonymous)> at (18.109375,139) content-size 29.890625x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (18,139) content-size 29.890625x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,156) content-size 744x0 children: inline TextNode <#text> ListItemBox at (48,156) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 12, rect: [48,156 106.953125x18] baseline: 13.796875 "Twenty-seven" - ListItemMarkerBox <(anonymous)> at (18.125,157) content-size 29.875x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (18,157) content-size 29.875x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,174) content-size 744x0 children: inline TextNode <#text> ListItemBox
        9. at (48,174) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 12, rect: [48,174 99.359375x18] baseline: 13.796875 "Twenty-eight" - ListItemMarkerBox <(anonymous)> at (17.359375,175) content-size 30.640625x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (17,175) content-size 30.640625x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,192) content-size 744x0 children: inline TextNode <#text> @@ -69,35 +69,35 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600] PaintableWithLines (BlockContainer
            ) [8,16 784x176] PaintableWithLines (BlockContainer(anonymous)) [48,16 744x0] PaintableWithLines (ListItemBox
          1. ) [48,16 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [29.3125,17 18.6875x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [29,17 18.6875x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,34 744x0] PaintableWithLines (ListItemBox
          2. ) [48,34 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [18.03125,35 29.96875x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [18,35 29.96875x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,52 744x0] PaintableWithLines (ListItemBox
            ) [48,52 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [17.75,53 30.25x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [18,53 30.25x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,70 744x0] PaintableWithLines (ListItemBox
          3. ) [48,70 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [19.09375,71 28.90625x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [19,71 28.90625x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,88 744x0] PaintableWithLines (ListItemBox

            ) [48,104 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [18.390625,105 29.609375x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [18,105 29.609375x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,138 744x0] PaintableWithLines (ListItemBox

          4. ) [48,138 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [18.109375,139 29.890625x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [18,139 29.890625x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,156 744x0] PaintableWithLines (ListItemBox) [48,156 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [18.125,157 29.875x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [18,157 29.875x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,174 744x0] PaintableWithLines (ListItemBox
          5. ) [48,174 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [17.359375,175 30.640625x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [17,175 30.640625x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,192 744x0] PaintableWithLines (BlockContainer(anonymous)) [8,208 784x0] diff --git a/Tests/LibWeb/Layout/expected/ordered-list.txt b/Tests/LibWeb/Layout/expected/ordered-list.txt index cc7b3df3693..0026bbfc06e 100644 --- a/Tests/LibWeb/Layout/expected/ordered-list.txt +++ b/Tests/LibWeb/Layout/expected/ordered-list.txt @@ -7,21 +7,21 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline ListItemBox
          6. at (48,16) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 7, rect: [48,16 58.78125x18] baseline: 13.796875 "Item 20" - ListItemMarkerBox <(anonymous)> at (17.25,17) content-size 30.75x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (17,17) content-size 30.75x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,34) content-size 744x0 children: inline TextNode <#text> ListItemBox
          7. at (48,34) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 7, rect: [48,34 55.53125x18] baseline: 13.796875 "Item 21" - ListItemMarkerBox <(anonymous)> at (20.5,35) content-size 27.5x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (20,35) content-size 27.5x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,52) content-size 744x0 children: inline TextNode <#text> ListItemBox
          8. at (48,52) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 7, rect: [48,52 58x18] baseline: 13.796875 "Item 22" - ListItemMarkerBox <(anonymous)> at (18.03125,53) content-size 29.96875x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (18,53) content-size 29.96875x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,70) content-size 744x0 children: inline TextNode <#text> @@ -33,28 +33,28 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline ListItemBox
          9. at (48,86) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 6, rect: [48,86 46.71875x18] baseline: 13.796875 "Item 1" - ListItemMarkerBox <(anonymous)> at (29.3125,87) content-size 18.6875x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (29,87) content-size 18.6875x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,104) content-size 744x0 children: inline TextNode <#text> ListItemBox
          10. at (48,104) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 6, rect: [48,104 48.828125x18] baseline: 13.796875 "Item 5" - ListItemMarkerBox <(anonymous)> at (27.203125,105) content-size 20.796875x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (27,105) content-size 20.796875x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,122) content-size 744x0 children: inline TextNode <#text> ListItemBox
          11. at (48,122) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 6, rect: [48,122 49.109375x18] baseline: 13.796875 "Item 6" - ListItemMarkerBox <(anonymous)> at (26.921875,123) content-size 21.078125x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (27,123) content-size 21.078125x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,140) content-size 744x0 children: inline TextNode <#text> ListItemBox
          12. at (48,140) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 6, rect: [48,140 49.09375x18] baseline: 13.796875 "Item 7" - ListItemMarkerBox <(anonymous)> at (26.9375,141) content-size 21.0625x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (27,141) content-size 21.0625x16 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,158) content-size 744x0 children: inline TextNode <#text> @@ -67,34 +67,34 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600] PaintableWithLines (BlockContainer
              ) [8,16 784x54] PaintableWithLines (BlockContainer(anonymous)) [48,16 744x0] PaintableWithLines (ListItemBox
            1. ) [48,16 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [17.25,17 30.75x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [17,17 30.75x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,34 744x0] PaintableWithLines (ListItemBox
            2. ) [48,34 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [20.5,35 27.5x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [20,35 27.5x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,52 744x0] PaintableWithLines (ListItemBox
            3. ) [48,52 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [18.03125,53 29.96875x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [18,53 29.96875x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,70 744x0] PaintableWithLines (BlockContainer(anonymous)) [8,86 784x0] PaintableWithLines (BlockContainer
                ) [8,86 784x72] PaintableWithLines (BlockContainer(anonymous)) [48,86 744x0] PaintableWithLines (ListItemBox
              1. ) [48,86 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [29.3125,87 18.6875x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [29,87 18.6875x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,104 744x0] PaintableWithLines (ListItemBox
              2. ) [48,104 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [27.203125,105 20.796875x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [27,105 20.796875x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,122 744x0] PaintableWithLines (ListItemBox
              3. ) [48,122 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [26.921875,123 21.078125x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [27,123 21.078125x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,140 744x0] PaintableWithLines (ListItemBox
              4. ) [48,140 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [26.9375,141 21.0625x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [27,141 21.0625x16] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,158 744x0] PaintableWithLines (BlockContainer(anonymous)) [8,174 784x0] diff --git a/Tests/LibWeb/Layout/expected/ul-render.txt b/Tests/LibWeb/Layout/expected/ul-render.txt index 80b315556f8..829d74b3330 100644 --- a/Tests/LibWeb/Layout/expected/ul-render.txt +++ b/Tests/LibWeb/Layout/expected/ul-render.txt @@ -11,14 +11,14 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline ListItemBox
              5. at (48,16) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 5, rect: [48,16 47.859375x18] baseline: 13.796875 "Three" - ListItemMarkerBox <(anonymous)> at (24,17) content-size 12x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (34,22) content-size 6x6 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,34) content-size 744x0 children: inline TextNode <#text> ListItemBox
              6. at (48,34) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 4, rect: [48,34 41.5x18] baseline: 13.796875 "Four" - ListItemMarkerBox <(anonymous)> at (24,35) content-size 12x16 children: not-inline + ListItemMarkerBox <(anonymous)> at (34,40) content-size 6x6 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,52) content-size 744x0 children: inline TextNode <#text> @@ -30,14 +30,14 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline ListItemBox
              7. at (48,68) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 3, rect: [48,68 29.8125x18] baseline: 13.796875 "One" - ListItemMarkerBox <(anonymous)> at (40,69) content-size 4x8 children: not-inline + ListItemMarkerBox <(anonymous)> at (41,71) content-size 3x3 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,86) content-size 744x0 children: inline TextNode <#text> ListItemBox
              8. at (48,86) content-size 744x18 children: inline frag 0 from TextNode start: 0, length: 3, rect: [48,86 33.875x18] baseline: 13.796875 "Two" - ListItemMarkerBox <(anonymous)> at (40,87) content-size 4x8 children: not-inline + ListItemMarkerBox <(anonymous)> at (41,89) content-size 3x3 children: not-inline TextNode <#text> BlockContainer <(anonymous)> at (48,104) content-size 744x0 children: inline TextNode <#text> @@ -52,22 +52,22 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600] PaintableWithLines (BlockContainer
                  .A) [8,16 784x36] PaintableWithLines (BlockContainer(anonymous)) [48,16 744x0] PaintableWithLines (ListItemBox
                • ) [48,16 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [24,17 12x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [34,22 6x6] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,34 744x0] PaintableWithLines (ListItemBox
                • ) [48,34 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [24,35 12x16] + MarkerPaintable (ListItemMarkerBox(anonymous)) [34,40 6x6] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,52 744x0] PaintableWithLines (BlockContainer(anonymous)) [8,68 784x0] PaintableWithLines (BlockContainer
                    .B) [8,68 784x36] PaintableWithLines (BlockContainer(anonymous)) [48,68 744x0] PaintableWithLines (ListItemBox
                  • ) [48,68 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [40,69 4x8] + MarkerPaintable (ListItemMarkerBox(anonymous)) [41,71 3x3] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,86 744x0] PaintableWithLines (ListItemBox
                  • ) [48,86 744x18] - MarkerPaintable (ListItemMarkerBox(anonymous)) [40,87 4x8] + MarkerPaintable (ListItemMarkerBox(anonymous)) [41,89 3x3] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [48,104 744x0] PaintableWithLines (BlockContainer(anonymous)) [8,120 784x0] diff --git a/Tests/LibWeb/Screenshot/images/details-open-then-closed.png b/Tests/LibWeb/Screenshot/images/details-open-then-closed.png index e09e94f424d..552aa6be803 100644 Binary files a/Tests/LibWeb/Screenshot/images/details-open-then-closed.png and b/Tests/LibWeb/Screenshot/images/details-open-then-closed.png differ diff --git a/Tests/LibWeb/Screenshot/images/ordered-list-ref.png b/Tests/LibWeb/Screenshot/images/ordered-list-ref.png index 401e2bdfe20..af2f674e6d8 100644 Binary files a/Tests/LibWeb/Screenshot/images/ordered-list-ref.png and b/Tests/LibWeb/Screenshot/images/ordered-list-ref.png differ