summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorTobias Christiansen <tobyase@serenityos.org>2021-09-15 20:06:02 +0200
committerAndreas Kling <kling@serenityos.org>2021-09-15 22:28:28 +0200
commitef22a1b2dc8c3f4c52a5be1385eeb856c4cd4e36 (patch)
tree5b1f62299514e530fe5cfe65e54e61c6a487e40b /Userland
parent6c15eeb3679cde6239fd0453102371180051b23e (diff)
downloadserenity-ef22a1b2dc8c3f4c52a5be1385eeb856c4cd4e36.zip
LibWeb: Avoid setting definite {width,height} when "auto" is specified
Auto is not specified at all.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibWeb/Layout/Node.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/Node.cpp b/Userland/Libraries/LibWeb/Layout/Node.cpp
index 84a4f38af9..b8205cb667 100644
--- a/Userland/Libraries/LibWeb/Layout/Node.cpp
+++ b/Userland/Libraries/LibWeb/Layout/Node.cpp
@@ -329,7 +329,7 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& specified_style)
if (computed_values.opacity() == 0)
m_visible = false;
- if (auto width = specified_style.property(CSS::PropertyID::Width); width.has_value())
+ if (auto width = specified_style.property(CSS::PropertyID::Width); width.has_value() && !width.value()->is_auto())
m_has_definite_width = true;
computed_values.set_width(specified_style.length_or_fallback(CSS::PropertyID::Width, {}));
computed_values.set_min_width(specified_style.length_or_fallback(CSS::PropertyID::MinWidth, {}));