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(
45deg);
36 background-color: cyan;
45 background-color: magenta;
49 background-color: green;
53 background-color: lime;
58 if (window
.testRunner
) {
59 testRunner
.dumpAsText();
60 testRunner
.waitUntilDone();
65 runAfterLayoutAndPaint(executeTestCases
);
68 function executeTestCases()
70 window
.internals
.startTrackingRepaints(document
);
71 document
.getElementById('Case1').textContent
= window
.internals
.layerTreeAsText(document
, internals
.LAYER_TREE_INCLUDES_REPAINT_RECTS
);
72 window
.internals
.stopTrackingRepaints(document
);
74 eventSender
.mouseMoveTo(0, 0);
75 window
.internals
.startTrackingRepaints(document
);
77 document
.getElementById('Case2').textContent
= window
.internals
.layerTreeAsText(document
, internals
.LAYER_TREE_INCLUDES_REPAINT_RECTS
);
78 window
.internals
.stopTrackingRepaints(document
);
80 eventSender
.mouseMoveTo(0, 0);
81 window
.internals
.startTrackingRepaints(document
);
83 document
.getElementById('Case3').textContent
= window
.internals
.layerTreeAsText(document
, internals
.LAYER_TREE_INCLUDES_REPAINT_RECTS
);
84 window
.internals
.stopTrackingRepaints(document
);
86 // Display the test results only after test is done so that it does not affect repaint rect results.
87 document
.getElementById('testResults').style
.display
= "block";
89 if (window
.testRunner
)
90 testRunner
.notifyDone();
93 function hoverOverOuterDiv()
95 internals
.setIsCursorVisible(document
, true);
96 eventSender
.mouseMoveTo(10, 65);
100 function hoverOverInnerDiv()
102 internals
.setIsCursorVisible(document
, true);
103 eventSender
.mouseMoveTo(40, 65);
108 <body onload=
"runTest()">
109 <div class=
"composited box behind"></div>
111 <div class=
"box middle">
112 <div class=
"smallbox"></div>
115 <div class=
"box top"></div>
117 <div id=
"testResults" style=
"display:none">
118 CASE
1, original layer tree
119 <pre id=
"Case1"></pre>
121 CASE
2, hovering over the outer div
122 <pre id=
"Case2"></pre>
124 CASE
3, hovering over the inner div
125 <pre id=
"Case3"></pre>