mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
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:
parent
f4ee341a14
commit
05d6090fcc
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user