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

Unified Diff: Source/platform/fonts/Font.cpp

Issue 362963003: Encapsulate FontFallbackList's page access logic. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/platform/fonts/FontFallbackList.h » ('j') | Source/platform/fonts/FontFallbackList.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/Font.cpp
diff --git a/Source/platform/fonts/Font.cpp b/Source/platform/fonts/Font.cpp
index a94a6ccef24bfb7006ea321c8457d97f7ab691f6..8b59819871361bcc28f973496d1ec129ed465926 100644
--- a/Source/platform/fonts/Font.cpp
+++ b/Source/platform/fonts/Font.cpp
@@ -414,13 +414,10 @@ std::pair<GlyphData, GlyphPage*> Font::glyphDataAndPageForCharacter(UChar32 c, b
unsigned pageNumber = (c / GlyphPage::size);
- GlyphPageTreeNode* node = pageNumber ? m_fontFallbackList->m_pages.get(pageNumber) : m_fontFallbackList->m_pageZero;
+ GlyphPageTreeNode* node = m_fontFallbackList->getPageNode(pageNumber);
if (!node) {
node = GlyphPageTreeNode::getRootChild(fontDataAt(0), pageNumber);
- if (pageNumber)
- m_fontFallbackList->m_pages.set(pageNumber, node);
- else
- m_fontFallbackList->m_pageZero = node;
+ m_fontFallbackList->setPageNode(pageNumber, node);
}
GlyphPage* page = 0;
@@ -454,10 +451,7 @@ std::pair<GlyphData, GlyphPage*> Font::glyphDataAndPageForCharacter(UChar32 c, b
// Proceed with the fallback list.
node = node->getChild(fontDataAt(node->level()), pageNumber);
- if (pageNumber)
- m_fontFallbackList->m_pages.set(pageNumber, node);
- else
- m_fontFallbackList->m_pageZero = node;
+ m_fontFallbackList->setPageNode(pageNumber, node);
}
}
if (variant != NormalVariant) {
@@ -491,10 +485,7 @@ std::pair<GlyphData, GlyphPage*> Font::glyphDataAndPageForCharacter(UChar32 c, b
// Proceed with the fallback list.
node = node->getChild(fontDataAt(node->level()), pageNumber);
- if (pageNumber)
- m_fontFallbackList->m_pages.set(pageNumber, node);
- else
- m_fontFallbackList->m_pageZero = node;
+ m_fontFallbackList->setPageNode(pageNumber, node);
}
}
« no previous file with comments | « no previous file | Source/platform/fonts/FontFallbackList.h » ('j') | Source/platform/fonts/FontFallbackList.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698