ソースを参照

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

This was introducing a bunch of unwanted margins.
Andreas Kling 5 年 前
コミット
9858e2632c
1 ファイル変更1 行追加1 行削除
  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()
 LayoutNode& LayoutBlock::inline_wrapper()
 {
 {
     if (!last_child() || !last_child()->is_block() || last_child()->node() != nullptr) {
     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();
     return *last_child();
 }
 }