Files
ladybird/Tests/LibWeb/Text/expected/css/getComputedStyle-targeted-style-update.txt
Andreas Kling fb11732526 LibWeb: Fix style inheritance for slotted elements
Two issues prevented slotted elements from correctly inheriting
styles from their assigned slot:

1. Element::element_to_inherit_style_from() was skipping the slot
   element and returning the shadow host instead. This meant slotted
   elements inherited from the host, completely ignoring any styles
   on the slot itself.

2. When a slot element's style changed during the style tree walk,
   its assigned (slotted) nodes were never marked for recomputation.
   The tree walk follows the DOM tree, but slotted elements are DOM
   children of the shadow host, not the slot, so they were missed.

Fix (1) by returning the slot directly as the inheritance parent.
Fix (2) by marking assigned nodes dirty in update_style_recursively
when a slot's style changes.
2026-02-13 10:22:30 +01:00

11 lines
181 B
Plaintext

1: rgb(0, 0, 0)
2: rgb(255, 0, 0)
3: rgb(0, 128, 0)
4: rgb(0, 0, 255)
5: rgb(255, 0, 0)
5b: rgb(0, 128, 0)
6: rgb(0, 0, 255)
7: rgb(0, 128, 0)
8a: rgb(0, 0, 255)
8b: rgb(0, 0, 255)