| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/testharness.js"></script> |
| 3 <style> |
| 4 .scale-transform { |
| 5 transform: scale(0.75); |
| 6 } |
| 7 .translate-transform { |
| 8 transform: translateX(5px); |
| 9 } |
| 10 </style> |
| 11 <div style="will-change: transform; width: 200px; height: 200px; background: lig
htgray;"></div> |
| 12 <div class="scale-transform" style="position: absolute; width: 200px; height: 20
0px; top: 100px; left: 100px; background: lightblue"></div> |
| 13 <div class="translate-transform" style="position: absolute; width: 200px; height
: 200px; top: 100px; left: 100px; background: lightblue"></div> |
| 14 <script> |
| 15 if (window.testRunner) |
| 16 testRunner.dumpAsText(); |
| 17 onload = function() { |
| 18 if (window.internals) { |
| 19 var layers = JSON.parse(internals.layerTreeAsText(document, internals.LA
YER_TREE_INCLUDES_DEBUG_INFO)); |
| 20 |
| 21 // The scale-transform layer can't be squashed |
| 22 assert_true(layers.children[0].children[1].children[0].compositingReason
s[1] == "Layer was separately composited because it could not be squashed."); |
| 23 assert_true(layers.children[0].children[1].children[0].squashingDisallow
edReasons[0] == "Cannot squash layers with transforms that are not identity or t
ranslation."); |
| 24 |
| 25 // ...but the translate-transform one can. |
| 26 assert_true(layers.children[0].children[1].children[1].compositingReason
s[0] == "Secondary layer, home for a group of squashable content"); |
| 27 } |
| 28 }; |
| 29 </script> |
| OLD | NEW |