mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibWeb: Support relative lengths in calc
color values
Gains us ~40 WPT tests.
This commit is contained in:
parent
62d138ebf7
commit
9ab7c5d08d
Notes:
github-actions[bot]
2025-07-04 12:20:09 +00:00
Author: https://github.com/Calme1709
Commit: 9ab7c5d08d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5284
Reviewed-by: https://github.com/AtkinsSJ ✅
17 changed files with 169 additions and 74 deletions
|
@ -1174,7 +1174,8 @@ Optional<String> effective_command_value(GC::Ptr<DOM::Node> node, FlyString cons
|
|||
if (!background_color.has_value())
|
||||
return NumericLimits<u8>::max();
|
||||
VERIFY(is<Layout::NodeWithStyle>(node->layout_node()));
|
||||
return background_color.value()->to_color(*static_cast<Layout::NodeWithStyle*>(node->layout_node()), {}).alpha();
|
||||
auto& layout_node = *static_cast<Layout::NodeWithStyle*>(node->layout_node());
|
||||
return background_color.value()->to_color(layout_node, { .length_resolution_context = CSS::Length::ResolutionContext::for_layout_node(layout_node) }).alpha();
|
||||
};
|
||||
while (resolved_background_alpha() == 0 && node->parent() && is<DOM::Element>(*node->parent()))
|
||||
node = node->parent();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue