blob: b4ac9030ec594c0a963f20a63dbaf0ad3156dde2 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>This test is successful if fixed position elements re-layout correctly on page scale changes</title>
<style>
.fixed_size {
position:fixed;
background-color:#ccffcc;
width:50px;
height:50px;
}
.percentage_size {
position:fixed;
background-color:#ccccff;
width:10%;
height:10%;
}
</style>
</head>
<body onload="runTest();" style="width:1600px;height:1200px;margin:0;">
<div class="fixed_size" style="left:10px;top:20px"></div>
<div class="fixed_size" style="right:30px;top:40px"></div>
<div class="fixed_size" style="left:50px;bottom:60px"></div>
<div class="fixed_size" style="right:70px;bottom:80px"></div>
<div class="percentage_size" style="left:40%;top:35%"></div>
<div class="percentage_size" style="right:30%;top:25%"></div>
<div class="percentage_size" style="left:20%;bottom:15%"></div>
<div class="percentage_size" style="right:10%;bottom:5%"></div>
<div id="spacer" style="width: 1700px; height: 1300px"></div>
<script>
function runTest() {
if (window.internals && window.eventSender) {
window.internals.setPageScaleFactorLimits(0.5, 4);
window.internals.setPageScaleFactor(0.5);
// Force scrollbar to hide and re-layout immediately.
var spacer = document.getElementById('spacer');
spacer.style.display = "none";
document.body.offsetTop;
}
}
</script>
</body>
</html>