<!DOCTYPE html> | |
<style> | |
html { | |
display: grid; | |
position: absolute; | |
grid: 100px 400px / 100px 400px; | |
} | |
body { | |
position: absolute; | |
grid-column: 2 / 3; | |
grid-row: 2 / 3; | |
width: 100%; | |
} | |
</style> | |
This text and input should appear at 100x100 position. | |
Like if they have a left and top margin of 100px. | |
<input autofocus> | |
<script> | |
if (window.testRunner) | |
window.testRunner.waitUntilDone(); | |
// "autofocus" is needed to force the simplified layout call. | |
// We are removing the focus here to match the expected file and avoid issues with the caret. | |
// We need a small timeout so "blur()" is run after "autofocus". | |
setTimeout(function() { | |
document.querySelector("input").blur(); | |
if (window.testRunner) | |
window.testRunner.notifyDone(); | |
}, 100); | |
</script> |