Changeset 171307 in webkit
- Timestamp:
- Jul 21, 2014 11:26:45 AM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r171306 r171307 1 2014-07-21 Simon Fraser <simon.fraser@apple.com> 2 3 Add helper functions to dump the scrolling state tree from the debugger 4 https://bugs.webkit.org/show_bug.cgi?id=135101 5 6 Reviewed by Darin Adler. 7 8 Add debug-only showScrollingStateTree() functions that take a ScrollingStateTree* and ScrollingStateNode* 9 for use while debugging. 10 11 * page/scrolling/ScrollingStateTree.cpp: 12 (showScrollingStateTree): 13 * page/scrolling/ScrollingStateTree.h: 14 1 15 2014-07-20 Simon Fraser <simon.fraser@apple.com> 2 16 -
trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp
r170774 r171307 34 34 #include "ScrollingStateOverflowScrollingNode.h" 35 35 #include "ScrollingStateStickyNode.h" 36 #include <wtf/Text/CString.h> 36 37 37 38 namespace WebCore { … … 247 248 } // namespace WebCore 248 249 250 #ifndef NDEBUG 251 void showScrollingStateTree(const WebCore::ScrollingStateTree* tree) 252 { 253 if (!tree) 254 return; 255 256 auto rootNode = tree->rootStateNode(); 257 if (!rootNode) { 258 fprintf(stderr, "Scrolling state tree %p with no root node\n", tree); 259 return; 260 } 261 262 String output = rootNode->scrollingStateTreeAsText(); 263 fprintf(stderr, "%s\n", output.utf8().data()); 264 } 265 266 void showScrollingStateTree(const WebCore::ScrollingStateNode* node) 267 { 268 if (!node) 269 return; 270 271 showScrollingStateTree(&node->scrollingStateTree()); 272 } 273 274 #endif 275 249 276 #endif // ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS) -
trunk/Source/WebCore/page/scrolling/ScrollingStateTree.h
r170198 r171307 106 106 } // namespace WebCore 107 107 108 #ifndef NDEBUG 109 void showScrollingStateTree(const WebCore::ScrollingStateTree*); 110 void showScrollingStateTree(const WebCore::ScrollingStateNode*); 111 #endif 112 108 113 #endif // ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS) 109 114
Note: See TracChangeset
for help on using the changeset viewer.