mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-26 20:26:53 +00:00
LibWeb: Simplify obtaining used value for PaintableBox
No functional changes.
This commit is contained in:
parent
ff5f80a196
commit
39f36327d4
Notes:
github-actions[bot]
2025-08-18 10:05:52 +00:00
Author: https://github.com/gmta
Commit: 39f36327d4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5894
Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 2 additions and 4 deletions
|
@ -510,10 +510,8 @@ RefPtr<StyleValue const> CSSStyleProperties::style_value_for_computed_property(L
|
|||
auto used_value_for_property = [&layout_node, property_id](Function<CSSPixels(Painting::PaintableBox const&)>&& used_value_getter) -> Optional<CSSPixels> {
|
||||
auto const& display = layout_node.computed_values().display();
|
||||
if (!display.is_none() && !display.is_contents() && layout_node.first_paintable()) {
|
||||
if (layout_node.first_paintable()->is_paintable_box()) {
|
||||
auto const& paintable_box = static_cast<Painting::PaintableBox const&>(*layout_node.first_paintable());
|
||||
return used_value_getter(paintable_box);
|
||||
}
|
||||
if (auto const* paintable_box = as_if<Painting::PaintableBox>(layout_node.first_paintable()))
|
||||
return used_value_getter(*paintable_box);
|
||||
dbgln("FIXME: Support getting used value for property `{}` on {}", string_from_property_id(property_id), layout_node.debug_description());
|
||||
}
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue