Title: [216478] trunk
Revision
216478
Author
commit-qu...@webkit.org
Date
2017-05-08 22:25:46 -0700 (Mon, 08 May 2017)

Log Message

Simplify ScrollingStateNode::scrollingStateTreeAsText
https://bugs.webkit.org/show_bug.cgi?id=171802

Patch by Frederic Wang <fw...@igalia.com> on 2017-05-08
Reviewed by Simon Fraser.

Source/WebCore:

The following simplifications are performed:
- Rely on TextStream's internal value to manage indentation.
- Use TextStream::dumpProperty and << to print simple properties.
- Try and use TextStream::GroupScope for groups.

No new tests, only minor format changes in the dumped tree.

* page/scrolling/ScrollingStateFixedNode.cpp:
(WebCore::ScrollingStateFixedNode::dumpProperties):
* page/scrolling/ScrollingStateFixedNode.h:
* page/scrolling/ScrollingStateFrameScrollingNode.cpp:
(WebCore::ScrollingStateFrameScrollingNode::dumpProperties):
* page/scrolling/ScrollingStateFrameScrollingNode.h:
* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::dumpProperties):
(WebCore::ScrollingStateNode::dump):
(WebCore::ScrollingStateNode::scrollingStateTreeAsText):
* page/scrolling/ScrollingStateNode.h:
* page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
(WebCore::ScrollingStateOverflowScrollingNode::dumpProperties):
* page/scrolling/ScrollingStateOverflowScrollingNode.h:
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::dumpProperties):
* page/scrolling/ScrollingStateScrollingNode.h:
* page/scrolling/ScrollingStateStickyNode.cpp:
(WebCore::ScrollingStateStickyNode::dumpProperties):
* page/scrolling/ScrollingStateStickyNode.h:

LayoutTests:

Update references due to minor format changes in text ouput of scrolling state trees.

* fast/scrolling/ios/remove-scrolling-role-expected.txt:
* fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down-expected.txt:
* fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down-then-up-expected.txt:
* fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolling-layers-state-expected.txt:
* tiled-drawing/scrolling/clamp-out-of-bounds-scrolls-expected.txt:
* tiled-drawing/scrolling/fixed/absolute-inside-fixed-expected.txt:
* tiled-drawing/scrolling/fixed/absolute-inside-out-of-view-fixed-expected.txt:
* tiled-drawing/scrolling/fixed/fixed-in-overflow-expected.txt:
* tiled-drawing/scrolling/fixed/fixed-position-out-of-view-expected.txt:
* tiled-drawing/scrolling/fixed/fixed-position-out-of-view-negative-zindex-expected.txt:
* tiled-drawing/scrolling/fixed/four-bars-expected.txt:
* tiled-drawing/scrolling/fixed/four-bars-with-header-and-footer-expected.txt:
* tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt:
* tiled-drawing/scrolling/fixed/negative-scroll-offset-expected.txt:
* tiled-drawing/scrolling/fixed/negative-scroll-offset-in-view-expected.txt:
* tiled-drawing/scrolling/fixed/nested-fixed-expected.txt:
* tiled-drawing/scrolling/fixed/percentage-inside-fixed-expected.txt:
* tiled-drawing/scrolling/frames/coordinated-frame-expected.txt:
* tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor-expected.txt:
* tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt:
* tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor-expected.txt:
* tiled-drawing/scrolling/frames/fixed-inside-frame-expected.txt:
* tiled-drawing/scrolling/frames/remove-coordinated-frame-expected.txt:
* tiled-drawing/scrolling/frames/scroll-region-after-frame-layout-expected.txt:
* tiled-drawing/scrolling/scrolling-tree-after-scroll-expected.txt:
* tiled-drawing/scrolling/scrolling-tree-slow-scrolling-expected.txt:
* tiled-drawing/scrolling/sticky/negative-scroll-offset-expected.txt:
* tiled-drawing/scrolling/sticky/sticky-horizontal-expected.txt:
* tiled-drawing/scrolling/sticky/sticky-vertical-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (216477 => 216478)


--- trunk/LayoutTests/ChangeLog	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/ChangeLog	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,3 +1,42 @@
+2017-05-08  Frederic Wang  <fw...@igalia.com>
+
+        Simplify ScrollingStateNode::scrollingStateTreeAsText
+        https://bugs.webkit.org/show_bug.cgi?id=171802
+
+        Reviewed by Simon Fraser.
+
+        Update references due to minor format changes in text ouput of scrolling state trees.
+
+        * fast/scrolling/ios/remove-scrolling-role-expected.txt:
+        * fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down-expected.txt:
+        * fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down-then-up-expected.txt:
+        * fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolling-layers-state-expected.txt:
+        * tiled-drawing/scrolling/clamp-out-of-bounds-scrolls-expected.txt:
+        * tiled-drawing/scrolling/fixed/absolute-inside-fixed-expected.txt:
+        * tiled-drawing/scrolling/fixed/absolute-inside-out-of-view-fixed-expected.txt:
+        * tiled-drawing/scrolling/fixed/fixed-in-overflow-expected.txt:
+        * tiled-drawing/scrolling/fixed/fixed-position-out-of-view-expected.txt:
+        * tiled-drawing/scrolling/fixed/fixed-position-out-of-view-negative-zindex-expected.txt:
+        * tiled-drawing/scrolling/fixed/four-bars-expected.txt:
+        * tiled-drawing/scrolling/fixed/four-bars-with-header-and-footer-expected.txt:
+        * tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt:
+        * tiled-drawing/scrolling/fixed/negative-scroll-offset-expected.txt:
+        * tiled-drawing/scrolling/fixed/negative-scroll-offset-in-view-expected.txt:
+        * tiled-drawing/scrolling/fixed/nested-fixed-expected.txt:
+        * tiled-drawing/scrolling/fixed/percentage-inside-fixed-expected.txt:
+        * tiled-drawing/scrolling/frames/coordinated-frame-expected.txt:
+        * tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor-expected.txt:
+        * tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt:
+        * tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor-expected.txt:
+        * tiled-drawing/scrolling/frames/fixed-inside-frame-expected.txt:
+        * tiled-drawing/scrolling/frames/remove-coordinated-frame-expected.txt:
+        * tiled-drawing/scrolling/frames/scroll-region-after-frame-layout-expected.txt:
+        * tiled-drawing/scrolling/scrolling-tree-after-scroll-expected.txt:
+        * tiled-drawing/scrolling/scrolling-tree-slow-scrolling-expected.txt:
+        * tiled-drawing/scrolling/sticky/negative-scroll-offset-expected.txt:
+        * tiled-drawing/scrolling/sticky/sticky-horizontal-expected.txt:
+        * tiled-drawing/scrolling/sticky/sticky-vertical-expected.txt:
+
 2017-05-08  Michael Catanzaro  <mcatanz...@igalia.com>
 
         Unreviewed GTK expectations gardening

Modified: trunk/LayoutTests/fast/scrolling/ios/remove-scrolling-role-expected.txt (216477 => 216478)


--- trunk/LayoutTests/fast/scrolling/ios/remove-scrolling-role-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/fast/scrolling/ios/remove-scrolling-role-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,3 +1,4 @@
+
 (Frame scrolling node
   (scrollable area size 800 600)
   (contents size 800 2513)

Modified: trunk/LayoutTests/fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down-expected.txt (216477 => 216478)


--- trunk/LayoutTests/fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,3 +1,4 @@
+
 (Frame scrolling node
   (scrollable area size 785 585)
   (contents size 4016 4042)
@@ -9,23 +10,23 @@
   (children 4
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 207.50 785.00 585.00)
-      (layer position at last layout 0.00 207.00)
+      (viewport rect at last layout at (0,207.50) size 785x585)
+      (layer position at last layout (0,207))
     )
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeBottom)
-      (viewport rect at last layout: 0.00 207.50 785.00 585.00)
-      (layer position at last layout 0.00 692.00)
+      (viewport rect at last layout at (0,207.50) size 785x585)
+      (layer position at last layout (0,692))
     )
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 207.50 785.00 585.00)
-      (layer position at last layout 0.00 207.00)
+      (viewport rect at last layout at (0,207.50) size 785x585)
+      (layer position at last layout (0,207))
     )
     (Fixed node
       (anchor edges: AnchorEdgeRight AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 207.50 785.00 585.00)
-      (layer position at last layout 685.00 207.00)
+      (viewport rect at last layout at (0,207.50) size 785x585)
+      (layer position at last layout (685,207))
     )
   )
 )

