blob: 671f9f37c710abc0e3760ee95f9b5a8b3c27ff58 [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 {
line-height: 20px;
}
.composited {
will-change: transform;
}
.antialiased {
-webkit-font-smoothing: antialiased;
}
.smoothed {
-webkit-font-smoothing: subpixel-antialiased;
}
</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">
</div>
<div class="composited container">
<span> </span> <p class="smoothed"> </p>
</div>
<div class="composited container">
&nbsp; &nbsp; &nbsp;
</div>
<div class="composited container">
<p>Text here</p>
</div>
<div class="composited container antialiased">
<p>Antialiased text</p>
</div>
<div class="composited container smoothed">
<p>Smoothed text</p>
</div>
<div class="composited container">
<div class="antialiased">Antialised text</div>
<div class="smoothed" style="position: relative;">
<p>Smoothed text</p>
</div>
</div>
<div class="composited container">
<div class="composited">
<p>Child composited layer</p>
</div>
</div>
<div class="composited container">
<div class="composited">
<p class="smoothed">Smoothed text</p>
</div>
<p class="antialiased">Antialiased text</p>
</div>
<div class="composited container">
<div class="composited">
<p class="antialiased">Antialiased text</p>
</div>
<p class="smoothed">Smoothed text</p>
</div>
<div class="composited container">
<div style="position-relative">
<div style="position-relative">
<div style="position-relative">
<div style="position-relative">
<p class="antialiased">Exceeds depth test antialiased</p>
</div>
</div>
</div>
</div>
</div>
<div class="composited container">
<div style="position-relative">
<div style="position-relative">
<div style="position-relative">
<div style="position-relative">
<p class="smoothed">Exceeds depth test smoothed</p>
</div>
</div>
</div>
</div>
</div>
<pre id="layers"></pre>
</body>
</html>