5 <script src=
"../../resources/run-after-layout-and-paint.js"></script>
8 -webkit-backface-visibility: hidden;
13 background-color: blue;
16 #compositedInsideFixed {
17 -webkit-backface-visibility: hidden;
20 background-color: red;
30 background-color: cyan;
51 if (window
.testRunner
) {
52 testRunner
.dumpAsText();
53 testRunner
.waitUntilDone();
58 if (!window
.internals
)
61 // Display the test results only after test is done so that it does not affect repaint rect results.
62 document
.getElementById('testResults').style
.display
= "block";
64 document
.getElementById('Case1').textContent
= window
.internals
.layerTreeAsText(document
, internals
.LAYER_TREE_INCLUDES_REPAINT_RECTS
);
67 window
.scrollTo(0, 80);
68 runAfterLayoutAndPaint(function() {
69 document
.getElementById('Case2').textContent
= window
.internals
.layerTreeAsText(document
, internals
.LAYER_TREE_INCLUDES_REPAINT_RECTS
);
70 if (window
.testRunner
) {
71 testRunner
.notifyDone();
78 <body onload=
"runTest()">
79 <div id=
"description">
81 This scenario verifies that the cyan
"container" element scrolls properly with squashing enabled.
82 The
"container" element should not squash into a composited layer mapping owned by the fixed
83 position layer or its descendant, since this would make it behave like a fixed position
84 element during composited scrolling.
89 <div id=
"compositedInsideFixed"></div>
92 <div id=
"container"></div>
94 <div id=
"testResults">
95 CASE
1, original layer tree:
96 <pre id=
"Case1"></pre>
98 CASE
2, scrolling y to
80, the
"container" element should remain positioned with respect to the scrolled document, the fixed-pos layer compensates for the new scroll position:
99 <pre id=
"Case2"></pre>