Index: third_party/WebKit/LayoutTests/compositing/overflow/ancestor-with-clip-path.html |
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/ancestor-with-clip-path.html b/third_party/WebKit/LayoutTests/compositing/overflow/ancestor-with-clip-path.html |
index 1b56670872d7f4c3ffba66b7ef260ea7acdf3499..b509523780ca06a3070505a4cc7bf43235087ea7 100644 |
--- a/third_party/WebKit/LayoutTests/compositing/overflow/ancestor-with-clip-path.html |
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/ancestor-with-clip-path.html |
@@ -1,4 +1,5 @@ |
<!DOCTYPE HTML> |
+<script src="resources/composited-scroll.js"></script> |
<style> |
#scroller { |
overflow: scroll; |
@@ -35,18 +36,6 @@ |
</div> |
</div> |
<script> |
-function isUsingCompositedScrolling(layer) { |
- if (layer.bounds[1] == 1000) |
- return true; |
- if (layer.children) { |
- for (var i = 0; i < layer.children.length; i++) { |
- if (isUsingCompositedScrolling(layer.children[i])) |
- return true; |
- } |
- } |
- return false; |
-} |
- |
if (window.internals) |
window.internals.settings.setPreferCompositingToLCDTextEnabled(true); |
@@ -60,7 +49,8 @@ var result = ""; |
onload = function() { |
if (window.internals) { |
result += "No clip path ancestor (should be using composited scrolling): "; |
- if (isUsingCompositedScrolling(JSON.parse(window.internals.layerTreeAsText(document)))) |
+ var layers = window.internals.layerTreeAsText(document, window.internals.OUTPUT_CHILDREN_AS_LAYER_LIST); |
+ if (isUsingCompositedScrolling(JSON.parse(layers))) |
result += "Pass.\n"; |
else |
result += "Fail.\n" |
@@ -69,7 +59,8 @@ onload = function() { |
requestAnimationFrame(function() { |
if (window.internals) { |
result += "Has clip path ancestor (should not be using composited scrolling): "; |
- if (!isUsingCompositedScrolling(JSON.parse(window.internals.layerTreeAsText(document)))) |
+ var layers = window.internals.layerTreeAsText(document, window.internals.OUTPUT_CHILDREN_AS_LAYER_LIST); |
+ if (!isUsingCompositedScrolling(JSON.parse(layers))) |
result += "Pass.\n"; |
else |
result += "Fail.\n" |