1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:18:13 +00:00

LibWeb: Fix unnecessary wrapping of block boxes in anonymous blocks

Outside of tables, we don't need to wrap block-level boxes in anymous
blocks. Only inline-level boxes need this treatment.
This commit is contained in:
Andreas Kling 2021-01-02 03:30:04 +01:00
parent 9bdffc9eb4
commit 5116b94114
2 changed files with 27 additions and 21 deletions

View file

@ -144,7 +144,7 @@ void dump_tree(StringBuilder& builder, const Layout::Node& layout_node, bool sho
if (!is<Layout::Box>(layout_node)) {
builder.appendff("{}{}{} <{}{}{}>",
nonbox_color_on,
layout_node.class_name(),
layout_node.class_name().substring_view(13),
color_off,
tag_name,
nonbox_color_on,
@ -157,7 +157,7 @@ void dump_tree(StringBuilder& builder, const Layout::Node& layout_node, bool sho
auto& box = downcast<Layout::Box>(layout_node);
builder.appendff("{}{}{} <{}{}{}{}> ",
box_color_on,
box.class_name(),
box.class_name().substring_view(13),
color_off,
box_color_on,
tag_name,