LibWeb: Store flood-opacity in computed form in ComputedProperties

This commit is contained in:
Callum Law 2025-09-08 00:16:12 +12:00 committed by Tim Ledbetter
parent 91e88ad6e8
commit 5a7eaf6f73
3 changed files with 2 additions and 6 deletions

View File

@ -813,10 +813,6 @@ RefPtr<StyleValue const> CSSStyleProperties::style_value_for_computed_property(L
return get_computed_value(property_id);
}
case PropertyID::FloodOpacity: {
auto opacity = layout_node.computed_values().flood_opacity();
return NumberStyleValue::create(opacity);
}
case PropertyID::WebkitTextFillColor:
return resolve_color_style_value(get_computed_value(property_id), layout_node.computed_values().webkit_text_fill_color());
case PropertyID::Invalid:

View File

@ -531,8 +531,7 @@ ClipRule ComputedProperties::clip_rule() const
float ComputedProperties::flood_opacity() const
{
auto const& value = property(PropertyID::FloodOpacity);
return resolve_opacity_value(value);
return property(PropertyID::FloodOpacity).as_number().number();
}
FlexDirection ComputedProperties::flex_direction() const

View File

@ -3284,6 +3284,7 @@ NonnullRefPtr<StyleValue const> StyleComputer::compute_value_of_property(Propert
case PropertyID::OutlineWidth:
return compute_border_or_outline_width(specified_value, get_property_specified_value(PropertyID::OutlineStyle), computation_context);
case PropertyID::FillOpacity:
case PropertyID::FloodOpacity:
case PropertyID::Opacity:
case PropertyID::StopOpacity:
case PropertyID::StrokeOpacity: