Forráskód Böngészése

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

This was introducing a bunch of unwanted margins.
Andreas Kling 5 éve
szülő
commit
9858e2632c
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      Libraries/LibHTML/Layout/LayoutBlock.cpp

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