diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-07-31 11:52:57 +1000 |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-07-31 11:52:57 +1000 |
commit | aa9cf406d62004519ad54596e1c391f9a6439210 (patch) | |
tree | dd562b9c296981f2761b76623911be8496c7af84 /src/3rdparty/webkit/WebCore/platform/graphics/GlyphPageTreeNode.cpp | |
parent | 987aec28b950e1c9817a20a9dd71afc071cd93ea (diff) | |
parent | 56b6a5924008ab5cdbae36e9662eddba923acd5e (diff) |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/3rdparty/webkit/WebCore/platform/graphics/GlyphPageTreeNode.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/platform/graphics/GlyphPageTreeNode.cpp | 38 |
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 |