OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <script type="text/javascript"> | |
4 function test() | |
5 { | |
6 if (window.internals) | |
7 internals.settings.setFrameFlatteningEnabled(true); | |
8 // Force synchronous layout. | |
9 document.body.offsetHeight; | |
10 } | |
11 </script> | |
12 </head> | |
13 <body onload="test()"> | |
14 <div style="position: absolute; top: 200"> | |
15 <p>Test for iframe flattening, with three inner frames just outside the
view | |
16 and of the size 200x200 px, plus one inner frame is partly visible. | |
17 <p>This yellow, red and blue inner frames must remain offscreen, and the | |
18 green inner frames should be of size 300x300 (200x200 visible). | |
19 <p>NOTE: The test only works in the DRT or with frame flattening enabled
. | |
20 </div> | |
21 | |
22 <!-- DRT size is 800x600 pixels, one needs to be flexible in order to use fr
ame flattening --> | |
23 <p><iframe width="25%" height="200" style='border: 0px; position: absolute;
left: 0px; top: -200px;' src="data:text/html, | |
24 <style>body { background-color: red; }</style> | |
25 <body> | |
26 <div style='position: absolute; width: 800px; height: 800px; left: 0
; top: 0px;'></div> | |
27 </body> | |
28 "></iframe> | |
29 | |
30 <p><iframe width="25%" height="200" style='border: 0px; position: absolute;
left: -200px; top: 0px;' src="data:text/html, | |
31 <style>body { background-color: blue; }</style> | |
32 <body> | |
33 <div style='position: absolute; width: 800px; height: 800px; left: 0
; top: 0px;'></div> | |
34 </body> | |
35 "></iframe> | |
36 | |
37 <p><iframe width="25%" height="200" style='border: 0px; position: absolute;
left: -200px; top: -200px;' src="data:text/html, | |
38 <style>body { background-color: yellow; }</style> | |
39 <body> | |
40 <div style='position: absolute; width: 800px; height: 800px; left: 0
; top: 0px;'></div> | |
41 </body> | |
42 "></iframe> | |
43 | |
44 <p><iframe width="25%" height="200" style='border: 0px; position: absolute;
left: -100px; top: -100px;' src="data:text/html, | |
45 <style>body { background-color: green; }</style> | |
46 <body> | |
47 <div style='position: absolute; width: 300px; height: 300px; left: 0
; top: 0px;'></div> | |
48 </body> | |
49 "></iframe> | |
50 </body> | |
51 </html> | |
OLD | NEW |