4 <script src="../../resources/run-after-display.js"></script>
14 transform: translatez(0);
20 background-color: gray;
26 background-color: blue;
32 background-color: lime;
38 background-color: magenta;
42 background-color: green;
47 background-color: green;
56 if (window.testRunner) {
57 testRunner.dumpAsText();
58 testRunner.waitUntilDone();
62 internals.settings.setLayerSquashingEnabled(true);
66 if (!window.internals)
68 runAfterDisplay(executeTestCases);
71 function executeTestCases()
74 document.getElementById('Case1').textContent = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
77 window.internals.startTrackingRepaints(document);
78 document.getElementById("forceComposited").className = "underneath";
79 document.getElementById('Case2').textContent = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
80 window.internals.stopTrackingRepaints(document);
82 // Display the test results only after test is done so that it does not affect repaint rect results.
83 document.getElementById('testResults').style.display = "block";
85 if (window.testRunner)
86 testRunner.notifyDone();
91 <body onload="runTest()">
93 <p>A squashing RenderLayer that becomes non-composited should correctly send
94 a repaint invalidation to the new container GraphicsLayer that it paints
95 into. When run interactively, hovering over the force-composited gray div
96 should not cause other layers to disappear.</p>
98 <div id="forceComposited" class="composited underneath"></div>
99 <div id="A" class="overlap1"></div>
100 <div id="B" class="overlap2"></div>
101 <div id="C" class="overlap3"></div>
103 <div id="testResults">
104 CASE 1, original layer tree:
105 <pre id="Case1"></pre>
107 CASE 2, The original composited layer is no longer composited, which then also removes all squashing layers. The important point is that there should be an appropriate repaint to the root GraphicsLayer:
108 <pre id="Case2"></pre>