13 background-color: blue;
19 background-color: green;
26 background-color: green;
33 <div id=
"scrolled"></div>
34 <div id=
"fixed"></div>
38 function isUsingCompositedScrolling(layer
) {
39 if (layer
.bounds
[1] == 1000)
42 for (var i
= 0; i
< layer
.children
.length
; i
++) {
43 if (isUsingCompositedScrolling(layer
.children
[i
]))
51 window
.internals
.settings
.setPreferCompositingToLCDTextEnabled(true);
53 if (window
.testRunner
) {
54 window
.testRunner
.dumpAsText();
55 window
.testRunner
.waitUntilDone();
61 if (window
.internals
) {
62 result
+= "No clip path ancestor (should be using composited scrolling): ";
63 if (isUsingCompositedScrolling(JSON
.parse(window
.internals
.layerTreeAsText(document
))))
68 document
.getElementById("outer").style
.webkitClipPath
= "polygon(40px 550px,432px 302px,409px 237px,46px 156px)";
69 requestAnimationFrame(function() {
70 if (window
.internals
) {
71 result
+= "Has clip path ancestor (should not be using composited scrolling): ";
72 if (!isUsingCompositedScrolling(JSON
.parse(window
.internals
.layerTreeAsText(document
))))
78 if (window
.testRunner
) {
79 window
.testRunner
.setCustomTextOutput(result
);
80 window
.testRunner
.notifyDone();