4 window
.internals
.settings
.setPreferCompositingToLCDTextEnabled(false);
6 if (window
.testRunner
) {
7 window
.testRunner
.dumpAsText();
8 window
.testRunner
.waitUntilDone();
11 function isUsingCompositedScrolling(layer
) {
12 if (layer
.bounds
[1] == 1000)
15 for (var i
= 0; i
< layer
.children
.length
; i
++) {
16 if (isUsingCompositedScrolling(layer
.children
[i
]))
26 if (window
.internals
) {
27 result
+= "Should not be using composited scrolling: ";
28 if (!isUsingCompositedScrolling(JSON
.parse(window
.internals
.layerTreeAsText(document
))))
34 document
.getElementById("scroller").style
.webkitTransform
= "translateZ(0)";
35 requestAnimationFrame(function() {
36 if (window
.internals
) {
37 result
+= "Should be using composited scrolling (since we're compositing anyhow): ";
38 if (isUsingCompositedScrolling(JSON
.parse(window
.internals
.layerTreeAsText(document
))))
44 document
.getElementById("scroller").style
.webkitTransform
= "";
45 requestAnimationFrame(function() {
46 if (window
.internals
) {
47 result
+= "Should not be using composited scrolling (since we've lost our direct reason): ";
48 if (!isUsingCompositedScrolling(JSON
.parse(window
.internals
.layerTreeAsText(document
))))
54 if (window
.testRunner
) {
55 window
.testRunner
.setCustomTextOutput(result
);
56 window
.testRunner
.notifyDone();
62 <div id=
"scroller" style=
"overflow:scroll; width:100px; height:100px">
63 <div id=
"tall" style=
"background: green; width:50px; height: 1000px"></div>