Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Unified Diff: third_party/WebKit/LayoutTests/compositing/overflow/avoid-ancestor-clip-for-scroll-children.html

Issue 2397333002: Change layerTreeAsText to default to layer lists. (Closed)
Patch Set: none Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/compositing/overflow/avoid-ancestor-clip-for-scroll-children.html
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/avoid-ancestor-clip-for-scroll-children.html b/third_party/WebKit/LayoutTests/compositing/overflow/avoid-ancestor-clip-for-scroll-children.html
index b98c9101678a107d7686ba0d3c8b544bd8b8c079..f31968fd71cf1581ffd256ad95bdaeae328f0656 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/avoid-ancestor-clip-for-scroll-children.html
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/avoid-ancestor-clip-for-scroll-children.html
@@ -46,20 +46,15 @@ description('Verifies that scroll children do not create ancestor clipping ' +
if (window.internals)
internals.settings.setPreferCompositingToLCDTextEnabled(true);
-function scrollChildHasNoScrollClip(layer) {
- if (layer.children) {
- for (var i = 0; i < layer.children.length; i++) {
- var child = layer.children[i];
- // The only layer that should have a transform in this example is the
- // scroll child. If this is not the case, we have a scroll clip.
- if (child.transform && child.hasScrollParent)
- return true;
-
- if (scrollChildHasNoScrollClip(child))
- return true;
- }
- }
- return false;
+function scrollChildHasNoScrollClip(layers) {
+ var found = false;
+ layers["layers"].forEach(function(layer) {
+ // The only layer that should have a transform in this example is the
+ // scroll child. If this is not the case, we have a scroll clip.
+ if (layer.transform && layer.hasScrollParent)
+ found = true;
+ });
+ return found;
}
onload = function() {

Powered by Google App Engine
This is Rietveld 408576698