LibWeb: Store stroke-opacity in computed form in ComputedProperties

This commit is contained in:
Callum Law 2025-09-08 00:14:40 +12:00 committed by Tim Ledbetter
commit 91e88ad6e8
Notes: github-actions[bot] 2025-09-08 10:06:51 +00:00
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::StrokeOpacity: {
auto opacity = layout_node.computed_values().stroke_opacity();
return NumberStyleValue::create(opacity);
}
case PropertyID::FloodOpacity: {
auto opacity = layout_node.computed_values().flood_opacity();
return NumberStyleValue::create(opacity);

View file

@ -509,8 +509,7 @@ NumberOrCalculated ComputedProperties::stroke_miterlimit() const
float ComputedProperties::stroke_opacity() const
{
auto const& value = property(PropertyID::StrokeOpacity);
return resolve_opacity_value(value);
return property(PropertyID::StrokeOpacity).as_number().number();
}
float ComputedProperties::stop_opacity() const

View file

@ -3286,6 +3286,7 @@ NonnullRefPtr<StyleValue const> StyleComputer::compute_value_of_property(Propert
case PropertyID::FillOpacity:
case PropertyID::Opacity:
case PropertyID::StopOpacity:
case PropertyID::StrokeOpacity:
return compute_opacity(specified_value, computation_context);
default:
// FIXME: We should replace this with a VERIFY_NOT_REACHED() once all properties have their own handling.