mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
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.
27 lines
702 B
HTML
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>
|