Title: [171307] trunk/Source/WebCore
- Revision
- 171307
- Author
- [email protected]
- Date
- 2014-07-21 11:26:45 -0700 (Mon, 21 Jul 2014)
Log Message
Add helper functions to dump the scrolling state tree from the debugger
https://bugs.webkit.org/show_bug.cgi?id=135101
Reviewed by Darin Adler.
Add debug-only showScrollingStateTree() functions that take a ScrollingStateTree* and ScrollingStateNode*
for use while debugging.
* page/scrolling/ScrollingStateTree.cpp:
(showScrollingStateTree):
* page/scrolling/ScrollingStateTree.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (171306 => 171307)
--- trunk/Source/WebCore/ChangeLog 2014-07-21 18:26:43 UTC (rev 171306)
+++ trunk/Source/WebCore/ChangeLog 2014-07-21 18:26:45 UTC (rev 171307)
@@ -1,3 +1,17 @@
+2014-07-21 Simon Fraser <[email protected]>
+
+ Add helper functions to dump the scrolling state tree from the debugger
+ https://bugs.webkit.org/show_bug.cgi?id=135101
+
+ Reviewed by Darin Adler.
+
+ Add debug-only showScrollingStateTree() functions that take a ScrollingStateTree* and ScrollingStateNode*
+ for use while debugging.
+
+ * page/scrolling/ScrollingStateTree.cpp:
+ (showScrollingStateTree):
+ * page/scrolling/ScrollingStateTree.h:
+
2014-07-20 Simon Fraser <[email protected]>
[iOS WK1] Single touch div scrolling doesn't work in framesets (breaks Word previews)
Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp (171306 => 171307)
--- trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp 2014-07-21 18:26:43 UTC (rev 171306)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp 2014-07-21 18:26:45 UTC (rev 171307)
@@ -33,6 +33,7 @@
#include "ScrollingStateFrameScrollingNode.h"
#include "ScrollingStateOverflowScrollingNode.h"
#include "ScrollingStateStickyNode.h"
+#include <wtf/Text/CString.h>
namespace WebCore {
@@ -246,4 +247,30 @@
} // namespace WebCore
+#ifndef NDEBUG
+void showScrollingStateTree(const WebCore::ScrollingStateTree* tree)
+{
+ if (!tree)
+ return;
+
+ auto rootNode = tree->rootStateNode();
+ if (!rootNode) {
+ fprintf(stderr, "Scrolling state tree %p with no root node\n", tree);
+ return;
+ }
+
+ String output = rootNode->scrollingStateTreeAsText();
+ fprintf(stderr, "%s\n", output.utf8().data());
+}
+
+void showScrollingStateTree(const WebCore::ScrollingStateNode* node)
+{
+ if (!node)
+ return;
+
+ showScrollingStateTree(&node->scrollingStateTree());
+}
+
+#endif
+
#endif // ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS)
Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateTree.h (171306 => 171307)
--- trunk/Source/WebCore/page/scrolling/ScrollingStateTree.h 2014-07-21 18:26:43 UTC (rev 171306)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateTree.h 2014-07-21 18:26:45 UTC (rev 171307)
@@ -105,6 +105,11 @@
} // namespace WebCore
+#ifndef NDEBUG
+void showScrollingStateTree(const WebCore::ScrollingStateTree*);
+void showScrollingStateTree(const WebCore::ScrollingStateNode*);
+#endif
+
#endif // ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS)
#endif // ScrollingStateTree_h
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes