6 border:
1px solid black;
13 background: papayawhip;
14 border:
1px solid black;
23 will-change: transform;
34 will-change: transform;
42 <div id=
"fixed"></div>
43 <div class=
"scrolled"></div>
44 <div class=
"scrolled"></div>
45 <div id=
"unsquashed" class=
"scrolled">
46 <div id=
"composited"></div>
50 <script src='../../resources/js-test.js'
></script>
54 description('Verifies that scroll children with composited descendants' +
58 internals
.settings
.setPreferCompositingToLCDTextEnabled(true);
60 function scrollChildDoesNotSquash(layer
) {
62 for (var i
= 0; i
< layer
.children
.length
; i
++) {
63 var child
= layer
.children
[i
];
64 if (child
.bounds
&& layer
.bounds
&&
65 child
.bounds
[0] == 20 && child
.bounds
[1] == 20 &&
66 layer
.bounds
[0] == 102 && layer
.bounds
[1] == 102) {
67 // If the child's bounds are 20x20, we're the scroll child with the
68 // composited descendant. We should not have squashed and therefore our
69 // bounds should remain 102x102 (100x100 plus the 1px border).
73 if (scrollChildDoesNotSquash(child
))
81 if (!window
.internals
)
83 documentLayerTree
= JSON
.parse(window
.internals
.layerTreeAsText(document
));
84 shouldBe('scrollChildDoesNotSquash(documentLayerTree)', 'true');