Revert "LibWeb: Invalidate layout on opacity change to/from zero"

This partially reverts commit 3aff3327c4
by removing the code change but keeping the added test.

Now that paintables visibility caching has been reverted, this is no
longer doing anything except causing excessive relayouts on pages
like https://linear.app/
This commit is contained in:
Andreas Kling 2025-08-19 11:35:42 +02:00 committed by Jelle Raaijmakers
parent f4ee341a14
commit 05d6090fcc

View File

@ -66,12 +66,6 @@ RequiredInvalidationAfterStyleChange compute_property_invalidation(CSS::Property
if (old_value_opacity != new_value_opacity && (old_value_opacity == 1 || new_value_opacity == 1)) {
invalidation.rebuild_stacking_context_tree = true;
}
// OPTIMIZATION: Paintables compute and store whether they are visible (which is dependent on whether opacity
// is equal to zero) on construction as a performance optimization - this means that if opacity
// changes to or from an opacity of zero we need to relayout to recompute paintable visibility.
if (old_value_opacity != new_value_opacity && (old_value_opacity == 0 || new_value_opacity == 0))
invalidation.relayout = true;
} else if (CSS::property_affects_stacking_context(property_id)) {
invalidation.rebuild_stacking_context_tree = true;
}