| <!DOCTYPE html> |
| |
| <html> |
| <head> |
| <style> |
| .container { |
| height: 150px; |
| width: 150px; |
| 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); |
| } |
| |
| |
| .composited { |
| will-change: transform; |
| } |
| |
| .positioned { |
| position: absolute; |
| border: 1px solid rgba(0, 0, 0, 0.5); |
| } |
| </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 class="positioned"> |
| This layer should get smoothing. |
| </div> |
| </div> |
| <pre id="layers"></pre> |
| |
| </body> |
| </html> |