Modified: trunk/LayoutTests/fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down-then-up-expected.txt (216477 => 216478)


--- trunk/LayoutTests/fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down-then-up-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down-then-up-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,3 +1,4 @@
+
 (Frame scrolling node
   (scrollable area size 785 585)
   (contents size 4016 4042)
@@ -9,23 +10,23 @@
   (children 4
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 230.00 785.00 585.00)
-      (layer position at last layout 0.00 230.00)
+      (viewport rect at last layout at (0,230) size 785x585)
+      (layer position at last layout (0,230))
     )
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeBottom)
-      (viewport rect at last layout: 0.00 230.00 785.00 585.00)
-      (layer position at last layout 0.00 715.00)
+      (viewport rect at last layout at (0,230) size 785x585)
+      (layer position at last layout (0,715))
     )
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 230.00 785.00 585.00)
-      (layer position at last layout 0.00 230.00)
+      (viewport rect at last layout at (0,230) size 785x585)
+      (layer position at last layout (0,230))
     )
     (Fixed node
       (anchor edges: AnchorEdgeRight AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 230.00 785.00 585.00)
-      (layer position at last layout 685.00 230.00)
+      (viewport rect at last layout at (0,230) size 785x585)
+      (layer position at last layout (685,230))
     )
   )
 )

Modified: trunk/LayoutTests/fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolling-layers-state-expected.txt (216477 => 216478)


--- trunk/LayoutTests/fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolling-layers-state-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolling-layers-state-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,3 +1,4 @@
+
 (Frame scrolling node
   (scrollable area size 785 585)
   (contents size 4016 4042)
@@ -8,21 +9,21 @@
   (children 4
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 0.00 785.00 585.00)
+      (viewport rect at last layout at (0,0) size 785x585)
     )
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeBottom)
-      (viewport rect at last layout: 0.00 0.00 785.00 585.00)
-      (layer position at last layout 0.00 485.00)
+      (viewport rect at last layout at (0,0) size 785x585)
+      (layer position at last layout (0,485))
     )
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 0.00 785.00 585.00)
+      (viewport rect at last layout at (0,0) size 785x585)
     )
     (Fixed node
       (anchor edges: AnchorEdgeRight AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 0.00 785.00 585.00)
-      (layer position at last layout 685.00 0.00)
+      (viewport rect at last layout at (0,0) size 785x585)
+      (layer position at last layout (685,0))
     )
   )
 )

Modified: trunk/LayoutTests/tiled-drawing/scrolling/clamp-out-of-bounds-scrolls-expected.txt (216477 => 216478)


--- trunk/LayoutTests/tiled-drawing/scrolling/clamp-out-of-bounds-scrolls-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/tiled-drawing/scrolling/clamp-out-of-bounds-scrolls-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,4 +1,5 @@
 Attempted scroll to -5000, 0
+
 (Frame scrolling node
   (scrollable area size 785 585)
   (contents size 5008 5021)
@@ -8,6 +9,7 @@
 )
 
 Attempted scroll to 0, -5000
+
 (Frame scrolling node
   (scrollable area size 785 585)
   (contents size 5008 5021)
@@ -17,6 +19,7 @@
 )
 
 Attempted scroll to -5000, -5000
+
 (Frame scrolling node
   (scrollable area size 785 585)
   (contents size 5008 5021)
@@ -26,6 +29,7 @@
 )
 
 Attempted scroll to 10000, 0
+
 (Frame scrolling node
   (scrollable area size 785 585)
   (contents size 5008 5021)
@@ -36,6 +40,7 @@
 )
 
 Attempted scroll to 0, 10000
+
 (Frame scrolling node
   (scrollable area size 785 585)
   (contents size 5008 5021)
@@ -46,6 +51,7 @@
 )
 
 Attempted scroll to 10000, 10000
+
 (Frame scrolling node
   (scrollable area size 785 585)
   (contents size 5008 5021)

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fixed/absolute-inside-fixed-expected.txt (216477 => 216478)


--- trunk/LayoutTests/tiled-drawing/scrolling/fixed/absolute-inside-fixed-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fixed/absolute-inside-fixed-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,3 +1,4 @@
+
 (Frame scrolling node
   (scrollable area size 785 600)
   (contents size 785 2710)
@@ -8,8 +9,8 @@
   (children 1
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 200.00 785.00 600.00)
-      (layer position at last layout 8.00 208.00)
+      (viewport rect at last layout at (0,200) size 785x600)
+      (layer position at last layout (8,208))
     )
   )
 )

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fixed/absolute-inside-out-of-view-fixed-expected.txt (216477 => 216478)


--- trunk/LayoutTests/tiled-drawing/scrolling/fixed/absolute-inside-out-of-view-fixed-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fixed/absolute-inside-out-of-view-fixed-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,3 +1,4 @@
+
 (Frame scrolling node
   (scrollable area size 785 600)
   (contents size 785 2513)
@@ -8,8 +9,8 @@
   (children 1
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 200.00 785.00 600.00)
-      (layer position at last layout 0.00 200.00)
+      (viewport rect at last layout at (0,200) size 785x600)
+      (layer position at last layout (0,200))
     )
   )
 )

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fixed/fixed-in-overflow-expected.txt (216477 => 216478)


--- trunk/LayoutTests/tiled-drawing/scrolling/fixed/fixed-in-overflow-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fixed/fixed-in-overflow-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,3 +1,4 @@
+
 (Frame scrolling node
   (scrollable area size 785 600)
   (contents size 785 2213)
@@ -10,8 +11,8 @@
   (children 1
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 200.00 785.00 600.00)
-      (layer position at last layout 2.00 215.00)
+      (viewport rect at last layout at (0,200) size 785x600)
+      (layer position at last layout (2,215))
     )
   )
 )

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fixed/fixed-position-out-of-view-expected.txt (216477 => 216478)


--- trunk/LayoutTests/tiled-drawing/scrolling/fixed/fixed-position-out-of-view-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fixed/fixed-position-out-of-view-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,3 +1,4 @@
+
 (Frame scrolling node
   (scrollable area size 785 600)
   (contents size 785 1021)
@@ -7,7 +8,7 @@
   (children 1
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 0.00 785.00 600.00)
+      (viewport rect at last layout at (0,0) size 785x600)
     )
   )
 )

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fixed/fixed-position-out-of-view-negative-zindex-expected.txt (216477 => 216478)


--- trunk/LayoutTests/tiled-drawing/scrolling/fixed/fixed-position-out-of-view-negative-zindex-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fixed/fixed-position-out-of-view-negative-zindex-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,3 +1,4 @@
+
 (Frame scrolling node
   (scrollable area size 785 600)
   (contents size 785 1021)
@@ -7,7 +8,7 @@
   (children 1
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 0.00 785.00 600.00)
+      (viewport rect at last layout at (0,0) size 785x600)
     )
   )
 )

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fixed/four-bars-expected.txt (216477 => 216478)


--- trunk/LayoutTests/tiled-drawing/scrolling/fixed/four-bars-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fixed/four-bars-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,3 +1,4 @@
+
 (Frame scrolling node
   (scrollable area size 785 600)
   (contents size 785 2221)
@@ -8,23 +9,23 @@
   (children 4
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 200.00 785.00 600.00)
-      (layer position at last layout 0.00 200.00)
+      (viewport rect at last layout at (0,200) size 785x600)
+      (layer position at last layout (0,200))
     )
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 200.00 785.00 600.00)
-      (layer position at last layout 6.00 396.00)
+      (viewport rect at last layout at (0,200) size 785x600)
+      (layer position at last layout (6,396))
     )
     (Fixed node
       (anchor edges: AnchorEdgeRight AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 200.00 785.00 600.00)
-      (layer position at last layout 597.00 396.00)
+      (viewport rect at last layout at (0,200) size 785x600)
+      (layer position at last layout (597,396))
     )
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeBottom)
-      (viewport rect at last layout: 0.00 200.00 785.00 600.00)
-      (layer position at last layout 0.00 712.00)
+      (viewport rect at last layout at (0,200) size 785x600)
+      (layer position at last layout (0,712))
     )
   )
 )

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fixed/four-bars-with-header-and-footer-expected.txt (216477 => 216478)


