blob: 6394f3ad1f3161d956d7d363ecf0e2922c11a5ee [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>Hit testing of iframe with clip-path on a parent inline element</title>
<script src="../../resources/js-test.js"></script>
<script type="text/javascript">
function runTest() {
description("Test clip-path is accounted for during hit-testing on an iframe's inline parent.");
shouldBeEqualToString("document.elementFromPoint(50, 50).localName", "body");
}
</script>
<style>
#container, iframe {
width: 400px;
height: 300px;
}
#container {
position: absolute;
top: 0;
left: 0px;
}
#container > span {
clip-path: inset(100px 0 0 0);
font: 300px sans-serif;
vertical-align: top;
}
iframe {
border: 0;
}
p {
pointer-events: none;
}
</style>
</head>
<body>
<div id="container"><span><iframe srcdoc="<body style='margin: 0; background: blue'></body>" onload="runTest()"></iframe></span></div>
</body>
</html>