Title: [167246] trunk/Source/WebCore
Revision
167246
Author
[email protected]
Date
2014-04-14 08:42:28 -0700 (Mon, 14 Apr 2014)

Log Message

Lots of compositing test failures after r167152
https://bugs.webkit.org/show_bug.cgi?id=131574

Reviewed by Darin Adler.

* platform/graphics/GraphicsLayer.cpp:
(WebCore::dumpChildren):
(WebCore::GraphicsLayer::dumpProperties):
Make child-dumping recursive so that we can easily skip layers up to any depth.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (167245 => 167246)


--- trunk/Source/WebCore/ChangeLog	2014-04-14 15:35:02 UTC (rev 167245)
+++ trunk/Source/WebCore/ChangeLog	2014-04-14 15:42:28 UTC (rev 167246)
@@ -1,3 +1,15 @@
+2014-04-14  Tim Horton  <[email protected]>
+
+        Lots of compositing test failures after r167152
+        https://bugs.webkit.org/show_bug.cgi?id=131574
+
+        Reviewed by Darin Adler.
+
+        * platform/graphics/GraphicsLayer.cpp:
+        (WebCore::dumpChildren):
+        (WebCore::GraphicsLayer::dumpProperties):
+        Make child-dumping recursive so that we can easily skip layers up to any depth.
+
 2014-04-14  Peter Molnar  <[email protected]>
 
         Fix incorrect indentations in CodeGeneratorJS.pm introduced in r165521

Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp (167245 => 167246)


--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp	2014-04-14 15:35:02 UTC (rev 167245)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp	2014-04-14 15:42:28 UTC (rev 167246)
@@ -589,6 +589,20 @@
     ts << ")\n";
 }
 
+static void dumpChildren(TextStream& ts, const Vector<GraphicsLayer*>& children, unsigned& totalChildCount, int indent, LayerTreeAsTextBehavior behavior)
+{
+    totalChildCount += children.size();
+    for (auto* child : children) {
+        if (!child->client()->shouldSkipLayerInDump(child)) {
+            child->dumpLayer(ts, indent + 2, behavior);
+            continue;
+        }
+
+        totalChildCount--;
+        dumpChildren(ts, child->children(), totalChildCount, indent, behavior);
+    }
+}
+
 void GraphicsLayer::dumpProperties(TextStream& ts, int indent, LayerTreeAsTextBehavior behavior) const
 {
     if (m_position != FloatPoint()) {
@@ -754,20 +768,10 @@
     
     if (m_children.size()) {
         TextStream childrenStream;
-        unsigned totalChildCount = m_children.size();
-        for (size_t childIndex = 0; childIndex < m_children.size(); childIndex++) {
-            GraphicsLayer* child = m_children[childIndex];
-            if (!child->client()->shouldSkipLayerInDump(child)) {
-                child->dumpLayer(childrenStream, indent + 2, behavior);
-                continue;
-            }
-            
-            const Vector<GraphicsLayer*>& grandChildren = child->children();
-            totalChildCount += grandChildren.size() - 1;
-            for (size_t grandChildIndex = 0; grandChildIndex < grandChildren.size(); grandChildIndex++)
-                grandChildren[grandChildIndex]->dumpLayer(childrenStream, indent + 2, behavior);
-        }
 
+        unsigned totalChildCount = 0;
+        dumpChildren(childrenStream, m_children, totalChildCount, indent, behavior);
+
         writeIndent(childrenStream, indent + 1);
         childrenStream << ")\n";
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to