blob: 4d128f88fdc09d45ba0d078d52047a88a024d322 [file] [log] [blame]
This test verifies that software layers are promoted to composited layers when their filter
outsets change to overlap a hardware layer.
If the test passes, the green drop-shadow of the black layer should appear over the blue
composited layer.
#software-layer-to-promote {
background-color: black;
position: absolute;
top: 100px;
left: 100px;
width: 100px;
height: 100px;
.initial-drop-shadow {
filter: drop-shadow(10px 10px 0px green);
.final-drop-shadow {
filter: drop-shadow(100px 100px 0px green);
#composited-layer-to-overlap {
background-color: blue;
transform: translateZ(0);
position: absolute;
top: 250px;
left: 250px;
width: 100px;
height: 100px;
if (window.testRunner)
function appendLayerTreeTextToConsole()
if (!window.testRunner || !window.internals)
var layerTreeText = internals.layerTreeAsText(document);
function runTest()
// Dump the layer tree with the initial drop shadow, which does not overlap the composited layer.
// Force a software-painted drop shadow on Safari.
var targetElement = document.getElementById("software-layer-to-promote");
targetElement.className = "final-drop-shadow";
// Dump the layer tree again with the final drop shadow, which overlaps the composited layer.
if (window.testRunner) {
<body onload="runTest()">
<div id="composited-layer-to-overlap"></div>
<div id="software-layer-to-promote" class="initial-drop-shadow"></div>
<pre id="console"></pre>