--- trunk/LayoutTests/tiled-drawing/scrolling/fixed/four-bars-with-header-and-footer-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fixed/four-bars-with-header-and-footer-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,3 +1,4 @@
+
 (Frame scrolling node
   (scrollable area size 785 600)
   (contents size 785 2421)
@@ -8,23 +9,23 @@
   (children 4
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 100.00 785.00 600.00)
-      (layer position at last layout 0.00 100.00)
+      (viewport rect at last layout at (0,100) size 785x600)
+      (layer position at last layout (0,100))
     )
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 100.00 785.00 600.00)
-      (layer position at last layout 6.00 296.00)
+      (viewport rect at last layout at (0,100) size 785x600)
+      (layer position at last layout (6,296))
     )
     (Fixed node
       (anchor edges: AnchorEdgeRight AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 100.00 785.00 600.00)
-      (layer position at last layout 597.00 296.00)
+      (viewport rect at last layout at (0,100) size 785x600)
+      (layer position at last layout (597,296))
     )
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeBottom)
-      (viewport rect at last layout: 0.00 100.00 785.00 600.00)
-      (layer position at last layout 0.00 612.00)
+      (viewport rect at last layout at (0,100) size 785x600)
+      (layer position at last layout (0,612))
     )
   )
 )

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt (216477 => 216478)


--- trunk/LayoutTests/tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,3 +1,4 @@
+
 (Frame scrolling node
   (scrollable area size 785 585)
   (contents size 1805 5108)
@@ -8,23 +9,23 @@
   (children 4
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 0.00 785.00 585.00)
-      (layer position at last layout -4.00 -4.00)
+      (viewport rect at last layout at (0,0) size 785x585)
+      (layer position at last layout (-4,-4))
     )
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 0.00 785.00 585.00)
-      (layer position at last layout 6.00 196.00)
+      (viewport rect at last layout at (0,0) size 785x585)
+      (layer position at last layout (6,196))
     )
     (Fixed node
       (anchor edges: AnchorEdgeRight AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 0.00 785.00 585.00)
-      (layer position at last layout 597.00 196.00)
+      (viewport rect at last layout at (0,0) size 785x585)
+      (layer position at last layout (597,196))
     )
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeBottom)
-      (viewport rect at last layout: 0.00 0.00 785.00 585.00)
-      (layer position at last layout -4.00 497.00)
+      (viewport rect at last layout at (0,0) size 785x585)
+      (layer position at last layout (-4,497))
     )
   )
 )

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fixed/negative-scroll-offset-expected.txt (216477 => 216478)


--- trunk/LayoutTests/tiled-drawing/scrolling/fixed/negative-scroll-offset-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fixed/negative-scroll-offset-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,3 +1,4 @@
+
 (Frame scrolling node
   (scrollable area size 785 600)
   (contents size 785 2221)
@@ -7,7 +8,7 @@
   (children 1
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 0.00 785.00 600.00)
+      (viewport rect at last layout at (0,0) size 785x600)
     )
   )
 )

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fixed/negative-scroll-offset-in-view-expected.txt (216477 => 216478)


--- trunk/LayoutTests/tiled-drawing/scrolling/fixed/negative-scroll-offset-in-view-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fixed/negative-scroll-offset-in-view-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,3 +1,4 @@
+
 (Frame scrolling node
   (scrollable area size 785 600)
   (contents size 785 2221)
@@ -7,8 +8,8 @@
   (children 1
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeBottom)
-      (viewport rect at last layout: 0.00 0.00 785.00 600.00)
-      (layer position at last layout 0.00 512.00)
+      (viewport rect at last layout at (0,0) size 785x600)
+      (layer position at last layout (0,512))
     )
   )
 )

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fixed/nested-fixed-expected.txt (216477 => 216478)


--- trunk/LayoutTests/tiled-drawing/scrolling/fixed/nested-fixed-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fixed/nested-fixed-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,3 +1,4 @@
+
 (Frame scrolling node
   (scrollable area size 785 600)
   (contents size 785 2213)
@@ -8,8 +9,8 @@
   (children 1
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 200.00 785.00 600.00)
-      (layer position at last layout 0.00 200.00)
+      (viewport rect at last layout at (0,200) size 785x600)
+      (layer position at last layout (0,200))
     )
   )
 )

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fixed/percentage-inside-fixed-expected.txt (216477 => 216478)


--- trunk/LayoutTests/tiled-drawing/scrolling/fixed/percentage-inside-fixed-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fixed/percentage-inside-fixed-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,3 +1,4 @@
+
 (Frame scrolling node
   (scrollable area size 785 600)
   (contents size 785 2513)
@@ -8,8 +9,8 @@
   (children 1
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 200.00 785.00 600.00)
-      (layer position at last layout 0.00 213.00)
+      (viewport rect at last layout at (0,200) size 785x600)
+      (layer position at last layout (0,213))
     )
   )
 )

Modified: trunk/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-expected.txt (216477 => 216478)


--- trunk/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,3 +1,4 @@
+
 (Frame scrolling node
   (scrollable area size 785 600)
   (contents size 785 1016)
@@ -18,11 +19,11 @@
           (anchor edges: AnchorEdgeTop AnchorEdgeBottom)
           (top offset 10.00)
           (bottom offset 10.00)
-          (containing block rect 8.00, 8.00 469.00 x 404.00)
-          (sticky box rect 8.00 312.00 100.00 100.00)
-          (constraining rect 0.00 0.00 485.00 300.00)
-          (sticky offset at last layout 0.00 -122.00)
-          (layer position at last layout 8.00 190.00)
+          (containing block rect at (8,8) size 469x404)
+          (sticky box rect at (8,312) size 100x100)
+          (constraining rect at (0,0) size 485x300)
+          (sticky offset at last layout width=0 height=-122)
+          (layer position at last layout (8,190))
         )
       )
     )

Modified: trunk/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor-expected.txt (216477 => 216478)


--- trunk/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,3 +1,4 @@
+
 (Frame scrolling node
   (scrollable area size 785 600)
   (contents size 785 1016)
@@ -9,8 +10,8 @@
   (children 1
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 0.00 785.00 600.00)
-      (layer position at last layout 8.00 10.00)
+      (viewport rect at last layout at (0,0) size 785x600)
+      (layer position at last layout (8,10))
       (children 1
         (Frame scrolling node
           (scrollable area size 500 300)
@@ -23,11 +24,11 @@
               (anchor edges: AnchorEdgeTop AnchorEdgeBottom)
               (top offset 10.00)
               (bottom offset 10.00)
-              (containing block rect 8.00, 8.00 484.00 x 404.00)
-              (sticky box rect 8.00 312.00 100.00 100.00)
-              (constraining rect 0.00 0.00 500.00 300.00)
-              (sticky offset at last layout 0.00 -122.00)
-              (layer position at last layout 8.00 190.00)
+              (containing block rect at (8,8) size 484x404)
+              (sticky box rect at (8,312) size 100x100)
+              (constraining rect at (0,0) size 500x300)
+              (sticky offset at last layout width=0 height=-122)
+              (layer position at last layout (8,190))
             )
           )
         )

Modified: trunk/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt (216477 => 216478)


