441 #ifndef NDEBUG
442 void GlyphPageTreeNode::showSubtree()
443 {
444 Vector<char> indent(level());
445 indent.fill('\t', level());
446 indent.append(0);
447
448 HashMap<const FontData*, GlyphPageTreeNode*>::iterator end = m_children.end();
449 for (HashMap<const FontData*, GlyphPageTreeNode*>::iterator it = m_children.begin(); it != end; ++it) {
450 printf("%s\t%p %s\n", indent.data(), it->first, it->first->description().utf8().data());
451 it->second->showSubtree();
452 }
453 if (m_systemFallbackChild) {
454 printf("%s\t* fallback\n", indent.data());
455 m_systemFallbackChild->showSubtree();
456 }
457 }
458 #endif
459
460 }
461
462 #ifndef NDEBUG
463 void showGlyphPageTrees()
464 {
465 printf("Page 0:\n");
466 showGlyphPageTree(0);
467 HashMap<int, WebCore::GlyphPageTreeNode*>::iterator end = WebCore::GlyphPageTreeNode::roots->end();
468 for (HashMap<int, WebCore::GlyphPageTreeNode*>::iterator it = WebCore::GlyphPageTreeNode::roots->begin(); it != end; ++it) {
469 printf("\nPage %d:\n", it->first);
470 showGlyphPageTree(it->first);
471 }
472 }
473
474 void showGlyphPageTree(unsigned pageNumber)
475 {
476 WebCore::GlyphPageTreeNode::getRoot(pageNumber)->showSubtree();
477 }
478 #endif
479