blob: cf0fe00b622b0ddefdd880b2abef908a194188b4 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
.container {
height: 150px;
width: 150px;
float: left;
position: relative;
border: 1px solid black;
padding: 20px;
margin: 10px;
box-sizing: border-box;
box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
}
.box {
position: relative;
height: 40px;
width: 100px;
background-color: rgba(0, 0, 128, 0.5);
}
p, div {
line-height: 20px;
}
div > div {
width: 100%;
}
.composited {
will-change: transform;
}
img {
width: 95%;
}
</style>
<script>
if (window.testRunner)
testRunner.dumpAsText();
if (window.internals) {
internals.setFontSmoothingEnabled(true);
internals.settings.setSubpixelAntialiasedLayerTextEnabled(true)
}
function doTest()
{
if (window.internals)
document.getElementById('layers').innerText = internals.layerTreeAsText(document);
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<div class="composited container image">
<img src="../resources/thiswayup.png">
</div>
<div class="composited container mixed">
<img src="../resources/thiswayup.png">
<span>Image and some text</span>
</div>
<div class="composited container svg-image">
<img src="../resources/circle.svg">
</div>
<div class="composited container text-svg">
<img src="../resources/circle-with-text.svg">
</div>
<div class="composited container mixed">
<img src="../resources/thiswayup.png">
<div style="position: relative;">Image and some text child layer</div>
</div>
<div class="composited container mixed">
<img src="../resources/thiswayup.png">
<div style="position: relative; z-index: 0">Image and some text with z-index</div>
</div>
<div class="composited container mixed">
<img src="../resources/thiswayup.png">
<div class="composited">Image and some text child composited</div>
</div>
<pre id="layers"></pre>
</body>
</html>