From 439721f38c968d1151e8489df352be8aa407cc3d Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 13 Oct 2021 18:54:00 +0200 Subject: [PATCH] LibWeb: CSS display:position does not imply definite size Per css-sizing-3: Additionally, the size of the containing block of an absolutely positioned element is always definite with respect to that element. As I understand this, it doesn't mean that all absolutely positioned boxes have definite size, but that the containing block of an absolutely positioned descendant has definite size from the perspective of the descendant. --- Userland/Libraries/LibWeb/Layout/Node.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Userland/Libraries/LibWeb/Layout/Node.cpp b/Userland/Libraries/LibWeb/Layout/Node.cpp index cb9b112220..f98142ccbd 100644 --- a/Userland/Libraries/LibWeb/Layout/Node.cpp +++ b/Userland/Libraries/LibWeb/Layout/Node.cpp @@ -276,13 +276,8 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& specified_style) computed_values.set_align_items(align_items.value()); auto position = specified_style.position(); - if (position.has_value()) { + if (position.has_value()) computed_values.set_position(position.value()); - if (position.value() == CSS::Position::Absolute) { - m_has_definite_width = true; - m_has_definite_height = true; - } - } auto text_align = specified_style.text_align(); if (text_align.has_value())