From 9858e2632c3eac9756551f2ade3a7eb13a25dac8 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 5 Oct 2019 23:27:27 +0200 Subject: [PATCH] LibHTML: Let's not have anonymous blocks inherit their parent's style This was introducing a bunch of unwanted margins. --- Libraries/LibHTML/Layout/LayoutBlock.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibHTML/Layout/LayoutBlock.cpp b/Libraries/LibHTML/Layout/LayoutBlock.cpp index ac30819946..bd5dd57c82 100644 --- a/Libraries/LibHTML/Layout/LayoutBlock.cpp +++ b/Libraries/LibHTML/Layout/LayoutBlock.cpp @@ -15,7 +15,7 @@ LayoutBlock::~LayoutBlock() LayoutNode& LayoutBlock::inline_wrapper() { if (!last_child() || !last_child()->is_block() || last_child()->node() != nullptr) { - append_child(adopt(*new LayoutBlock(nullptr, style()))); + append_child(adopt(*new LayoutBlock(nullptr, StyleProperties::create()))); } return *last_child(); }