4 <script src="../../resources/run-after-display.js"></script>
14 -webkit-transform: translatez(0);
20 background-color: gray;
26 background-color: blue;
32 background-color: lime;
38 background-color: magenta;
42 background-color: green;
43 -webkit-transform: none;
47 background-color: green;
56 if (window.testRunner) {
57 testRunner.dumpAsText();
58 testRunner.waitUntilDone();
60 if (window.internals) {
61 window.internals.settings.setForceCompositingMode(true);
65 internals.settings.setLayerSquashingEnabled(true);
69 if (!window.internals)
71 runAfterDisplay(executeTestCases);
74 function executeTestCases()
77 document.getElementById('Case1').textContent = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
80 window.internals.startTrackingRepaints(document);
81 document.getElementById("forceComposited").className = "underneath";
82 document.getElementById('Case2').textContent = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
83 window.internals.stopTrackingRepaints(document);
85 // Display the test results only after test is done so that it does not affect repaint rect results.
86 document.getElementById('testResults').style.display = "block";
88 if (window.testRunner)
89 testRunner.notifyDone();
94 <body onload="runTest()">
96 <p>A squashing RenderLayer that becomes non-composited should correctly send
97 a repaint invalidation to the new container GraphicsLayer that it paints
98 into. When run interactively, hovering over the force-composited gray div
99 should not cause other layers to disappear.</p>
101 <div id="forceComposited" class="composited underneath"></div>
102 <div id="A" class="overlap1"></div>
103 <div id="B" class="overlap2"></div>
104 <div id="C" class="overlap3"></div>
106 <div id="testResults">
107 CASE 1, original layer tree:
108 <pre id="Case1"></pre>
110 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:
111 <pre id="Case2"></pre>