diff options
author | Tobias Christiansen <tobyase@serenityos.org> | 2021-09-18 13:15:53 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-18 15:50:47 +0200 |
commit | ddb7402649057696719512880c86eb7b84d8c054 (patch) | |
tree | 379371ad7c9bdd34f7a02c00aafbceca2df7c3e4 /Userland | |
parent | aed56b46d45e3fb32370632abfeccbaf9705979e (diff) | |
download | serenity-ddb7402649057696719512880c86eb7b84d8c054.zip |
LibWeb: Also avoid setting definite size for height
This patch patches ef22a1b to also check for is_auto() on the height
property when setting definite_height.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/Node.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/Node.cpp b/Userland/Libraries/LibWeb/Layout/Node.cpp index e08c28ecd9..9863a37d10 100644 --- a/Userland/Libraries/LibWeb/Layout/Node.cpp +++ b/Userland/Libraries/LibWeb/Layout/Node.cpp @@ -335,7 +335,7 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& specified_style) computed_values.set_min_width(specified_style.length_or_fallback(CSS::PropertyID::MinWidth, {})); computed_values.set_max_width(specified_style.length_or_fallback(CSS::PropertyID::MaxWidth, {})); - if (auto height = specified_style.property(CSS::PropertyID::Height); height.has_value()) + if (auto height = specified_style.property(CSS::PropertyID::Height); height.has_value() && !height.value()->is_auto()) m_has_definite_height = true; computed_values.set_height(specified_style.length_or_fallback(CSS::PropertyID::Height, {})); computed_values.set_min_height(specified_style.length_or_fallback(CSS::PropertyID::MinHeight, {})); |