blob: ff2a032156f52c4279e1d46491dd9afbf10ca786 (
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
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Opacity between absolutes</title>
<style type="text/css" media="screen">
.container {
position: relative;
height: 200px;
width: 200px;
border: 1px solid black;
-webkit-transform: translateZ(0);
-webkit-transform-style: preserve-3d;
}
.fader {
height: 50px;
width: 50px;
margin: 20px;
border: 1px solid black;
-webkit-transition: opacity 100s;
}
.container:hover .fader {
opacity: 0.5;
}
.inner {
position: absolute;
left: 100px;
top: 100px;
height: 80px;
width: 80px;
background-color: gray;
}
.inner:hover {
background-color: orange;
}
</style>
<script type="text/javascript" charset="utf-8">
if (window.testRunner)
testRunner.waitUntilDone();
function runTest()
{
// Kick off an opacity fade to make .fader into a compositing layer
var container = document.querySelectorAll('.fader')[0];
container.style.opacity = 0.99;
window.setTimeout(function() {
// Now test redraw on .inner
var inner = document.querySelectorAll('.inner')[0];
inner.style.backgroundColor = 'green';
if (window.testRunner)
testRunner.notifyDone();
}, 0);
}
window.addEventListener('load', runTest, false)
</script>
</head>
<body>
<p>This test should not assert, and you should see a fully green square.</p>
<div class="container">
<div class="fader">
<div class="inner">
</div>
</div>
</div>
</body>
</html>
|