summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-10-13 19:16:47 +0200
committerAndreas Kling <kling@serenityos.org>2021-10-13 23:56:26 +0200
commitad50e328e09444c3b23ac5e9f2ca604efba301a4 (patch)
treea32c84a4f246c66d8937bfd2d2243c737d5e5e77 /Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp
parent439721f38c968d1151e8489df352be8aa407cc3d (diff)
downloadserenity-ad50e328e09444c3b23ac5e9f2ca604efba301a4.zip
LibWeb: Fix bogus 'none' values for resolved min-width and min-height
In CSS 'none' is not a valid value for min-width or min-height. The fallback resolved value should be 'auto' for them.
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp')
-rw-r--r--Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp b/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp
index 87f5943e8a..3d3a70fe20 100644
--- a/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp
+++ b/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp
@@ -527,8 +527,8 @@ RefPtr<StyleValue> ResolvedCSSStyleDeclaration::style_value_for_property(Layout:
case CSS::PropertyID::Width:
return LengthStyleValue::create(layout_node.computed_values().width());
case CSS::PropertyID::MinWidth:
- if (layout_node.computed_values().min_width().is_undefined())
- return IdentifierStyleValue::create(CSS::ValueID::None);
+ if (layout_node.computed_values().min_width().is_undefined_or_auto())
+ return IdentifierStyleValue::create(CSS::ValueID::Auto);
return LengthStyleValue::create(layout_node.computed_values().min_width());
case CSS::PropertyID::MaxWidth:
if (layout_node.computed_values().max_width().is_undefined())
@@ -537,8 +537,8 @@ RefPtr<StyleValue> ResolvedCSSStyleDeclaration::style_value_for_property(Layout:
case CSS::PropertyID::Height:
return LengthStyleValue::create(layout_node.computed_values().height());
case CSS::PropertyID::MinHeight:
- if (layout_node.computed_values().min_height().is_undefined())
- return IdentifierStyleValue::create(CSS::ValueID::None);
+ if (layout_node.computed_values().min_height().is_undefined_or_auto())
+ return IdentifierStyleValue::create(CSS::ValueID::Auto);
return LengthStyleValue::create(layout_node.computed_values().min_height());
case CSS::PropertyID::MaxHeight:
if (layout_node.computed_values().max_height().is_undefined())