52 lines
2.2 KiB
HTML
52 lines
2.2 KiB
HTML
<html>
|
|
<head>
|
|
<script type="text/javascript">
|
|
function test()
|
|
{
|
|
if (window.internals)
|
|
internals.settings.setFrameFlattening("FullyEnabled")
|
|
// Force synchronous layout.
|
|
document.body.offsetHeight;
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="test()">
|
|
<div style="position: absolute; top: 200">
|
|
<p>Test for iframe flattening, with three inner frames just outside the view
|
|
and of the size 200x200 px, plus one inner frame is partly visible.
|
|
<p>This yellow, red and blue inner frames must remain offscreen, and the
|
|
green inner frames should be of size 300x300 (200x200 visible).
|
|
<p>NOTE: The test only works in the DRT or with frame flattening enabled.
|
|
</div>
|
|
|
|
<!-- DRT size is 800x600 pixels, one needs to be flexible in order to use frame flattening -->
|
|
<p><iframe width="25%" height="200" style='border: 0px; position: absolute; left: 0px; top: -200px;' src="data:text/html,
|
|
<style>body { background-color: red; }</style>
|
|
<body>
|
|
<div style='position: absolute; width: 800px; height: 800px; left: 0; top: 0px;'></div>
|
|
</body>
|
|
"></iframe>
|
|
|
|
<p><iframe width="25%" height="200" style='border: 0px; position: absolute; left: -200px; top: 0px;' src="data:text/html,
|
|
<style>body { background-color: blue; }</style>
|
|
<body>
|
|
<div style='position: absolute; width: 800px; height: 800px; left: 0; top: 0px;'></div>
|
|
</body>
|
|
"></iframe>
|
|
|
|
<p><iframe width="25%" height="200" style='border: 0px; position: absolute; left: -200px; top: -200px;' src="data:text/html,
|
|
<style>body { background-color: yellow; }</style>
|
|
<body>
|
|
<div style='position: absolute; width: 800px; height: 800px; left: 0; top: 0px;'></div>
|
|
</body>
|
|
"></iframe>
|
|
|
|
<p><iframe width="25%" height="200" style='border: 0px; position: absolute; left: -100px; top: -100px;' src="data:text/html,
|
|
<style>body { background-color: green; }</style>
|
|
<body>
|
|
<div style='position: absolute; width: 300px; height: 300px; left: 0; top: 0px;'></div>
|
|
</body>
|
|
"></iframe>
|
|
</body>
|
|
</html>
|