<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="compositor-touch-hit-rects.css">
<style>
html {
font-size: 10px;
}
.testcase, .testcase * {
border: 1px solid red;
padding: 5px;
}
#fixed {
position: fixed;
top: 4px;
left: 16px;
}
.spacer {
height: 500px;
}
</style>
</head>
<body id='tests'>
<br><br>
<div id='fixed' class='testcase'>
Fixed-position div inside iframe
</div>
<div class='spacer'></div>
<script>
if (window.testRunner)
document.documentElement.setAttribute('dumpRenderTree', 'true');
function handler() {};
frameElement.addHandlers = function() {
document.getElementById('fixed').addEventListener('touchstart', handler, false);
}
frameElement.removeHandlers = function() {
document.getElementById('fixed').removeEventListener('touchstart', handler, false);
}
// Scrolling shouldn't affect the fixed-position div
document.scrollingElement.scrollTop = 105;
</script>
</body>
</html>