Files
ladybird/Tests/LibWeb/Text/input/hit_testing/visibility-visible-inside-hidden-stacking-context.html
Andreas Kling 81942a84f3 LibWeb: Allow hit testing visible children of hidden stacking contexts
Apply the same fix from the previous commit to StackingContext hit test.
Hidden stacking context roots should still allow their visible children
to be hit.
2026-01-25 10:55:30 +01:00

27 lines
702 B
HTML

<!doctype html>
<body style="margin: 0">
<style>
#hidden-stacking-context {
visibility: hidden;
position: absolute;
z-index: 1;
font-size: 100px;
}
#visible-child { visibility: visible; }
</style>
<div id="hidden-stacking-context"><div id="visible-child">KEK</div></div>
<script src="../include.js"></script>
<script>
test(() => {
// Hit test in the middle of the visible text inside hidden stacking context
const result = internals.hitTest(50, 50);
if (result && result.node) {
printElement(result.node);
printElement(result.node.parentNode);
} else {
println("FAIL: no hit test result");
}
});
</script>
</body>