summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/GlyphPageTreeNode.cpp
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2009-08-11 17:01:47 +0100
committerBen Murdoch <benm@google.com>2009-08-11 18:21:02 +0100
commit0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5 (patch)
tree2943df35f62d885c89d01063cc528dd73b480fea /WebCore/platform/graphics/GlyphPageTreeNode.cpp
parent7e7a70bfa49a1122b2597a1e6367d89eb4035eca (diff)
downloadexternal_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.zip
external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.gz
external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.bz2
Merge in WebKit r47029.
Diffstat (limited to 'WebCore/platform/graphics/GlyphPageTreeNode.cpp')
-rw-r--r--WebCore/platform/graphics/GlyphPageTreeNode.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/WebCore/platform/graphics/GlyphPageTreeNode.cpp b/WebCore/platform/graphics/GlyphPageTreeNode.cpp
index a34a192..6419e0c 100644
--- a/WebCore/platform/graphics/GlyphPageTreeNode.cpp
+++ b/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