Fix some issues with scrolling tree logging
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 May 2014 01:10:06 +0000 (01:10 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 May 2014 01:10:06 +0000 (01:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=132762

Reviewed by Tim Horton.

Only dump viewport constraints when they change, and dump the primary layer on
scrolling nodes.

* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::RemoteScrollingTreeTextStream::dump): Dump the primary layer.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168562 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp

index a284fe7..24d49a7 100644 (file)
@@ -1,5 +1,18 @@
 2014-05-09  Simon Fraser  <simon.fraser@apple.com>
 
+        Fix some issues with scrolling tree logging
+        https://bugs.webkit.org/show_bug.cgi?id=132762
+
+        Reviewed by Tim Horton.
+        
+        Only dump viewport constraints when they change, and dump the primary layer on
+        scrolling nodes.
+        
+        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
+        (WebKit::RemoteScrollingTreeTextStream::dump): Dump the primary layer.
+
+2014-05-09  Simon Fraser  <simon.fraser@apple.com>
+
         [iOS WK2] Fixed elements can go outside the document on pinching
         https://bugs.webkit.org/show_bug.cgi?id=132759
         <rdar://problem/16870835>
index 10d1964..1f25c0d 100644 (file)
@@ -463,6 +463,9 @@ void RemoteScrollingTreeTextStream::dump(const ScrollingStateNode& node, bool ch
 
     dumpProperty(ts, "type", node.nodeType());
 
+    if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateNode::ScrollLayer))
+        dumpProperty(ts, "layer", static_cast<GraphicsLayer::PlatformLayerID>(node.layer()));
+    
     switch (node.nodeType()) {
     case FrameScrollingNode:
     case OverflowScrollingNode:
@@ -536,14 +539,16 @@ void RemoteScrollingTreeTextStream::dump(const ScrollingStateFixedNode& node, bo
 {
     RemoteScrollingTreeTextStream& ts = *this;
 
-    ts << node.viewportConstraints();
+    if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateFixedNode::ViewportConstraints))
+        ts << node.viewportConstraints();
 }
 
 void RemoteScrollingTreeTextStream::dump(const ScrollingStateStickyNode& node, bool changedPropertiesOnly)
 {
     RemoteScrollingTreeTextStream& ts = *this;
 
-    ts << node.viewportConstraints();
+    if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateFixedNode::ViewportConstraints))
+        ts << node.viewportConstraints();
 }
 
 void RemoteScrollingTreeTextStream::recursiveDumpNodes(const ScrollingStateNode& node, bool changedPropertiesOnly)