blob: 5981f40c60cdd2cd1e3fd91b8fd253df42733cd3 [file] [log] [blame]
<!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);
}
.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 !important;
}
</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')[1];
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="fader">
<div class="inner">
</div>
</div>
</div>
</div>
</body>
</html>