blob: f8543a2a4d6296dcff5053247ecf0b1a6cac1cdf (
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
<!DOCTYPE html>
<style type="text/css" media="screen">
.container {
display: inline-block;
width: 200px;
height: 200px;
overflow: hidden;
margin: 10px;
border: 1px solid black;
}
.inner {
width: 100%;
height: 1000px;
background-color: blue;
}
.compositing {
position: absolute;
top: 20px;
left: 20px;
width: 100px;
height: 100px;
transform: translateZ(0);
}
.top {
height: 50%;
width: 100%;
background-color: red;
}
.bottom {
height: 50%;
width: 100%;
background-color: green;
}
</style>
<script type="text/javascript" charset="utf-8">
if (window.testRunner)
testRunner.waitUntilDone();
function doTest()
{
window.setTimeout(function() {
// alert('hi');
var scrollables = document.querySelectorAll('.container');
for (var i = 0; i < scrollables.length; ++i) {
scrollables[i].scrollTop = 500;
}
if (window.testRunner)
testRunner.notifyDone();
}, 0);
}
window.addEventListener('load', doTest, false);
</script>
<!-- Go into compositing. -->
<div class="compositing"></div>
<!-- Test repainting when the graphicsLayer offsetFromRenderer changes -->
<!-- You should see one green square, and no red -->
<div class="container" style="position: relative;">
<div class="inner" style="position: relative;">
<div class="top"></div>
<div class="bottom"></div>
</div>
</div>
|