--- trunk/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,3 +1,4 @@
+
 (Frame scrolling node
   (scrollable area size 785 600)
   (contents size 785 1016)
@@ -9,8 +10,8 @@
   (children 1
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 0.00 785.00 600.00)
-      (layer position at last layout 8.00 0.00)
+      (viewport rect at last layout at (0,0) size 785x600)
+      (layer position at last layout (8,0))
       (children 1
         (Frame scrolling node
           (scrollable area size 485 300)
@@ -23,11 +24,11 @@
               (anchor edges: AnchorEdgeTop AnchorEdgeBottom)
               (top offset 10.00)
               (bottom offset 10.00)
-              (containing block rect 8.00, 8.00 469.00 x 404.00)
-              (sticky box rect 8.00 312.00 100.00 100.00)
-              (constraining rect 0.00 0.00 485.00 300.00)
-              (sticky offset at last layout 0.00 -122.00)
-              (layer position at last layout 8.00 190.00)
+              (containing block rect at (8,8) size 469x404)
+              (sticky box rect at (8,312) size 100x100)
+              (constraining rect at (0,0) size 485x300)
+              (sticky offset at last layout width=0 height=-122)
+              (layer position at last layout (8,190))
             )
           )
         )

Modified: trunk/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor-expected.txt (216477 => 216478)


--- trunk/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,3 +1,4 @@
+
 (Frame scrolling node
   (scrollable area size 785 600)
   (contents size 785 1016)
@@ -18,11 +19,11 @@
           (anchor edges: AnchorEdgeTop AnchorEdgeBottom)
           (top offset 10.00)
           (bottom offset 10.00)
-          (containing block rect 8.00, 8.00 484.00 x 404.00)
-          (sticky box rect 8.00 312.00 100.00 100.00)
-          (constraining rect 0.00 0.00 500.00 300.00)
-          (sticky offset at last layout 0.00 -122.00)
-          (layer position at last layout 8.00 190.00)
+          (containing block rect at (8,8) size 484x404)
+          (sticky box rect at (8,312) size 100x100)
+          (constraining rect at (0,0) size 500x300)
+          (sticky offset at last layout width=0 height=-122)
+          (layer position at last layout (8,190))
         )
       )
     )

Modified: trunk/LayoutTests/tiled-drawing/scrolling/frames/fixed-inside-frame-expected.txt (216477 => 216478)


--- trunk/LayoutTests/tiled-drawing/scrolling/frames/fixed-inside-frame-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/tiled-drawing/scrolling/frames/fixed-inside-frame-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,4 +1,5 @@
 
+
 (Frame scrolling node
   (scrollable area size 785 600)
   (contents size 785 657)
@@ -16,8 +17,8 @@
       (children 1
         (Fixed node
           (anchor edges: AnchorEdgeLeft AnchorEdgeTop)
-          (viewport rect at last layout: 0.00 120.00 465.00 400.00)
-          (layer position at last layout 10.00 130.00)
+          (viewport rect at last layout at (0,120) size 465x400)
+          (layer position at last layout (10,130))
         )
       )
     )

Modified: trunk/LayoutTests/tiled-drawing/scrolling/frames/remove-coordinated-frame-expected.txt (216477 => 216478)


--- trunk/LayoutTests/tiled-drawing/scrolling/frames/remove-coordinated-frame-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/tiled-drawing/scrolling/frames/remove-coordinated-frame-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,3 +1,4 @@
+
 (Frame scrolling node
   (scrollable area size 785 600)
   (contents size 785 1016)
@@ -7,8 +8,8 @@
   (children 1
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeTop)
-      (viewport rect at last layout: 0.00 0.00 785.00 600.00)
-      (layer position at last layout 8.00 10.00)
+      (viewport rect at last layout at (0,0) size 785x600)
+      (layer position at last layout (8,10))
       (children 0
       )
     )

Modified: trunk/LayoutTests/tiled-drawing/scrolling/frames/scroll-region-after-frame-layout-expected.txt (216477 => 216478)


--- trunk/LayoutTests/tiled-drawing/scrolling/frames/scroll-region-after-frame-layout-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/tiled-drawing/scrolling/frames/scroll-region-after-frame-layout-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,4 +1,5 @@
 
+
 (Frame scrolling node
   (scrollable area size 785 600)
   (contents size 785 757)

Modified: trunk/LayoutTests/tiled-drawing/scrolling/scrolling-tree-after-scroll-expected.txt (216477 => 216478)


--- trunk/LayoutTests/tiled-drawing/scrolling/scrolling-tree-after-scroll-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/tiled-drawing/scrolling/scrolling-tree-after-scroll-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,3 +1,4 @@
+
 (Frame scrolling node
   (scrollable area size 785 600)
   (contents size 785 5021)

Modified: trunk/LayoutTests/tiled-drawing/scrolling/scrolling-tree-slow-scrolling-expected.txt (216477 => 216478)


--- trunk/LayoutTests/tiled-drawing/scrolling/scrolling-tree-slow-scrolling-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/tiled-drawing/scrolling/scrolling-tree-slow-scrolling-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,3 +1,4 @@
+
 (Frame scrolling node
   (scrollable area size 800 600)
   (contents size 800 600)

Modified: trunk/LayoutTests/tiled-drawing/scrolling/sticky/negative-scroll-offset-expected.txt (216477 => 216478)


--- trunk/LayoutTests/tiled-drawing/scrolling/sticky/negative-scroll-offset-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/tiled-drawing/scrolling/sticky/negative-scroll-offset-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,3 +1,4 @@
+
 (Frame scrolling node
   (scrollable area size 785 600)
   (contents size 785 2216)
@@ -10,11 +11,11 @@
       (left offset 0.00)
       (right offset 0.00)
       (bottom offset 0.00)
-      (containing block rect 8.00, 8.00 769.00 x 2200.00)
-      (sticky box rect 8.00 8.00 773.00 54.00)
-      (constraining rect 0.00 0.00 785.00 600.00)
-      (sticky offset at last layout 0.00 0.00)
-      (layer position at last layout 8.00 8.00)
+      (containing block rect at (8,8) size 769x2200)
+      (sticky box rect at (8,8) size 773x54)
+      (constraining rect at (0,0) size 785x600)
+      (sticky offset at last layout width=0 height=0)
+      (layer position at last layout (8,8))
     )
   )
 )

Modified: trunk/LayoutTests/tiled-drawing/scrolling/sticky/sticky-horizontal-expected.txt (216477 => 216478)


--- trunk/LayoutTests/tiled-drawing/scrolling/sticky/sticky-horizontal-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/tiled-drawing/scrolling/sticky/sticky-horizontal-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,4 +1,5 @@
 Left sticky Right sticky Left % sticky Right % sticky Left and Right Left and Right %
+
 (Frame scrolling node
   (scrollable area size 800 585)
   (contents size 2008 585)
@@ -10,58 +11,58 @@
     (Sticky node
       (anchor edges: AnchorEdgeLeft )
       (left offset 20.00)
-      (containing block rect 612.00, 25.00 792.00 x 442.00)
-      (sticky box rect 812.00 25.00 300.00 60.00)
-      (constraining rect 800.00 0.00 800.00 585.00)
-      (sticky offset at last layout 8.00 0.00)
-      (layer position at last layout 820.00 25.00)
+      (containing block rect at (612,25) size 792x442)
+      (sticky box rect at (812,25) size 300x60)
+      (constraining rect at (800,0) size 800x585)
+      (sticky offset at last layout width=8 height=0)
+      (layer position at last layout (820,25))
     )
     (Sticky node
       (anchor edges: AnchorEdgeRight )
       (right offset 20.00)
-      (containing block rect 612.00, 25.00 792.00 x 442.00)
-      (sticky box rect 812.00 93.00 300.00 60.00)
-      (constraining rect 800.00 0.00 800.00 585.00)
-      (sticky offset at last layout 0.00 0.00)
-      (layer position at last layout 812.00 93.00)
+      (containing block rect at (612,25) size 792x442)
+      (sticky box rect at (812,93) size 300x60)
+      (constraining rect at (800,0) size 800x585)
+      (sticky offset at last layout width=0 height=0)
+      (layer position at last layout (812,93))
     )
     (Sticky node
       (anchor edges: AnchorEdgeLeft )
       (left offset 160.00)
-      (containing block rect 612.00, 25.00 792.00 x 442.00)
-      (sticky box rect 812.00 161.00 300.00 60.00)
-      (constraining rect 800.00 0.00 800.00 585.00)
-      (sticky offset at last layout 148.00 0.00)
-      (layer position at last layout 960.00 161.00)
+      (containing block rect at (612,25) size 792x442)
+      (sticky box rect at (812,161) size 300x60)
+      (constraining rect at (800,0) size 800x585)
+      (sticky offset at last layout width=148 height=0)
+      (layer position at last layout (960,161))
     )
     (Sticky node
       (anchor edges: AnchorEdgeRight )
       (right offset 160.00)
-      (containing block rect 612.00, 25.00 792.00 x 442.00)
-      (sticky box rect 812.00 229.00 300.00 60.00)
-      (constraining rect 800.00 0.00 800.00 585.00)
-      (sticky offset at last layout 0.00 0.00)
-      (layer position at last layout 812.00 229.00)
+      (containing block rect at (612,25) size 792x442)
+      (sticky box rect at (812,229) size 300x60)
+      (constraining rect at (800,0) size 800x585)
+      (sticky offset at last layout width=0 height=0)
+      (layer position at last layout (812,229))
     )
     (Sticky node
       (anchor edges: AnchorEdgeLeft AnchorEdgeRight )
       (left offset 20.00)
       (right offset 20.00)
-      (containing block rect 612.00, 25.00 792.00 x 442.00)
-      (sticky box rect 812.00 297.00 300.00 60.00)
-      (constraining rect 800.00 0.00 800.00 585.00)
-      (sticky offset at last layout 8.00 0.00)
-      (layer position at last layout 820.00 297.00)
+      (containing block rect at (612,25) size 792x442)
+      (sticky box rect at (812,297) size 300x60)
+      (constraining rect at (800,0) size 800x585)
+      (sticky offset at last layout width=8 height=0)
+      (layer position at last layout (820,297))
     )
     (Sticky node
       (anchor edges: AnchorEdgeLeft AnchorEdgeRight )
       (left offset 160.00)
       (right offset 160.00)
-      (containing block rect 612.00, 25.00 792.00 x 442.00)
-      (sticky box rect 812.00 365.00 300.00 60.00)
-      (constraining rect 800.00 0.00 800.00 585.00)
-      (sticky offset at last layout 148.00 0.00)
-      (layer position at last layout 960.00 365.00)
+      (containing block rect at (612,25) size 792x442)
+      (sticky box rect at (812,365) size 300x60)
+      (constraining rect at (800,0) size 800x585)
+      (sticky offset at last layout width=148 height=0)
+      (layer position at last layout (960,365))
     )
   )
 )

