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

Unified Diff: third_party/WebKit/LayoutTests/compositing/animation/hidden-composited.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/animation/hidden-composited.html
diff --git a/third_party/WebKit/LayoutTests/compositing/animation/hidden-composited.html b/third_party/WebKit/LayoutTests/compositing/animation/hidden-composited.html
index e2f2b5789330505d34038f6da8aa98957c568319..0175e580cc71a4e237c4cdad20f4acf3ce3e2e61 100644
--- a/third_party/WebKit/LayoutTests/compositing/animation/hidden-composited.html
+++ b/third_party/WebKit/LayoutTests/compositing/animation/hidden-composited.html
@@ -24,21 +24,17 @@ description('Verifies hidden, compositor-animated layers still get composited');
if (window.internals)
internals.settings.setPreferCompositingToLCDTextEnabled(true);
-function hiddenLayerIsComposited(layer) {
- if (layer.children) {
- for (var i = 0; i < layer.children.length; i++) {
- var child = layer.children[i];
- if (child.bounds[0] == 100 && child.bounds[1] == 100) {
- for (var j = 0; j < child.compositingReasons.length; j++) {
- if (child.compositingReasons[j] === 'activeAnimation')
- return true;
- }
+function hiddenLayerIsComposited(layers) {
+ var found = false;
+ layers["layers"].forEach(function(layer) {
+ if (layer.bounds[0] == 100 && layer.bounds[1] == 100) {
+ for (var j = 0; j < layer.compositingReasons.length; j++) {
+ if (layer.compositingReasons[j] === 'activeAnimation')
+ found = true;
}
- if (hiddenLayerIsComposited(child))
- return true;
}
- }
- return false;
+ });
+ return found;
}
onload = function() {

Powered by Google App Engine
This is Rietveld 408576698