mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-23 16:40:03 +00:00
LibWeb: Compute and propagate tree-counting function resolution context
Tree counting functions should be resolved at style computation time - to do this we will need to know the element's sibling count and index. This commit computes that information and propagates it to the various `StyleValue::to_computed_value` methods.
This commit is contained in:
parent
fd31fbd84b
commit
9cd23e3ae5
Notes:
github-actions[bot]
2025-10-20 15:13:50 +00:00
Author: https://github.com/Calme1709
Commit: 9cd23e3ae5
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6426
Reviewed-by: https://github.com/AtkinsSJ ✅
9 changed files with 78 additions and 12 deletions
|
@ -844,8 +844,10 @@ CSS::RequiredInvalidationAfterStyleChange Element::recompute_inherited_style()
|
|||
if (invalidation.is_none() && old_values_with_relative_units.is_empty())
|
||||
return invalidation;
|
||||
|
||||
document().style_computer().compute_font(*computed_properties, AbstractElement { *this });
|
||||
document().style_computer().compute_property_values(*computed_properties);
|
||||
AbstractElement abstract_element { *this };
|
||||
|
||||
document().style_computer().compute_font(*computed_properties, abstract_element);
|
||||
document().style_computer().compute_property_values(*computed_properties, abstract_element);
|
||||
|
||||
for (auto [property_id, old_value] : old_values_with_relative_units) {
|
||||
auto const& new_value = computed_properties->property(static_cast<CSS::PropertyID>(property_id));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue