mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 04:08:08 +00:00
LibWeb: Make computed opacity always available
No need to store opacity as Optional<float> as there's always a value (and the default initial value is 1.)
This commit is contained in:
@@ -501,12 +501,8 @@ RefPtr<StyleValue> ResolvedCSSStyleDeclaration::style_value_for_property(Layout:
|
||||
return NumericStyleValue::create_float(layout_node.computed_values().flex_grow());
|
||||
case CSS::PropertyID::FlexShrink:
|
||||
return NumericStyleValue::create_float(layout_node.computed_values().flex_shrink());
|
||||
case CSS::PropertyID::Opacity: {
|
||||
auto maybe_opacity = layout_node.computed_values().opacity();
|
||||
if (!maybe_opacity.has_value())
|
||||
return {};
|
||||
return NumericStyleValue::create_float(maybe_opacity.release_value());
|
||||
}
|
||||
case CSS::PropertyID::Opacity:
|
||||
return NumericStyleValue::create_float(layout_node.computed_values().opacity());
|
||||
case CSS::PropertyID::JustifyContent:
|
||||
return IdentifierStyleValue::create(to_css_value_id(layout_node.computed_values().justify_content()));
|
||||
case CSS::PropertyID::BoxShadow: {
|
||||
|
||||
Reference in New Issue
Block a user