LibWeb: Early return when invalidations=none in inherited style update

This allows to skip a bunch of unnecessary work performed by
`apply_style()`.
This commit is contained in:
Aliaksandr Kalenik 2025-02-17 19:26:34 +01:00 committed by Andreas Kling
commit 1e07227e98
Notes: github-actions[bot] 2025-02-17 23:25:48 +00:00

View file

@ -616,6 +616,9 @@ CSS::RequiredInvalidationAfterStyleChange Element::recompute_inherited_style()
invalidation |= CSS::compute_property_invalidation(property_id, old_value, new_value);
}
if (invalidation.is_none())
return invalidation;
document().style_computer().compute_font(*computed_properties, this, {});
document().style_computer().absolutize_values(*computed_properties);