LibWeb: Return the correct computed value for opacity properties
Some checks are pending
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run

This commit is contained in:
Tim Ledbetter 2025-06-18 18:22:15 +01:00 committed by Jelle Raaijmakers
parent 269d5bb40e
commit 07b3b70a10
Notes: github-actions[bot] 2025-06-19 08:28:40 +00:00
4 changed files with 62 additions and 8 deletions

View file

@ -1071,6 +1071,22 @@ RefPtr<CSSStyleValue const> CSSStyleProperties::style_value_for_computed_propert
return get_computed_value(property_id);
}
case PropertyID::Opacity: {
auto opacity = layout_node.computed_values().opacity();
return NumberStyleValue::create(opacity);
}
case PropertyID::FillOpacity: {
auto opacity = layout_node.computed_values().fill_opacity();
return NumberStyleValue::create(opacity);
}
case PropertyID::StopOpacity: {
auto opacity = layout_node.computed_values().stop_opacity();
return NumberStyleValue::create(opacity);
}
case PropertyID::StrokeOpacity: {
auto opacity = layout_node.computed_values().stroke_opacity();
return NumberStyleValue::create(opacity);
}
case PropertyID::OutlineWidth: {
auto outline_width = layout_node.computed_values().outline_width();
return LengthStyleValue::create(outline_width);