79 lines
1.5 KiB
HTML
79 lines
1.5 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<html>
|
|
<head>
|
|
<style type="text/css" media="screen">
|
|
body {
|
|
position: relative;
|
|
}
|
|
.container {
|
|
position: relative;
|
|
width: 100px;
|
|
height: 100px;
|
|
padding: 20px;
|
|
z-index: 0;
|
|
border: 1px solid black;
|
|
}
|
|
|
|
.compositing {
|
|
position: absolute;
|
|
top: 21px;
|
|
left: 21px;
|
|
width: 100px;
|
|
height: 100px;
|
|
-webkit-transform: translateZ(0);
|
|
}
|
|
|
|
.far-left {
|
|
position: relative;
|
|
text-indent: -10000px;
|
|
width: 100px;
|
|
height: 100px;
|
|
background-color: green;
|
|
}
|
|
|
|
.indicator {
|
|
position: absolute;
|
|
top: 21px;
|
|
left: 21px;
|
|
width: 100px;
|
|
height: 100px;
|
|
background-color: red;
|
|
}
|
|
</style>
|
|
<script type="text/javascript" charset="utf-8">
|
|
if (window.testRunner) {
|
|
testRunner.dumpAsText();
|
|
testRunner.waitUntilDone();
|
|
}
|
|
|
|
function doTest()
|
|
{
|
|
if (window.testRunner) {
|
|
document.getElementById('layers').innerText = window.internals.layerTreeAsText(document);
|
|
testRunner.notifyDone();
|
|
}
|
|
}
|
|
|
|
window.addEventListener('load', doTest, false);
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<!-- Go into compositing. -->
|
|
<div class="compositing"></div>
|
|
|
|
<div class="indicator"></div>
|
|
|
|
<!-- Test clipping to viewport with some intermediate layers. -->
|
|
<div class="container">
|
|
<div class="far-left">
|
|
Text here
|
|
</div>
|
|
</div>
|
|
<pre id="layers">Layer tree goes here in DRT</pre>
|
|
</body>
|
|
</html>
|
|
|