Modified: trunk/LayoutTests/tiled-drawing/scrolling/sticky/sticky-vertical-expected.txt (216477 => 216478)


--- trunk/LayoutTests/tiled-drawing/scrolling/sticky/sticky-vertical-expected.txt	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/LayoutTests/tiled-drawing/scrolling/sticky/sticky-vertical-expected.txt	2017-05-09 05:25:46 UTC (rev 216478)
@@ -3,6 +3,7 @@
 Top stickyBottom stickyTop % stickyBottom % stickyTop and BottomTop and Bottom %
 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
 
+
 (Frame scrolling node
   (scrollable area size 785 600)
   (contents size 785 2908)
@@ -14,58 +15,58 @@
     (Sticky node
       (anchor edges: AnchorEdgeTop )
       (top offset 20.00)
-      (containing block rect 72.50, 406.00 640.00 x 604.00)
-      (sticky box rect 72.50 558.00 80.00 300.00)
-      (constraining rect 0.00 580.00 785.00 600.00)
-      (sticky offset at last layout 0.00 42.00)
-      (layer position at last layout 72.00 600.00)
+      (containing block rect at (72.50,406) size 640x604)
+      (sticky box rect at (72.50,558) size 80x300)
+      (constraining rect at (0,580) size 785x600)
+      (sticky offset at last layout width=0 height=42)
+      (layer position at last layout (72,600))
     )
     (Sticky node
       (anchor edges: AnchorEdgeBottom)
       (bottom offset 20.00)
-      (containing block rect 72.50, 406.00 640.00 x 604.00)
-      (sticky box rect 162.50 558.00 80.00 300.00)
-      (constraining rect 0.00 580.00 785.00 600.00)
-      (sticky offset at last layout 0.00 0.00)
-      (layer position at last layout 162.00 558.00)
+      (containing block rect at (72.50,406) size 640x604)
+      (sticky box rect at (162.50,558) size 80x300)
+      (constraining rect at (0,580) size 785x600)
+      (sticky offset at last layout width=0 height=0)
+      (layer position at last layout (162,558))
     )
     (Sticky node
       (anchor edges: AnchorEdgeTop )
       (top offset 120.00)
-      (containing block rect 72.50, 406.00 640.00 x 604.00)
-      (sticky box rect 252.50 558.00 80.00 300.00)
-      (constraining rect 0.00 580.00 785.00 600.00)
-      (sticky offset at last layout 0.00 142.00)
-      (layer position at last layout 252.00 700.00)
+      (containing block rect at (72.50,406) size 640x604)
+      (sticky box rect at (252.50,558) size 80x300)
+      (constraining rect at (0,580) size 785x600)
+      (sticky offset at last layout width=0 height=142)
+      (layer position at last layout (252,700))
     )
     (Sticky node
       (anchor edges: AnchorEdgeBottom)
       (bottom offset 120.00)
-      (containing block rect 72.50, 406.00 640.00 x 604.00)
-      (sticky box rect 342.50 558.00 80.00 300.00)
-      (constraining rect 0.00 580.00 785.00 600.00)
-      (sticky offset at last layout 0.00 0.00)
-      (layer position at last layout 342.00 558.00)
+      (containing block rect at (72.50,406) size 640x604)
+      (sticky box rect at (342.50,558) size 80x300)
+      (constraining rect at (0,580) size 785x600)
+      (sticky offset at last layout width=0 height=0)
+      (layer position at last layout (342,558))
     )
     (Sticky node
       (anchor edges: AnchorEdgeTop AnchorEdgeBottom)
       (top offset 20.00)
       (bottom offset 20.00)
-      (containing block rect 72.50, 406.00 640.00 x 604.00)
-      (sticky box rect 432.50 558.00 80.00 300.00)
-      (constraining rect 0.00 580.00 785.00 600.00)
-      (sticky offset at last layout 0.00 42.00)
-      (layer position at last layout 432.00 600.00)
+      (containing block rect at (72.50,406) size 640x604)
+      (sticky box rect at (432.50,558) size 80x300)
+      (constraining rect at (0,580) size 785x600)
+      (sticky offset at last layout width=0 height=42)
+      (layer position at last layout (432,600))
     )
     (Sticky node
       (anchor edges: AnchorEdgeTop AnchorEdgeBottom)
       (top offset 120.00)
       (bottom offset 120.00)
-      (containing block rect 72.50, 406.00 640.00 x 604.00)
-      (sticky box rect 522.50 558.00 80.00 300.00)
-      (constraining rect 0.00 580.00 785.00 600.00)
-      (sticky offset at last layout 0.00 142.00)
-      (layer position at last layout 522.00 700.00)
+      (containing block rect at (72.50,406) size 640x604)
+      (sticky box rect at (522.50,558) size 80x300)
+      (constraining rect at (0,580) size 785x600)
+      (sticky offset at last layout width=0 height=142)
+      (layer position at last layout (522,700))
     )
   )
 )

Modified: trunk/Source/WebCore/ChangeLog (216477 => 216478)


