Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(525)

Side by Side Diff: Source/platform/fonts/GlyphPageTreeNode.cpp

Issue 240003002: Add unit test for GlyphPageTreeNode. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: more tests Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/platform/fonts/GlyphPage.h ('k') | Source/platform/fonts/GlyphPageTreeNodeTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 if (pageZeroRoot) 117 if (pageZeroRoot)
118 pageZeroRoot->pruneFontData(fontData); 118 pageZeroRoot->pruneFontData(fontData);
119 } 119 }
120 120
121 static bool fill(GlyphPage* pageToFill, unsigned offset, unsigned length, UChar* buffer, unsigned bufferLength, const SimpleFontData* fontData) 121 static bool fill(GlyphPage* pageToFill, unsigned offset, unsigned length, UChar* buffer, unsigned bufferLength, const SimpleFontData* fontData)
122 { 122 {
123 #if ENABLE(SVG_FONTS) 123 #if ENABLE(SVG_FONTS)
124 if (fontData->isSVGFont()) 124 if (fontData->isSVGFont())
125 return fontData->customFontData()->fillSVGGlyphPage(pageToFill, offset, length, buffer, bufferLength, fontData); 125 return fontData->customFontData()->fillSVGGlyphPage(pageToFill, offset, length, buffer, bufferLength, fontData);
126 #endif 126 #endif
127 bool hasGlyphs = pageToFill->fill(offset, length, buffer, bufferLength, font Data); 127 bool hasGlyphs = fontData->fillGlyphPage(pageToFill, offset, length, buffer, bufferLength);
128 #if ENABLE(OPENTYPE_VERTICAL) 128 #if ENABLE(OPENTYPE_VERTICAL)
129 if (hasGlyphs && fontData->verticalData()) 129 if (hasGlyphs && fontData->verticalData())
130 fontData->verticalData()->substituteWithVerticalGlyphs(fontData, pageToF ill, offset, length); 130 fontData->verticalData()->substituteWithVerticalGlyphs(fontData, pageToF ill, offset, length);
131 #endif 131 #endif
132 return hasGlyphs; 132 return hasGlyphs;
133 } 133 }
134 134
135 void GlyphPageTreeNode::initializePage(const FontData* fontData, unsigned pageNu mber) 135 void GlyphPageTreeNode::initializePage(const FontData* fontData, unsigned pageNu mber)
136 { 136 {
137 ASSERT(!m_page); 137 ASSERT(!m_page);
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 printf("\nPage %d:\n", it->key); 428 printf("\nPage %d:\n", it->key);
429 showGlyphPageTree(it->key); 429 showGlyphPageTree(it->key);
430 } 430 }
431 } 431 }
432 432
433 void showGlyphPageTree(unsigned pageNumber) 433 void showGlyphPageTree(unsigned pageNumber)
434 { 434 {
435 WebCore::GlyphPageTreeNode::getRoot(pageNumber)->showSubtree(); 435 WebCore::GlyphPageTreeNode::getRoot(pageNumber)->showSubtree();
436 } 436 }
437 #endif 437 #endif
OLDNEW
« no previous file with comments | « Source/platform/fonts/GlyphPage.h ('k') | Source/platform/fonts/GlyphPageTreeNodeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698