mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 19:47:17 +02:00
LibWeb: Fix hit testing for text inside stacking context roots
When an element creates a stacking context (e.g. via position: relative with z-index), its text fragments were not being hit tested. This was because PaintableBox::hit_test() returns early when it has a stacking context, and StackingContext::hit_test() only iterated child paintables, not the stacking context root's own fragments. Fix this by extracting fragment hit testing into a new method hit_test_fragments() on PaintableWithLines, and calling it from StackingContext::hit_test() when the stacking context root is a PaintableWithLines.
This commit is contained in:
committed by
Alexander Kalenik
parent
afdde488c3
commit
d91c646788
Notes:
github-actions[bot]
2026-02-06 11:07:59 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/d91c6467881 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7613 Reviewed-by: https://github.com/kalenikaliaksandr ✅
@@ -0,0 +1,4 @@
|
||||
node: #text
|
||||
text: LMAO
|
||||
|
||||
indexInNode: 1
|
||||
Reference in New Issue
Block a user