--- trunk/Source/WebCore/ChangeLog	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/Source/WebCore/ChangeLog	2017-05-09 05:25:46 UTC (rev 216478)
@@ -1,3 +1,38 @@
+2017-05-08  Frederic Wang  <fw...@igalia.com>
+
+        Simplify ScrollingStateNode::scrollingStateTreeAsText
+        https://bugs.webkit.org/show_bug.cgi?id=171802
+
+        Reviewed by Simon Fraser.
+
+        The following simplifications are performed:
+        - Rely on TextStream's internal value to manage indentation.
+        - Use TextStream::dumpProperty and << to print simple properties.
+        - Try and use TextStream::GroupScope for groups.
+
+        No new tests, only minor format changes in the dumped tree.
+
+        * page/scrolling/ScrollingStateFixedNode.cpp:
+        (WebCore::ScrollingStateFixedNode::dumpProperties):
+        * page/scrolling/ScrollingStateFixedNode.h:
+        * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
+        (WebCore::ScrollingStateFrameScrollingNode::dumpProperties):
+        * page/scrolling/ScrollingStateFrameScrollingNode.h:
+        * page/scrolling/ScrollingStateNode.cpp:
+        (WebCore::ScrollingStateNode::dumpProperties):
+        (WebCore::ScrollingStateNode::dump):
+        (WebCore::ScrollingStateNode::scrollingStateTreeAsText):
+        * page/scrolling/ScrollingStateNode.h:
+        * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
+        (WebCore::ScrollingStateOverflowScrollingNode::dumpProperties):
+        * page/scrolling/ScrollingStateOverflowScrollingNode.h:
+        * page/scrolling/ScrollingStateScrollingNode.cpp:
+        (WebCore::ScrollingStateScrollingNode::dumpProperties):
+        * page/scrolling/ScrollingStateScrollingNode.h:
+        * page/scrolling/ScrollingStateStickyNode.cpp:
+        (WebCore::ScrollingStateStickyNode::dumpProperties):
+        * page/scrolling/ScrollingStateStickyNode.h:
+
 2017-05-08  Youenn Fablet  <you...@apple.com>
 
         Follow-up to bug 171710: use more references and reject if either audio or video source creation is failing

Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.cpp (216477 => 216478)


--- trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.cpp	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.cpp	2017-05-09 05:25:46 UTC (rev 216478)
@@ -93,14 +93,14 @@
     }
 }
 
-void ScrollingStateFixedNode::dumpProperties(TextStream& ts, int indent, ScrollingStateTreeAsTextBehavior behavior) const
+void ScrollingStateFixedNode::dumpProperties(TextStream& ts, ScrollingStateTreeAsTextBehavior behavior) const
 {
-    ts << "(" << "Fixed node" << "\n";
-    ScrollingStateNode::dumpProperties(ts, indent, behavior);
+    ts << "Fixed node";
+    ScrollingStateNode::dumpProperties(ts, behavior);
 
     if (m_constraints.anchorEdges()) {
-        writeIndent(ts, indent + 1);
-        ts << "(anchor edges: ";
+        TextStream::GroupScope scope(ts);
+        ts << "anchor edges: ";
         if (m_constraints.hasAnchorEdge(ViewportConstraints::AnchorEdgeLeft))
             ts << "AnchorEdgeLeft ";
         if (m_constraints.hasAnchorEdge(ViewportConstraints::AnchorEdgeRight))
@@ -109,24 +109,16 @@
             ts << "AnchorEdgeTop";
         if (m_constraints.hasAnchorEdge(ViewportConstraints::AnchorEdgeBottom))
             ts << "AnchorEdgeBottom";
-        ts << ")\n";
     }
 
-    if (!m_constraints.alignmentOffset().isEmpty()) {
-        writeIndent(ts, indent + 1);
-        ts << "(alignment offset " << m_constraints.alignmentOffset().width() << " " << m_constraints.alignmentOffset().height() << ")\n";
-    }
+    if (!m_constraints.alignmentOffset().isEmpty())
+        ts.dumpProperty("alignment offset", m_constraints.alignmentOffset());
 
-    if (!m_constraints.viewportRectAtLastLayout().isEmpty()) {
-        writeIndent(ts, indent + 1);
-        FloatRect viewportRect = m_constraints.viewportRectAtLastLayout();
-        ts << "(viewport rect at last layout: " << viewportRect.x() << " " << viewportRect.y() << " " << viewportRect.width() << " " << viewportRect.height() << ")\n";
-    }
+    if (!m_constraints.viewportRectAtLastLayout().isEmpty())
+        ts.dumpProperty("viewport rect at last layout", m_constraints.viewportRectAtLastLayout());
 
-    if (m_constraints.layerPositionAtLastLayout() != FloatPoint()) {
-        writeIndent(ts, indent + 1);
-        ts << "(layer position at last layout " << m_constraints.layerPositionAtLastLayout().x() << " " << m_constraints.layerPositionAtLastLayout().y() << ")\n";
-    }
+    if (m_constraints.layerPositionAtLastLayout() != FloatPoint())
+        ts.dumpProperty("layer position at last layout", m_constraints.layerPositionAtLastLayout());
 }
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.h (216477 => 216478)


--- trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.h	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.h	2017-05-09 05:25:46 UTC (rev 216478)
@@ -57,7 +57,7 @@
 
     void reconcileLayerPositionForViewportRect(const LayoutRect& viewportRect, ScrollingLayerPositionAction) override;
 
-    void dumpProperties(TextStream&, int indent, ScrollingStateTreeAsTextBehavior) const override;
+    void dumpProperties(TextStream&, ScrollingStateTreeAsTextBehavior) const override;
 
     FixedPositionViewportConstraints m_constraints;
 };

Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp (216477 => 216478)


--- trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp	2017-05-09 05:25:46 UTC (rev 216478)
@@ -262,64 +262,48 @@
 }
 #endif
 
-void ScrollingStateFrameScrollingNode::dumpProperties(TextStream& ts, int indent, ScrollingStateTreeAsTextBehavior behavior) const
+void ScrollingStateFrameScrollingNode::dumpProperties(TextStream& ts, ScrollingStateTreeAsTextBehavior behavior) const
 {
-    ts << "(Frame scrolling node" << "\n";
+    ts << "Frame scrolling node";
     
-    ScrollingStateScrollingNode::dumpProperties(ts, indent, behavior);
+    ScrollingStateScrollingNode::dumpProperties(ts, behavior);
     
-    if (m_frameScaleFactor != 1) {
-        writeIndent(ts, indent + 1);
-        ts << "(frame scale factor " << m_frameScaleFactor << ")\n";
-    }
+    if (m_frameScaleFactor != 1)
+        ts.dumpProperty("frame scale factor", m_frameScaleFactor);
     
     if (m_visualViewportEnabled) {
-        writeIndent(ts, indent + 1);
-        ts << "(layout viewport " << m_layoutViewport << ")\n";
-        writeIndent(ts, indent + 1);
-        ts << "(min layout viewport origin " << m_minLayoutViewportOrigin << ")\n";
-        writeIndent(ts, indent + 1);
-        ts << "(max layout viewport origin " << m_maxLayoutViewportOrigin << ")\n";
+        ts.dumpProperty("layout viewport", m_layoutViewport);
+        ts.dumpProperty("min layout viewport origin", m_minLayoutViewportOrigin);
+        ts.dumpProperty("max layout viewport origin", m_maxLayoutViewportOrigin);
     }
     
-    if (m_behaviorForFixed == StickToViewportBounds) {
-        writeIndent(ts, indent + 1);
-        ts << "(fixed behavior: stick to viewport)\n";
-    }
+    if (m_behaviorForFixed == StickToViewportBounds)
+        ts.dumpProperty("behavior for fixed", m_behaviorForFixed);
 
     if (!m_eventTrackingRegions.asynchronousDispatchRegion.isEmpty()) {
-        ++indent;
-        writeIndent(ts, indent);
-        ts << "(asynchronous event dispatch region";
-        ++indent;
+        TextStream::GroupScope scope(ts);
+        ts << "asynchronous event dispatch region";
         for (auto rect : m_eventTrackingRegions.asynchronousDispatchRegion.rects()) {
             ts << "\n";
-            writeIndent(ts, indent);
+            ts.writeIndent();
             ts << rect;
         }
-        ts << ")\n";
-        indent -= 2;
     }
+
     if (!m_eventTrackingRegions.eventSpecificSynchronousDispatchRegions.isEmpty()) {
         for (const auto& synchronousEventRegion : m_eventTrackingRegions.eventSpecificSynchronousDispatchRegions) {
-            ++indent;
-            writeIndent(ts, indent);
-            ts << "(synchronous event dispatch region for event " << synchronousEventRegion.key;
-            ++indent;
+            TextStream::GroupScope scope(ts);
+            ts << "synchronous event dispatch region for event " << synchronousEventRegion.key;
             for (auto rect : synchronousEventRegion.value.rects()) {
                 ts << "\n";
-                writeIndent(ts, indent);
+                ts.writeIndent();
                 ts << rect;
             }
-            ts << ")\n";
-            indent -= 2;
         }
     }
 
-    if (m_synchronousScrollingReasons) {
-        writeIndent(ts, indent + 1);
-        ts << "(Scrolling on main thread because: " << ScrollingCoordinator::synchronousScrollingReasonsAsText(m_synchronousScrollingReasons) << ")\n";
-    }
+    if (m_synchronousScrollingReasons)
+        ts.dumpProperty("Scrolling on main thread because:", ScrollingCoordinator::synchronousScrollingReasonsAsText(m_synchronousScrollingReasons));
     
     // FIXME: dump more properties.
 }

Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h (216477 => 216478)


--- trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h	2017-05-09 05:25:46 UTC (rev 216478)
@@ -134,7 +134,7 @@
 #endif
     void setScrollerImpsFromScrollbars(Scrollbar* verticalScrollbar, Scrollbar* horizontalScrollbar);
 
-    void dumpProperties(TextStream&, int indent, ScrollingStateTreeAsTextBehavior) const override;
+    void dumpProperties(TextStream&, ScrollingStateTreeAsTextBehavior) const override;
 
 private:
     ScrollingStateFrameScrollingNode(ScrollingStateTree&, ScrollingNodeID);

Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateNode.cpp (216477 => 216478)


--- trunk/Source/WebCore/page/scrolling/ScrollingStateNode.cpp	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateNode.cpp	2017-05-09 05:25:46 UTC (rev 216478)
@@ -112,36 +112,40 @@
     setPropertyChanged(ScrollLayer);
 }
 
-void ScrollingStateNode::dumpProperties(TextStream& ts, int indent, ScrollingStateTreeAsTextBehavior behavior) const
+void ScrollingStateNode::dumpProperties(TextStream& ts, ScrollingStateTreeAsTextBehavior behavior) const
 {
-    if (behavior & ScrollingStateTreeAsTextBehaviorIncludeNodeIDs) {
-        writeIndent(ts, indent + 1);
-        ts << "(nodeID " << scrollingNodeID() << ")\n";
-    }
+    if (behavior & ScrollingStateTreeAsTextBehaviorIncludeNodeIDs)
+        ts.dumpProperty("nodeID", scrollingNodeID());
     
-    if (behavior & ScrollingStateTreeAsTextBehaviorIncludeLayerIDs) {
-        writeIndent(ts, indent + 1);
-        ts << "(layerID " << layer().layerID() << ")\n";
-    }
+    if (behavior & ScrollingStateTreeAsTextBehaviorIncludeLayerIDs)
+        ts.dumpProperty("layerID", layer().layerID());
 }
 
-void ScrollingStateNode::dump(TextStream& ts, int indent, ScrollingStateTreeAsTextBehavior behavior) const
+void ScrollingStateNode::dump(TextStream& ts, ScrollingStateTreeAsTextBehavior behavior) const
 {
-    writeIndent(ts, indent);
-    dumpProperties(ts, indent, behavior);
+    ts << "\n";
+    ts.writeIndent();
+    ts << "(";
+    ts.increaseIndent();
+    dumpProperties(ts, behavior);
 
     if (m_children) {
-        writeIndent(ts, indent + 1);
-        ts << "(children " << children()->size() << "\n";
-        
+        ts << "\n";
+        ts.writeIndent();
+        ts << "(";
+        ts.increaseIndent();
+        ts << "children " << children()->size();
         for (auto& child : *m_children)
-            child->dump(ts, indent + 2, behavior);
-        writeIndent(ts, indent + 1);
-        ts << ")\n";
+            child->dump(ts, behavior);
+        ts << "\n";
+        ts.decreaseIndent();
+        ts.writeIndent();
+        ts << ")";
     }
-
-    writeIndent(ts, indent);
-    ts << ")\n";
+    ts << "\n";
+    ts.decreaseIndent();
+    ts.writeIndent();
+    ts << ")";
 }
 
 String ScrollingStateNode::scrollingStateTreeAsText(ScrollingStateTreeAsTextBehavior behavior) const
@@ -148,7 +152,8 @@
 {
     TextStream ts(TextStream::LineMode::MultipleLine, TextStream::Formatting::SVGStyleRect);
 
-    dump(ts, 0, behavior);
+    dump(ts, behavior);
+    ts << "\n";
     return ts.release();
 }
 

Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h (216477 => 216478)


--- trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h	2017-05-09 05:25:46 UTC (rev 216478)
@@ -236,10 +236,10 @@
 protected:
     ScrollingStateNode(const ScrollingStateNode&, ScrollingStateTree&);
 
-    virtual void dumpProperties(TextStream&, int indent, ScrollingStateTreeAsTextBehavior) const;
+    virtual void dumpProperties(TextStream&, ScrollingStateTreeAsTextBehavior) const;
     
 private:
-    void dump(TextStream&, int indent, ScrollingStateTreeAsTextBehavior) const;
+    void dump(TextStream&, ScrollingStateTreeAsTextBehavior) const;
 
     const ScrollingNodeType m_nodeType;
     ScrollingNodeID m_nodeID;

Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp (216477 => 216478)


--- trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp	2017-05-09 05:25:46 UTC (rev 216478)
@@ -68,16 +68,14 @@
     setPropertyChanged(ScrolledContentsLayer);
 }
 
-void ScrollingStateOverflowScrollingNode::dumpProperties(TextStream& ts, int indent, ScrollingStateTreeAsTextBehavior behavior) const
+void ScrollingStateOverflowScrollingNode::dumpProperties(TextStream& ts, ScrollingStateTreeAsTextBehavior behavior) const
 {
-    ts << "(" << "Overflow scrolling node" << "\n";
+    ts << "Overflow scrolling node";
     
-    ScrollingStateScrollingNode::dumpProperties(ts, indent, behavior);
+    ScrollingStateScrollingNode::dumpProperties(ts, behavior);
     
-    if ((behavior & ScrollingStateTreeAsTextBehaviorIncludeLayerIDs) && m_scrolledContentsLayer.layerID()) {
-        writeIndent(ts, indent + 1);
-        ts << "(scrolled contents layer " << m_scrolledContentsLayer.layerID() << ")\n";
-    }
+    if ((behavior & ScrollingStateTreeAsTextBehaviorIncludeLayerIDs) && m_scrolledContentsLayer.layerID())
+        ts.dumpProperty("scrolled contents layer", m_scrolledContentsLayer.layerID());
 }
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.h (216477 => 216478)


--- trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.h	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.h	2017-05-09 05:25:46 UTC (rev 216478)
@@ -47,7 +47,7 @@
     const LayerRepresentation& scrolledContentsLayer() const { return m_scrolledContentsLayer; }
     WEBCORE_EXPORT void setScrolledContentsLayer(const LayerRepresentation&);
     
-    void dumpProperties(TextStream&, int indent, ScrollingStateTreeAsTextBehavior) const override;
+    void dumpProperties(TextStream&, ScrollingStateTreeAsTextBehavior) const override;
 
 private:
     ScrollingStateOverflowScrollingNode(ScrollingStateTree&, ScrollingNodeID);

Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp (216477 => 216478)


--- trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp	2017-05-09 05:25:46 UTC (rev 216478)
@@ -185,42 +185,40 @@
     setPropertyChanged(ExpectsWheelEventTestTrigger);
 }
 
