blob: 6b48d6412f2569c615f504e2465b95261538ac65 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
<!DOCTYPE html>
<!--
This test verifies that a fixed position element inside an iframe paints when
it comes into view due to the iframe increasing in size.
If this test passes, you should see a green square.
-->
<html>
<head>
<style>
#iframe-containing-fixed-position-element {
background: red;
width: 100px;
height: 0;
border: 0;
}
</style>
<script src="../../resources/run-after-layout-and-paint.js"></script>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
if (window.internals)
window.internals.settings.setPreferCompositingToLCDTextEnabled(true);
function runTest()
{
// Initially, the fixed position element in the iframe will not
// paint because the iframe has zero height.
runAfterLayoutAndPaint(function() {
// Give the iframe a non-zero height. The fixed position element
// inside the iframe should paint now.
var iframeElement = document.getElementById("iframe-containing-fixed-position-element");
iframeElement.style.height = "100px";
if (window.testRunner)
testRunner.notifyDone();
});
}
</script>
</head>
<body onload="runTest()">
<iframe id="iframe-containing-fixed-position-element" src="resources/subframe-with-fixed-position-element.html"></iframe>
</body>
</html>
|