summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore/platform/graphics/GlyphPageTreeNode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebCore/platform/graphics/GlyphPageTreeNode.cpp')
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/GlyphPageTreeNode.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/GlyphPageTreeNode.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/GlyphPageTreeNode.cpp
index a34a1921e..6419e0c4e 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/GlyphPageTreeNode.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/GlyphPageTreeNode.cpp
@@ -29,6 +29,7 @@
#include "config.h"
#include "GlyphPageTreeNode.h"
+#include "CString.h"
#include "CharacterNames.h"
#include "SegmentedFontData.h"
#include "SimpleFontData.h"
@@ -377,4 +378,41 @@ void GlyphPageTreeNode::pruneFontData(const SimpleFontData* fontData, unsigned l
it->second->pruneFontData(fontData, level);
}
+#ifndef NDEBUG
+ void GlyphPageTreeNode::showSubtree()
+ {
+ Vector<char> indent(level());
+ indent.fill('\t', level());
+ indent.append(0);
+
+ HashMap<const FontData*, GlyphPageTreeNode*>::iterator end = m_children.end();
+ for (HashMap<const FontData*, GlyphPageTreeNode*>::iterator it = m_children.begin(); it != end; ++it) {
+ printf("%s\t%p %s\n", indent.data(), it->first, it->first->description().utf8().data());
+ it->second->showSubtree();
+ }
+ if (m_systemFallbackChild) {
+ printf("%s\t* fallback\n", indent.data());
+ m_systemFallbackChild->showSubtree();
+ }
+ }
+#endif
+
}
+
+#ifndef NDEBUG
+void showGlyphPageTrees()
+{
+ printf("Page 0:\n");
+ showGlyphPageTree(0);
+ HashMap<int, WebCore::GlyphPageTreeNode*>::iterator end = WebCore::GlyphPageTreeNode::roots->end();
+ for (HashMap<int, WebCore::GlyphPageTreeNode*>::iterator it = WebCore::GlyphPageTreeNode::roots->begin(); it != end; ++it) {
+ printf("\nPage %d:\n", it->first);
+ showGlyphPageTree(it->first);
+ }
+}
+
+void showGlyphPageTree(unsigned pageNumber)
+{
+ WebCore::GlyphPageTreeNode::getRoot(pageNumber)->showSubtree();
+}
+#endif