blob: 8aace6d6dab06ec0b01245875effc0b95050be50 (
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
|
<!DOCTYPE html>
<html>
<head>
<style>
.fixed {
position: fixed;
width: 10px;
height: 10px;
top: 100px;
background-color: silver;
}
</style>
<script type="text/javascript">
if (window.testRunner && window.internals) {
testRunner.dumpAsText();
internals.settings.setPreferCompositingToLCDTextEnabled(true);
addEventListener("load", function() {
var fixed = document.createElement("div");
document.body.appendChild(fixed);
document.body.offsetHeight;
fixed.className = "fixed";
var mainThreadScrollingReasons = internals.mainThreadScrollingReasons(document);
document.getElementById("result").innerText = !mainThreadScrollingReasons ? "PASS" : "FAIL: " + mainThreadScrollingReasons;
}, false);
}
</script>
</head>
<!-- Fixed position elements may skip compositing without a scrollable
ancestor. To make sure this test covers the intended scenario, we force the
body element to be tall, so that the FrameView is scrolling. -->
<body style="height: 4000px;">
<pre id="result"></pre>
</body>
</html>
|