mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
When painting inspector overlays for a highlighted node, we want to
ignore any clipping that may be going on due to explicit CSS properties,
stacking contexts or similar. That makes sure our overlay is not
obscured by the clipping.
This fixes a regression from 009ddd4823.
29 lines
650 B
HTML
29 lines
650 B
HTML
<!DOCTYPE html>
|
|
<link rel="match" href="../expected/inspector-highlighted-node-overlay-is-not-clipped-ref.html" />
|
|
<style>
|
|
#outer {
|
|
position: relative;
|
|
width: 300px;
|
|
height: 300px;
|
|
background-color: blue;
|
|
clip-path: inset(50px);
|
|
}
|
|
#inner {
|
|
position: absolute;
|
|
left: 100px;
|
|
top: 100px;
|
|
width: 100px;
|
|
height: 100px;
|
|
background-color: green;
|
|
}
|
|
</style>
|
|
<div id="outer"><div id="inner"></div></div>
|
|
<script>
|
|
if (!window.internals?.setHighlightedNode) {
|
|
document.body.innerText = "FAIL";
|
|
} else {
|
|
const elementToHighlight = document.getElementById("inner");
|
|
window.internals.setHighlightedNode(elementToHighlight);
|
|
}
|
|
</script>
|