1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 06:25:07 +00:00

LibHTML: Let's not have anonymous blocks inherit their parent's style

This was introducing a bunch of unwanted margins.
This commit is contained in:
Andreas Kling 2019-10-05 23:27:27 +02:00
parent ee567cdc3d
commit 9858e2632c

View file

@ -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();
}