#include "wtf/text/WTFString.h"
#include "wtf/unicode/CharacterNames.h"
-namespace WebCore {
+namespace blink {
using std::max;
using std::min;
return foundNode;
GlyphPageTreeNode* node = new GlyphPageTreeNode;
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
node->m_pageNumber = pageNumber;
#endif
roots->set(pageNumber, node);
// for only 128 out of 256 characters.
bool haveGlyphs;
if (!fontData->isSegmented()) {
- m_page = GlyphPage::createForSingleFontData(this, static_cast<const SimpleFontData*>(fontData));
- haveGlyphs = fill(m_page.get(), 0, GlyphPage::size, buffer, bufferLength, static_cast<const SimpleFontData*>(fontData));
+ m_page = GlyphPage::createForSingleFontData(this, toSimpleFontData(fontData));
+ haveGlyphs = fill(m_page.get(), 0, GlyphPage::size, buffer, bufferLength, toSimpleFontData(fontData));
} else {
m_page = GlyphPage::createForMixedFontData(this);
haveGlyphs = false;
- const SegmentedFontData* segmentedFontData = static_cast<const SegmentedFontData*>(fontData);
+ const SegmentedFontData* segmentedFontData = toSegmentedFontData(fontData);
for (int i = segmentedFontData->numRanges() - 1; i >= 0; i--) {
const FontDataRange& range = segmentedFontData->rangeAt(i);
// all this casting is to ensure all the parameters to min and max have the same type,
curr->m_customFontCount++;
}
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
child->m_pageNumber = m_pageNumber;
#endif
if (fontData) {
}
#endif
-}
+} // namespace blink
#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) {
+ HashMap<int, blink::GlyphPageTreeNode*>::iterator end = blink::GlyphPageTreeNode::roots->end();
+ for (HashMap<int, blink::GlyphPageTreeNode*>::iterator it = blink::GlyphPageTreeNode::roots->begin(); it != end; ++it) {
printf("\nPage %d:\n", it->key);
showGlyphPageTree(it->key);
}
void showGlyphPageTree(unsigned pageNumber)
{
- WebCore::GlyphPageTreeNode::getRoot(pageNumber)->showSubtree();
+ blink::GlyphPageTreeNode::getRoot(pageNumber)->showSubtree();
}
#endif