summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/GlyphPageTreeNode.cpp
diff options
context:
space:
mode:
authorFeng Qian <fqian@google.com>2009-06-17 12:12:20 -0700
committerFeng Qian <fqian@google.com>2009-06-17 12:12:20 -0700
commit5f1ab04193ad0130ca8204aadaceae083aca9881 (patch)
tree5a92cd389e2cfe7fb67197ce14b38469462379f8 /WebCore/platform/graphics/GlyphPageTreeNode.cpp
parent194315e5a908cc8ed67d597010544803eef1ac59 (diff)
downloadexternal_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.zip
external_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.tar.gz
external_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.tar.bz2
Get WebKit r44544.
Diffstat (limited to 'WebCore/platform/graphics/GlyphPageTreeNode.cpp')
-rw-r--r--WebCore/platform/graphics/GlyphPageTreeNode.cpp27
1 files changed, 11 insertions, 16 deletions
diff --git a/WebCore/platform/graphics/GlyphPageTreeNode.cpp b/WebCore/platform/graphics/GlyphPageTreeNode.cpp
index bd838de..a34a192 100644
--- a/WebCore/platform/graphics/GlyphPageTreeNode.cpp
+++ b/WebCore/platform/graphics/GlyphPageTreeNode.cpp
@@ -220,8 +220,8 @@ void GlyphPageTreeNode::initializePage(const FontData* fontData, unsigned pageNu
if (scratchPage) {
ASSERT(to <= static_cast<int>(GlyphPage::size));
for (int j = from; j < to; j++) {
- if (!m_page->m_glyphs[j].glyph && pageToFill->m_glyphs[j].glyph)
- m_page->m_glyphs[j] = pageToFill->m_glyphs[j];
+ if (!m_page->glyphAt(j) && pageToFill->glyphAt(j))
+ m_page->setGlyphDataForIndex(j, pageToFill->glyphDataForIndex(j));
}
}
}
@@ -265,15 +265,13 @@ void GlyphPageTreeNode::initializePage(const FontData* fontData, unsigned pageNu
// has added anything.
bool newGlyphs = false;
for (unsigned i = 0; i < GlyphPage::size; i++) {
- if (parentPage->m_glyphs[i].glyph)
- m_page->m_glyphs[i] = parentPage->m_glyphs[i];
- else if (fallbackPage->m_glyphs[i].glyph) {
- m_page->m_glyphs[i] = fallbackPage->m_glyphs[i];
+ if (parentPage->glyphAt(i))
+ m_page->setGlyphDataForIndex(i, parentPage->glyphDataForIndex(i));
+ else if (fallbackPage->glyphAt(i)) {
+ m_page->setGlyphDataForIndex(i, fallbackPage->glyphDataForIndex(i));
newGlyphs = true;
- } else {
- const GlyphData data = { 0, 0 };
- m_page->m_glyphs[i] = data;
- }
+ } else
+ m_page->setGlyphDataForIndex(i, 0, 0);
}
if (!newGlyphs)
@@ -288,12 +286,9 @@ void GlyphPageTreeNode::initializePage(const FontData* fontData, unsigned pageNu
// ever finds it needs a glyph out of the system fallback page, it will
// ask the system for the best font to use and fill that glyph in for us.
if (parentPage)
- memcpy(m_page->m_glyphs, parentPage->m_glyphs, GlyphPage::size * sizeof(m_page->m_glyphs[0]));
- else {
- const GlyphData data = { 0, 0 };
- for (unsigned i = 0; i < GlyphPage::size; i++)
- m_page->m_glyphs[i] = data;
- }
+ m_page->copyFrom(*parentPage);
+ else
+ m_page->clear();
}
}