Files
ladybird/Tests/LibWeb/Text/expected/Layout/intrinsic-size-cache-invalidation-abspos-boundary.txt
Aliaksandr Kalenik 5336c53171 LibWeb: Stop intrinsic size cache invalidation at abspos boundaries
When content changes inside a layout node, we now reset intrinsic size
caches only up to the nearest absolutely positioned ancestor, rather
than all the way to the document root.

This optimization is safe because absolutely positioned elements don't
contribute to their ancestors' intrinsic sizes - they are skipped in
min/max content width calculations.

The needs_layout_update flag still propagates to all ancestors so the
document knows layout is needed. Only the cache reset is bounded.
2026-01-05 23:00:06 +01:00

52 lines
1.4 KiB
Plaintext

=== Test 1: Content change inside abspos doesn't affect fit-content ancestor ===
Initial width: 210
After abspos content change: 210
PASS: true
=== Test 2: Content change in in-flow element DOES affect ancestor ===
Initial width: 94
After in-flow content change: 609
PASS: true
=== Test 3: Position toggle static to absolute shrinks container ===
Initial width: 210
After static->absolute: 110
PASS: true
=== Test 4: Position toggle absolute to static grows container ===
Initial width: 110
After absolute->static: 210
PASS: true
=== Test 5: Nested abspos - outer container unaffected ===
Initial width: 110
After nested abspos content change: 110
PASS: true
=== Test 6: Fixed position element (also abspos) doesn't affect ancestor ===
Initial width: 210
After fixed content change: 210
PASS: true
=== Test 7: In-flow sibling of abspos DOES affect ancestor ===
Initial width: 120
After sibling content change: 598
PASS: true
=== Test 8: Abspos with fit-content updates its own size ===
Initial abspos width: 150
After content change abspos width: 405
Container width (should be ~210): 210
PASS abspos grew: true
PASS container unchanged: true
=== Test 9: Transform containing block - abspos inside doesn't affect outer ===
Initial width: 110
After content change: 110
PASS: true
=== Test 10: Flex container - abspos child doesn't affect flex sizing ===
Initial width: 110
After content change: 110
PASS: true