blob: 4babad7f1385fc7e16e31ae01c4af75a3fb38211 (
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
<!DOCTYPE html>
<html>
<head>
<style>
body {
height: 2000px;
}
.container {
height: 300px;
width: 300px;
border: 4px solid black;
overflow-y: scroll;
resize: both;
}
.contents {
height: 1000px;
}
.box {
position: relative;
z-index: 1;
height: 100px;
width: 100px;
margin: 10px;
background-color: blue;
}
.surface {
opacity: 0.5;
}
#fixed {
position: fixed;
z-index: 0;
background-color: green;
left: 50px;
top: 100px;
height: 200px;
width: 200px;
}
.rotated {
transform: translateZ(0) rotate(5deg);
}
.counter-rotated {
transform: translateZ(0) rotate(-9deg);
}
</style>
<script src="resources/nested-render-surfaces.js"></script>
<script>
function setup() {
var description = "This test ensures that clipping works correctly "
+ "with clip children, even if there are rotations involved.\n"
+ "if this test is working correctly, all rects should be "
+ "clipped by their containing overflow scrolling divs (the\n"
+ "fixed position element will have the outer 'counter "
+ "rotate' div as its containing block due to the rotation,\n"
+ "not the viewport, and will therefore get clipped by the "
+ "outer overflow scrolling div, but not the inner.";
runTest(description);
}
window.onload = setup;
</script>
</head>
<body>
<div class="rotated">
<div class="surface">
<div class="box"></div>
<div class="container">
<div class="surface counter-rotated">
<div class="box"></div>
<div class="container">
<div id="fixed"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
|