6 transform: translateZ(
0);
12 background: lightgray;
18 display: inline-block;
23 <script src=
"../../resources/run-after-layout-and-paint.js"></script>
25 <!-- This test checks whether repaint rects for selection on squashed layers is correct. -->
27 <div class=
"overlap"></div>
28 <div style=
"top: 20px" class=
"item"><div class=
"inline-block">lorem ipsum
</div></div>
29 <div style=
"top: 100px" class=
"item" id=
"item1"><div class=
"inline-block">lorem ipsum
</div></div>
30 <div style=
"top: 180px" class=
"item" id=
"item2"><div class=
"inline-block">lorem ipsum
</div></div>
33 <div id=
"output" style=
"display: none">
34 <pre id=
"case1"></pre>
35 <pre id=
"case2"></pre>
38 if (window
.testRunner
) {
39 testRunner
.dumpAsText();
40 testRunner
.waitUntilDone();
43 runAfterLayoutAndPaint(function()
46 window
.internals
.startTrackingRepaints(document
);
47 var selection
= getSelection();
49 // Case 1: selection that does not have any gaps.
50 selection
.setBaseAndExtent(document
.querySelector("#item1"), 0, document
.querySelector("#item1"), 1);
52 if (window
.internals
) {
53 document
.querySelector('#case1').textContent
= window
.internals
.layerTreeAsText(document
, internals
.LAYER_TREE_INCLUDES_REPAINT_RECTS
);
54 window
.internals
.stopTrackingRepaints(document
);
60 window
.internals
.startTrackingRepaints(document
);
62 // Case 2: selection with a gap between item1 and item2.
63 selection
.setBaseAndExtent(document
.querySelector("#item1"), 0, document
.querySelector("#item2"), 1);
65 if (window
.internals
) {
66 document
.querySelector('#case2').textContent
= window
.internals
.layerTreeAsText(document
, internals
.LAYER_TREE_INCLUDES_REPAINT_RECTS
);
67 window
.internals
.stopTrackingRepaints(document
);
70 document
.querySelector('#output').style
.display
= 'block';
73 if (window
.testRunner
)
74 testRunner
.notifyDone();