LibWeb: Return absolutized computed value for border width properties
Some checks are pending
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, 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-04-04 21:54:06 +01:00 committed by Jelle Raaijmakers
commit 8738987e44
Notes: github-actions[bot] 2025-04-04 21:46:03 +00:00
8 changed files with 169 additions and 31 deletions

View file

@ -944,6 +944,22 @@ RefPtr<CSSStyleValue const> CSSStyleProperties::style_value_for_computed_propert
// -> Any other property
// The resolved value is the computed value.
// NOTE: This is handled inside the `default` case.
case PropertyID::BorderBottomWidth: {
auto border_bottom_width = layout_node.computed_values().border_bottom();
return LengthStyleValue::create(Length::make_px(border_bottom_width.width));
}
case PropertyID::BorderLeftWidth: {
auto border_left_width = layout_node.computed_values().border_left();
return LengthStyleValue::create(Length::make_px(border_left_width.width));
}
case PropertyID::BorderRightWidth: {
auto border_right_width = layout_node.computed_values().border_right();
return LengthStyleValue::create(Length::make_px(border_right_width.width));
}
case PropertyID::BorderTopWidth: {
auto border_top_width = layout_node.computed_values().border_top();
return LengthStyleValue::create(Length::make_px(border_top_width.width));
}
case PropertyID::WebkitTextFillColor:
return CSSColorValue::create_from_color(layout_node.computed_values().webkit_text_fill_color(), ColorSyntax::Modern);
case PropertyID::Invalid: