| OLD | NEW |
| 1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
| 2 <script src="resources/composited-scroll.js"></script> | 2 <script src="resources/composited-scroll.js"></script> |
| 3 <style> | 3 <style> |
| 4 #scroller { | 4 #scroller { |
| 5 overflow: scroll; | 5 overflow: scroll; |
| 6 height: 300px; | 6 height: 300px; |
| 7 width: 300px; | 7 width: 300px; |
| 8 background-color: red; | 8 background-color: red; |
| 9 } | 9 } |
| 10 | 10 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 if (window.testRunner) { | 42 if (window.testRunner) { |
| 43 window.testRunner.dumpAsText(); | 43 window.testRunner.dumpAsText(); |
| 44 window.testRunner.waitUntilDone(); | 44 window.testRunner.waitUntilDone(); |
| 45 } | 45 } |
| 46 | 46 |
| 47 var result = ""; | 47 var result = ""; |
| 48 | 48 |
| 49 onload = function() { | 49 onload = function() { |
| 50 if (window.internals) { | 50 if (window.internals) { |
| 51 result += "No clip path ancestor (should be using composited scrolling):
"; | 51 result += "No clip path ancestor (should be using composited scrolling):
"; |
| 52 var layers = window.internals.layerTreeAsText(document, window.internals
.OUTPUT_CHILDREN_AS_LAYER_LIST); | 52 var layers = window.internals.layerTreeAsText(document); |
| 53 if (isUsingCompositedScrolling(JSON.parse(layers))) | 53 if (isUsingCompositedScrolling(JSON.parse(layers))) |
| 54 result += "Pass.\n"; | 54 result += "Pass.\n"; |
| 55 else | 55 else |
| 56 result += "Fail.\n" | 56 result += "Fail.\n" |
| 57 } | 57 } |
| 58 document.getElementById("outer").style.webkitClipPath = "polygon(40px 550px,
432px 302px,409px 237px,46px 156px)"; | 58 document.getElementById("outer").style.webkitClipPath = "polygon(40px 550px,
432px 302px,409px 237px,46px 156px)"; |
| 59 requestAnimationFrame(function() { | 59 requestAnimationFrame(function() { |
| 60 if (window.internals) { | 60 if (window.internals) { |
| 61 result += "Has clip path ancestor (should not be using composited sc
rolling): "; | 61 result += "Has clip path ancestor (should not be using composited sc
rolling): "; |
| 62 var layers = window.internals.layerTreeAsText(document, window.inter
nals.OUTPUT_CHILDREN_AS_LAYER_LIST); | 62 var layers = window.internals.layerTreeAsText(document); |
| 63 if (!isUsingCompositedScrolling(JSON.parse(layers))) | 63 if (!isUsingCompositedScrolling(JSON.parse(layers))) |
| 64 result += "Pass.\n"; | 64 result += "Pass.\n"; |
| 65 else | 65 else |
| 66 result += "Fail.\n" | 66 result += "Fail.\n" |
| 67 } | 67 } |
| 68 if (window.testRunner) { | 68 if (window.testRunner) { |
| 69 window.testRunner.setCustomTextOutput(result); | 69 window.testRunner.setCustomTextOutput(result); |
| 70 window.testRunner.notifyDone(); | 70 window.testRunner.notifyDone(); |
| 71 } | 71 } |
| 72 }); | 72 }); |
| 73 }; | 73 }; |
| 74 </script> | 74 </script> |
| OLD | NEW |