mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 08:00:20 +00:00
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.
This commit is contained in:
parent
439721f38c
commit
ad50e328e0
Notes:
sideshowbarker
2024-07-18 02:46:55 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/ad50e328e09
1 changed files with 4 additions and 4 deletions
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue