3 <script src=
"../../resources/run-after-layout-and-paint.js"></script>
6 transform: translatez(
0);
19 background-color: blue;
27 background-color: lime;
28 transform: rotate(
22deg);
36 background-color: cyan;
45 background-color: magenta;
46 transform: rotate(
22deg);
50 background-color: green;
54 background-color: lime;
59 if (window
.testRunner
) {
60 testRunner
.dumpAsText();
61 testRunner
.waitUntilDone();
66 runAfterLayoutAndPaint(executeTestCases
);
69 function executeTestCases()
71 window
.internals
.startTrackingRepaints(document
);
72 document
.getElementById('Case1').textContent
= window
.internals
.layerTreeAsText(document
, internals
.LAYER_TREE_INCLUDES_REPAINT_RECTS
);
73 window
.internals
.stopTrackingRepaints(document
);
75 eventSender
.mouseMoveTo(0, 0);
76 window
.internals
.startTrackingRepaints(document
);
78 document
.getElementById('Case2').textContent
= window
.internals
.layerTreeAsText(document
, internals
.LAYER_TREE_INCLUDES_REPAINT_RECTS
);
79 window
.internals
.stopTrackingRepaints(document
);
81 eventSender
.mouseMoveTo(0, 0);
82 window
.internals
.startTrackingRepaints(document
);
84 document
.getElementById('Case3').textContent
= window
.internals
.layerTreeAsText(document
, internals
.LAYER_TREE_INCLUDES_REPAINT_RECTS
);
85 window
.internals
.stopTrackingRepaints(document
);
87 // Display the test results only after test is done so that it does not affect repaint rect results.
88 document
.getElementById('testResults').style
.display
= "block";
90 if (window
.testRunner
)
91 testRunner
.notifyDone();
94 function hoverOverOuterDiv()
96 internals
.setIsCursorVisible(document
, true);
97 eventSender
.mouseMoveTo(20, 90);
100 function hoverOverInnerDiv()
102 internals
.setIsCursorVisible(document
, true);
103 eventSender
.mouseMoveTo(60, 70);
108 <body onload=
"runTest()">
110 <div class=
"composited box behind"></div>
112 <div class=
"box middle">
113 <div class=
"smallbox"></div>
116 <div class=
"box top"></div>
118 <div id=
"testResults" style=
"display:none">
119 CASE
1, original layer tree
120 <pre id=
"Case1"></pre>
122 CASE
2, hovering over the outer div
123 <pre id=
"Case2"></pre>
125 CASE
3, hovering over the inner div
126 <pre id=
"Case3"></pre>