-void ScrollingStateScrollingNode::dumpProperties(TextStream& ts, int indent, ScrollingStateTreeAsTextBehavior behavior) const
+void ScrollingStateScrollingNode::dumpProperties(TextStream& ts, ScrollingStateTreeAsTextBehavior behavior) const
 {
-    ScrollingStateNode::dumpProperties(ts, indent, behavior);
+    ScrollingStateNode::dumpProperties(ts, behavior);
     
     if (m_scrollPosition != FloatPoint()) {
-        writeIndent(ts, indent + 1);
-        ts << "(scroll position "
+        TextStream::GroupScope scope(ts);
+        ts << "scroll position "
             << TextStream::FormatNumberRespectingIntegers(m_scrollPosition.x()) << " "
-            << TextStream::FormatNumberRespectingIntegers(m_scrollPosition.y()) << ")\n";
+            << TextStream::FormatNumberRespectingIntegers(m_scrollPosition.y());
     }
 
     if (!m_scrollableAreaSize.isEmpty()) {
-        writeIndent(ts, indent + 1);
-        ts << "(scrollable area size "
+        TextStream::GroupScope scope(ts);
+        ts << "scrollable area size "
             << TextStream::FormatNumberRespectingIntegers(m_scrollableAreaSize.width()) << " "
-            << TextStream::FormatNumberRespectingIntegers(m_scrollableAreaSize.height()) << ")\n";
+            << TextStream::FormatNumberRespectingIntegers(m_scrollableAreaSize.height());
     }
 
     if (!m_totalContentsSize.isEmpty()) {
-        writeIndent(ts, indent + 1);
-        ts << "(contents size "
+        TextStream::GroupScope scope(ts);
+        ts << "contents size "
             << TextStream::FormatNumberRespectingIntegers(m_totalContentsSize.width()) << " "
-            << TextStream::FormatNumberRespectingIntegers(m_totalContentsSize.height()) << ")\n";
+            << TextStream::FormatNumberRespectingIntegers(m_totalContentsSize.height());
     }
 
     if (m_requestedScrollPosition != IntPoint()) {
-        writeIndent(ts, indent + 1);
-        ts << "(requested scroll position "
+        TextStream::GroupScope scope(ts);
+        ts << "requested scroll position "
             << TextStream::FormatNumberRespectingIntegers(m_requestedScrollPosition.x()) << " "
-            << TextStream::FormatNumberRespectingIntegers(m_requestedScrollPosition.y()) << ")\n";
+            << TextStream::FormatNumberRespectingIntegers(m_requestedScrollPosition.y());
     }
 
-    if (m_scrollOrigin != IntPoint()) {
-        writeIndent(ts, indent + 1);
-        ts << "(scroll origin " << m_scrollOrigin.x() << " " << m_scrollOrigin.y() << ")\n";
-    }
+    if (m_scrollOrigin != IntPoint())
+        ts.dumpProperty("scroll origin", m_scrollOrigin);
 }
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h (216477 => 216478)


--- trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h	2017-05-09 05:25:46 UTC (rev 216478)
@@ -107,7 +107,7 @@
     ScrollingStateScrollingNode(ScrollingStateTree&, ScrollingNodeType, ScrollingNodeID);
     ScrollingStateScrollingNode(const ScrollingStateScrollingNode&, ScrollingStateTree&);
 
-    void dumpProperties(TextStream&, int indent, ScrollingStateTreeAsTextBehavior) const override;
+    void dumpProperties(TextStream&, ScrollingStateTreeAsTextBehavior) const override;
     
 private:
     FloatSize m_scrollableAreaSize;

Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.cpp (216477 => 216478)


--- trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.cpp	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.cpp	2017-05-09 05:25:46 UTC (rev 216478)
@@ -93,14 +93,14 @@
     }
 }
 
-void ScrollingStateStickyNode::dumpProperties(TextStream& ts, int indent, ScrollingStateTreeAsTextBehavior behavior) const
+void ScrollingStateStickyNode::dumpProperties(TextStream& ts, ScrollingStateTreeAsTextBehavior behavior) const
 {
-    ts << "(" << "Sticky node" << "\n";
-    ScrollingStateNode::dumpProperties(ts, indent, behavior);
+    ts << "Sticky node";
+    ScrollingStateNode::dumpProperties(ts, behavior);
 
     if (m_constraints.anchorEdges()) {
-        writeIndent(ts, indent + 1);
-        ts << "(anchor edges: ";
+        TextStream::GroupScope scope(ts);
+        ts << "anchor edges: ";
         if (m_constraints.hasAnchorEdge(ViewportConstraints::AnchorEdgeLeft))
             ts << "AnchorEdgeLeft ";
         if (m_constraints.hasAnchorEdge(ViewportConstraints::AnchorEdgeRight))
@@ -109,43 +109,26 @@
             ts << "AnchorEdgeTop ";
         if (m_constraints.hasAnchorEdge(ViewportConstraints::AnchorEdgeBottom))
             ts << "AnchorEdgeBottom";
-        ts << ")\n";
     }
 
-    if (m_constraints.hasAnchorEdge(ViewportConstraints::AnchorEdgeLeft)) {
-        writeIndent(ts, indent + 1);
-        ts << "(left offset " << m_constraints.leftOffset() << ")\n";
-    }
-    if (m_constraints.hasAnchorEdge(ViewportConstraints::AnchorEdgeRight)) {
-        writeIndent(ts, indent + 1);
-        ts << "(right offset " << m_constraints.rightOffset() << ")\n";
-    }
-    if (m_constraints.hasAnchorEdge(ViewportConstraints::AnchorEdgeTop)) {
-        writeIndent(ts, indent + 1);
-        ts << "(top offset " << m_constraints.topOffset() << ")\n";
-    }
-    if (m_constraints.hasAnchorEdge(ViewportConstraints::AnchorEdgeBottom)) {
-        writeIndent(ts, indent + 1);
-        ts << "(bottom offset " << m_constraints.bottomOffset() << ")\n";
-    }
+    if (m_constraints.hasAnchorEdge(ViewportConstraints::AnchorEdgeLeft))
+        ts.dumpProperty("left offset", m_constraints.leftOffset());
+    if (m_constraints.hasAnchorEdge(ViewportConstraints::AnchorEdgeRight))
+        ts.dumpProperty("right offset", m_constraints.rightOffset());
+    if (m_constraints.hasAnchorEdge(ViewportConstraints::AnchorEdgeTop))
+        ts.dumpProperty("top offset", m_constraints.topOffset());
+    if (m_constraints.hasAnchorEdge(ViewportConstraints::AnchorEdgeBottom))
+        ts.dumpProperty("bottom offset", m_constraints.bottomOffset());
 
-    writeIndent(ts, indent + 1);
-    FloatRect r = m_constraints.containingBlockRect();
-    ts << "(containing block rect " << r.x() << ", " << r.y() << " " << r.width() << " x " << r.height() << ")\n";
+    ts.dumpProperty("containing block rect", m_constraints.containingBlockRect());
 
-    writeIndent(ts, indent + 1);
-    r = m_constraints.stickyBoxRect();
-    ts << "(sticky box rect " << r.x() << " " << r.y() << " " << r.width() << " " << r.height() << ")\n";
+    ts.dumpProperty("sticky box rect", m_constraints.stickyBoxRect());
 
-    writeIndent(ts, indent + 1);
-    r = m_constraints.constrainingRectAtLastLayout();
-    ts << "(constraining rect " << r.x() << " " << r.y() << " " << r.width() << " " << r.height() << ")\n";
+    ts.dumpProperty("constraining rect", m_constraints.constrainingRectAtLastLayout());
 
-    writeIndent(ts, indent + 1);
-    ts << "(sticky offset at last layout " << m_constraints.stickyOffsetAtLastLayout().width() << " " << m_constraints.stickyOffsetAtLastLayout().height() << ")\n";
+    ts.dumpProperty("sticky offset at last layout", m_constraints.stickyOffsetAtLastLayout());
 
-    writeIndent(ts, indent + 1);
-    ts << "(layer position at last layout " << m_constraints.layerPositionAtLastLayout().x() << " " << m_constraints.layerPositionAtLastLayout().y() << ")\n";
+    ts.dumpProperty("layer position at last layout", m_constraints.layerPositionAtLastLayout());
 }
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.h (216477 => 216478)


--- trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.h	2017-05-09 05:14:32 UTC (rev 216477)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.h	2017-05-09 05:25:46 UTC (rev 216478)
@@ -57,7 +57,7 @@
 
     void reconcileLayerPositionForViewportRect(const LayoutRect& viewportRect, ScrollingLayerPositionAction) override;
 
-    void dumpProperties(TextStream&, int indent, ScrollingStateTreeAsTextBehavior) const override;
+    void dumpProperties(TextStream&, ScrollingStateTreeAsTextBehavior) const override;
 
     StickyPositionViewportConstraints m_constraints;
 };
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to