瀏覽代碼

LibWeb: Use the correct containing block for position:absolute width

Andreas Kling 4 年之前
父節點
當前提交
a5422a210f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Libraries/LibWeb/Layout/BlockFormattingContext.cpp

+ 1 - 1
Libraries/LibWeb/Layout/BlockFormattingContext.cpp

@@ -274,7 +274,7 @@ void BlockFormattingContext::compute_height_for_block_level_replaced_element_in_
 
 void BlockFormattingContext::compute_width_for_absolutely_positioned_block(Box& box)
 {
-    auto& containing_block = context_box();
+    auto& containing_block = *box.containing_block();
     auto& style = box.style();
     auto zero_value = CSS::Length::make_px(0);